Extension talk:Translate

Jump to: navigation, search

About this board


By clicking "Add topic", you agree to our Terms of Use and agree to irrevocably release your text under the CC BY-SA 3.0 License and GFDL

Translation in the source language, English!

Donxello (talkcontribs)

Hi, we have an English Wiki but a German article to be translated. By default the extension marks the article as English and consequently we get

Translations to this language in this group have been disabled. Reason:

English is the source language of this page.

Any ideas how to mark this article as German and how to allow translations in the source language?



Nikerabbit (talkcontribs)

Hopefully you have recent enough MediaWiki to enable Manual:$wgPageLanguageUseDB in LocalSettings.php. Then you can use this feature to change the page content language to German. But you should do that before marking the page for translation.

Reply to "Translation in the source language, English!"

Namespace changed from the definition

Summary by Kghbln

Issue reported with task T172382

Kghbln (talkcontribs)

No matter what I add to the translation of the page title. The fuzzy bot keeps on fuzzying the message and emitting the above mentioned error notice. I have no idea how to resolve this and what may be the cause of it. The message conveys no meaning to me. I have several similar use cased on the wiki - working without issues. Here is the page. Any hint is appreciated.

Kghbln (talkcontribs)

Ok, I figured it out. It is possible to translate the namespace names for namespace category but not for namespace help. I guess a consistent behaviour will be nice.

Nikerabbit (talkcontribs)

Could you file a task in Phabricator? This is about MediaWikiMessageChecker::pagenameMessagesCheck incorrectly being applied also to translatable pages.

Kghbln (talkcontribs)

Sure. Done with task T172382.

MyISAM dependency blocking adoption of Azure Database for MySql

Lsilverman (talkcontribs)

I just attempted to move my mediawiki DB into Azure Database for MySql (their new hosted MySql offering). Got blocked on the use of MyISAM fulltext search on translate_tmf table.

Can this be migrated to InnoDB soon? Latest MySQLs have support for fulltext in InnoDB.

Nikerabbit (talkcontribs)

There are no such plans currently. ElasticSearch is recommended as the backend for translation memory and it also provides translation search. If you use ElasticSearch those database tables are unused.

Lsilverman (talkcontribs)

Nevertheless, the extension would fail to install due to the attempt to create the table using MYISAM.

Nikerabbit (talkcontribs)

Well, you can just comment out those files for the installation to remove the blocker for you. The oldest MySQL version that MediaWiki supports doesn't have fulltext support. You can file a task in Phabricator to make sure it is not forgotten when the minimum version requirement is updated.

Reply to "MyISAM dependency blocking adoption of Azure Database for MySql"
Lsilverman (talkcontribs)

I'm running MW 1.27 with CirrusSearch+Elastica, which requires ElasticSearch 1.X. Cirrus and Elastica are pinned to the REL1_27 branches.

My wiki emailed me the following error upon attempting to translate my first page:

PHP Fatal error:  Call to undefined method Elastica\Query\BoolQuery::addFilter() in /var/www/devmediawiki-1.27/w/extensions/Translate/ttmserver/ElasticSearchTTMServer.php on line 282

LocalSettings.php portion looks like this:

$wgTranslateTranslationServices['TTMServer'] = array(
        'type' => 'ttmserver',
        'class' => 'ElasticSearchTTMServer',
        'cutoff' => 0.75,
         * See http://elastica.io/getting-started/installation.html
         * See https://github.com/ruflin/Elastica/blob/master/lib/Elastica/Client.php
        'config' => This will be passed to \Elastica\Client
Lsilverman (talkcontribs)

Tracing the problem further, I see that REL1_27 of Elastica includes via composer ruflin/elastica 2.3.1.

elastica 2.3.1's version of Elastica/Query/BoolQuery.php does not contain the function addFilter().

Nikerabbit (talkcontribs)

Unfortunately this incompatibility has not been caught in our testing. Given 1.29 is soon going to be released, which means we are going to drop support for 1.27 from MLEB and Translate, I would encourage you to start planning for an upgrade and use the database backend for translation memory for the time being.

Lsilverman (talkcontribs)

We use Active Directory and LDAP. The LDAP auth plugins have not been updated in some time, and as a result we are stuck on 1.27.

Reply to "Error using ElasticSearch in 1.27" (talkcontribs)

(Moved from support desk and modified) I have translate installed on my wiki, but when I try to add a translation for a page I get the following error. Saving the translation failed: Unknown error: "tpt-unknown-page" FuzzyBot also isn't running when I mark a page for translation. Running runJobs.php did nothing. Running showJobs.php gave the result 0. Any help would be great. Thanks.

Tuxxic (talkcontribs)


Did you run runJobs.php from your actual PHP CLI instead of using an extension like MaintenanceShell ?

I had the same problem but running from CLI solved it.

In fact, in my case I'd like to runJobs eachtime I mark a page for translation, since it isn't done automatically ... :)

This comment was hidden by (history) (talkcontribs)

I ran it using SSH.

2002:43F4:3186:1234:35AE:218:4B7:62E5 (talkcontribs)

Please help me.

Nikerabbit (talkcontribs)

So if runJobs.php doesn't work, does running extensions/Translate/scripts/createMessageIndex.php work? (talkcontribs)

That worked (talkcontribs)

FuzzyBot still isn't creating the /en subpages though.

Nikerabbit (talkcontribs)

I don't have much info, so my best guess is that either the JobQueue is seriously broken and not running jobs, or there is some kind of error that prevents Translate from adding jobs to the queue. Enabling PHP error reporting as well as logging exceptions could help to identify the cause. For example:

error_reporting( E_ALL | E_STRICT );

$wgShowExceptionDetails = true;

$wgDebugLogGroups['exception'] = ini_get( 'error_log' ); 

$wgDebugLogGroups['error'] = ini_get( 'error_log' );

$wgDebugLogGroups['fatal'] = ini_get( 'error_log' );

Tuxxic (talkcontribs)

Edit : So here is what I get in my PHP error log after :

  • Adding a new chunk of text
  • Marking therefore the page for translation
  • then trying to translate it afterwards

I don't experience the problem if I update an already existing message group, if it can help you.

Thanks for advice on error logs :)

2017-05-03 12:01:19 SERVERNAME database-name: [3f588d59648bf5725b6fb31e] /index.php?title=Sp%C3%A9cial:PageTranslation   DBUnexpectedError from line 2866 of C:\mediawiki-path\includes\libs\rdbms\database\Database.php: MWCallableUpdate::doUpdate: Cannot flush snapshot because writes are pending (JobQueueDB::doBatchPush).

#0 C:\mediawiki-path\includes\libs\rdbms\loadbalancer\LoadBalancer.php(1092): Database->flushSnapshot(string)

#1 [internal function]: LoadBalancer->{closure}(DatabaseMysqli)

#2 C:\mediawiki-path\includes\libs\rdbms\loadbalancer\LoadBalancer.php(1390): call_user_func_array(Closure, array)

#3 C:\mediawiki-path\includes\libs\rdbms\loadbalancer\LoadBalancer.php(1100): LoadBalancer->forEachOpenMasterConnection(Closure)

#4 [internal function]: LoadBalancer->beginMasterChanges(string)

#5 C:\mediawiki-path\includes\libs\rdbms\lbfactory\LBFactory.php(176): call_user_func_array(array, array)

#6 [internal function]: LBFactory->{closure}(LoadBalancer, string, array)

#7 C:\mediawiki-path\includes\libs\rdbms\lbfactory\LBFactorySimple.php(134): call_user_func_array(Closure, array)

#8 C:\mediawiki-path\includes\libs\rdbms\lbfactory\LBFactory.php(179): LBFactorySimple->forEachLB(Closure, array)

#9 C:\mediawiki-path\includes\libs\rdbms\lbfactory\LBFactory.php(200): LBFactory->forEachLBCallMethod(string, array)

#10 C:\mediawiki-path\includes\deferred\DeferredUpdates.php(262): LBFactory->beginMasterChanges(string)

#11 C:\mediawiki-path\includes\deferred\DeferredUpdates.php(225): DeferredUpdates::runUpdate(MWCallableUpdate, LBFactorySimple, integer)

#12 C:\mediawiki-path\includes\deferred\DeferredUpdates.php(133): DeferredUpdates::execute(array, string, integer)

#13 C:\mediawiki-path\includes\MediaWiki.php(891): DeferredUpdates::doUpdates(string)

#14 C:\mediawiki-path\includes\MediaWiki.php(720): MediaWiki->restInPeace(string)

#15 C:\mediawiki-path\includes\MediaWiki.php(739): MediaWiki->{closure}()

#16 C:\mediawiki-path\includes\MediaWiki.php(543): MediaWiki->doPostOutputShutdown(string)

#17 C:\mediawiki-path\index.php(43): MediaWiki->run()

#18 {main}

Nikerabbit (talkcontribs)

Interesting. There are some related reports for this error message: https://phabricator.wikimedia.org/search/query/dmAqtYvLSuam/ I'll test this myself to see if I can reproduce. Which version of MediaWiki are you running?

Tuxxic (talkcontribs)

In my case, 1.28.2, but I experienced it also on 1.28.0. (talkcontribs)

Hi Nikerabbit,

I got same problem Saving the translation failed: Unknown error: "tpt-unknown-page"

Wiki version 1.28.1

Use extensions/Translate/scripts/createMessageIndex.php is OK, but translate new page doesn't work

Nikerabbit (talkcontribs)

I don't know if this is specific to 1.28, but I just tried with MediaWiki vagrant on a clean install, using default MLEB configuration, and I did not have this problem.

Tuxxic (talkcontribs)

Thanks for testing.

Would you be interested in the list of my extensions installed, in order to see which one might be the culprit then ?

Nikerabbit (talkcontribs)

There is some info at https://phabricator.wikimedia.org/T100085 about different but possible related error message. It says it would be about exceptions.

I also can reproduce "Cannot flush snapshot" errors on my wiki now, so let's see if I can debug further. (talkcontribs)

Thanks for debug Nikerabbit

Reply to "Translate"

Conflict with Extension:LDAP_Authentication

1 (talkcontribs)


Reply to "Conflict with Extension:LDAP_Authentication"

Cannot mark for translation

Summary by Nikerabbit

A conflict between ConfirmEdit and Translate. (talkcontribs)

When i click the link 'Diese Seite zur Übersetzung freigeben' (Wiki language is german) I get redirected to


But the special page does not exist! What could i do?

Nikerabbit (talkcontribs)

It sounds some kind of configuration error to me. I have not seen such an issue before. (talkcontribs)

It seems it was a conflict between Extension:ConfirmEdit and Translate. Since we didn't really need that one we just removed it.

Are there Active steps planned for the internationalization of category names?

Atef81 (talkcontribs)

I am starting a multilingual environment that will have mainly 4 languages. The problem is that the language that will have the most content is Arabic, and my aim is to get as much content translated to the other languages.

When I tried the Translate extension, it worked, but having the categories names in Arabic then "/en" and "/fr" is not practical as non Arabic speakers will find it impossible to understand.

I checked several forums and read that there are steps in the pipeline to rectify this. However, I can't find enough information about this on the Extension official page.

I am trying to start from a page like this and reach an end result like this, where page title and category names are translated to the article language.

Is this likely to be an option soon, or I need to setup a family of wikis that share the same resources like this Mediawiki manual?


Nikerabbit (talkcontribs)

Thanks for asking!

Due to possible naming conflicts, it's not a good idea to translate the actual page titles, unless you disambiguate them with a language code anyway.

But what you can do is to use the feature to translate the (category) page title. This does not affect the URL of the page, nor any links to that page. However, there are feature requests for MediaWiki core to use this translated title in links, including the category list at the bottom of the pages. It is not clear, though, when these will happen. I believe the features are not controversial, but some performance concerns must be taken into account while implementing them.

Some links:

Reply to "Are there Active steps planned for the internationalization of category names?" (talkcontribs)

I have "page a" and "page b" in the same namespace:

page a:

blind text

{{page b}}

another blind text

page b:

third blind text

the first translate markup from page b rest to be displayed in page a

how can I avoid this

page a: https://www.jurtenland.de/wiki/Jurte

page b: https://www.jurtenland.de/wiki/Wie_baue_ich_eine_Jurte_auf%3F

Thank you very much for your help

Nikerabbit (talkcontribs)

See Templates section in Help:Extension:Translate/Page translation administration/fi#Markup examples.

For now, basically you need to include a subpage of the template, which does not contain the translate tags.

Reply to "Translate Pages with Templates"
Juandev (talkcontribs)

Hi guys, I wanted to point some Commons guys on user manual, how to tag their page by translate tag, but I perfofmed several clicks and didnt find it yet. So this is not a question, where it is (I will ask on IRC), this is a point its not easy to find it. I started at commons:translate... where i would expect it, but its not there, so finally I ended up here, but even here I cannot find fastly user guide.

Tuxxic (talkcontribs)

Hello @Juandev, I got help by browsing this page, when I started using the extension : Help:Extension:Translate/Page translation example

Hope it will be helpful for you too !

Reply to "Not easy to find user manual"