Help talk:Extension:Translate

Jump to: navigation, search
Start a new discussion


Thread titleRepliesLast modified
mass-mark for translation511:36, 12 April 2014
Can't find outdated text016:57, 25 March 2014
Special page Special:SupportedLanguages php error822:13, 3 March 2014
Link from translation pages to other pages in same page content language021:03, 26 February 2014
Outdated/Fuzzy209:56, 18 February 2014
See Help talk:Extension:Translate/Page translation administration014:46, 24 January 2014
Translate Linktext of a Wikilink transcluded from a template209:27, 12 December 2013
Possibility to chose the language to translate from604:10, 24 May 2013
Mistype with image caption122:08, 8 November 2012
Redirections121:57, 14 September 2012
Admin?201:23, 30 August 2012
Why is it only one way?206:02, 29 August 2012
Already has translations513:13, 16 February 2012
Error Report108:53, 5 February 2012

mass-mark for translation

Can I somehow mark many pages at once for translation?

I tried exporting them to xml, adding translate Tags to the text and importing again. But Translate didn't even notice the translate tags; only after manually editing the page does the "mark for translation" option appear. Is there a a recommended way to do this?

Stm76 (talk)22:26, 10 April 2014

XML import is still the fastest; we have added about 300 translatable pages in Meta-Wiki in that way, in a couple days. The only alternative I know of is being worked on at Extension:Translate/Mass migration tools.

Nemo07:12, 11 April 2014

... meaning that you imported them and then marked them for translation manually? Or was there some other kind of trick involved?

Stm76 (talk)18:34, 11 April 2014

Yes, dummy edited and marked manually. It's four clicks and a keystroke for each page and all of them very repetitive, I estimate 30 seconds per page. :)

Nemo09:24, 12 April 2014

A bot can be used to null-edit all pages and then to mark them for translation.

Ricordisamoa09:23, 12 April 2014

Last time I tried, null edit was not enough.

Nemo11:36, 12 April 2014

Can't find outdated text

I was asked to help with translation of Commons:Commons:Senate of Poland. Everything went well except that once everything was translated the polish and french pages claims to be 89% translated instead of 100%. See [1]. It seems like something is 11% outdated but I can not find what and how to fix it. Also there is a problem with categorization. On Commons we never categorize language subtemplates, but this extension seems to do it, see Commons:Category:Wikimedia Polska is there a way to fix it, or is this something I should file a bug report about?

Jarekt (talk)16:57, 25 March 2014

Special page Special:SupportedLanguages php error


I'm scratching my head on this php error being thrown on Special:SupportedLanguages. The page works fine on my local. Using the same extension configurations setup on production server. MW 1.21.5, latest same language bundle on local and production server.

Warning: array_merge() expects at least 1 parameter, 0 given in /home/server/public_html/extensions/Translate/specials/SpecialSupportedLanguages.php on line 96

Warning: array_keys() expects parameter 1 to be array, null given in /home/server/public_html/extensions/Translate/specials/SpecialSupportedLanguages.php on line 96

Warning: Invalid argument supplied for foreach() in /home/server/public_html/extensions/Translate/specials/SpecialSupportedLanguages.php on line 364

Notice: Undefined variable: keys in /home/server/public_html/extensions/Translate/specials/SpecialSupportedLanguages.php on line 368

Catchable fatal error: Argument 1 passed to SqlBagOStuff::getMulti() must be of the type array, null given, called in /home/server/public_html/extensions/Translate/specials/SpecialSupportedLanguages.php on line 368 and defined in /home/server/public_html/includes/objectcache/SqlBagOStuff.php on line 212

A hint at what to look at or for greatly appreciated. Obviously I have something different, but what? Running same exact extensions on both local and production server. Everything else is working great. Thanks!

Hutchy68 (talk)04:45, 26 February 2014

There is condition just before line 96 in the code, so I don't know.

Nikerabbit (talk)07:53, 26 February 2014

Yes, pulling in user information. RC's from looking at the code? User contribs? I wonder if I rebuild the RC table if that would fix it? I did do a rebuildall when I upgraded after I ran update.php. Thoughts? Thanks

Hutchy68 (talk)17:16, 26 February 2014

Hi Nikerabbit, still no joy, the page still has a fatal error. I rebuilt RC's, checked the User table, still failing array_merge and array_keys. Debugging log turned on and it shows nothing for this Special Page. Do you have any suggestions on how to debug this? Thanks.

Hutchy68 (talk)02:20, 1 March 2014

In these cases I start adding manual debugging statements in the code until I understand what is going on.

Nikerabbit (talk)08:18, 1 March 2014

Thanks Nikerabbit, on a live site so I don't usually like "live debugging" but did it anyway. Seems as if this statement is the issue.

if ( !defined( 'NS_PORTAL' ) ) {
        $users = $this->fetchTranslatorsAuto();
        } else {
        $users = $this->fetchTranslatorsPortal( $natives );

We have NS_PORTAL defined. Funny thing is, I comment out the if statement and use either or to define $users.

        $users = $this->fetchTranslatorsAuto();


        $users = $this->fetchTranslatorsPortal( $natives );

The page works, but the heading of languages is doubled at the top.

dansk български español Bahasa Indonesia français English فارسی Nederlands


español Bahasa Indonesia فارسی dansk English български français Nederlands

Even though the languages are in a different order, any of them link to the page's anchors for the language headings.

Also, all users are wrapped in a <del> tag so they look like this, username. Not sure why they are doing that either.

Thanks for your help.

Hutchy68 (talk)14:37, 1 March 2014

That makes sense. We were supposed to get rid of the NS_PORTAL strategy, which would fix the error for you as well. The double list of languages can be just a byproduct of the heavy caching of the page with your debugging output.

Nikerabbit (talk)15:40, 1 March 2014

Link from translation pages to other pages in same page content language

A thread, Thread:Help talk:Extension:Translate/Translation language, was moved from here to Extension talk:Translate. This move was made by Nemo bis (talk | contribs) on 26 February 2014 at 21:03.


Is there a way of manually marking a translation as outdated/Fuzzy. Previously this was done with !!FUZZY!! but this no longer seems to work (at least for my initial test on Commons). Specifically the message should afterwards not be marked as translated which is what Fuzzy now does.

Lokal Profil (talk)18:07, 17 February 2014

!!FUZZY!! does still work as far as I know.

Nikerabbit (talk)18:29, 17 February 2014

You are right. I must have written !!Fuzzy!! by mistake and the progressbars do not detect the tag until after reloading.

Lokal Profil (talk)09:56, 18 February 2014

There are a few missing things that wuld simplify things in managing translated templates. See Help talk:Extension:Translate/Page translation administration for details.

Note that the "TNT" template has been updated on Meta-Wiki, and is still being worked on to implement the Mediawiki standard fallbacks, still missing for now.

The Lua module also fixes various quirks (the version copied from Meta-Wiki to Commons doesn't have these features (notably it is still producing "Script errors" if the specified template name is still not marked in translation to generate the /en subpage: so as long as the source template is not marked you need to create manually the final "/en" version, used as the last default).

Verdy p (talk)14:41, 24 January 2014

Translate Linktext of a Wikilink transcluded from a template

Consider a template containing something like

[[Main Page|<translate>Go to main page</translate>]]

which becomes

[[Main Page|<translate><!--T:1-->
Go to main page</translate>]]

This looks good on the template page, but as soon as you transclude this template, the <translate> tags get visible on the transcluding page. Is there a way to translate the link text only and still be able to transclude the generated content onto another page?

Patrick87 (talk)18:57, 11 December 2013

As Help:Extension:Translate/Page_translation_administration says, you can't call translatable templates directly, but only their languages subpages. This is usually done with templates like {{TNT}} or m:Template:Translatable template (the latter uses lua). Maybe in a distant future Translate will support this use case natively.

Nemo09:11, 12 December 2013

Ah thanks, totally makes sense.

I skipped the paragraph since I knew how to translate templates using such mechanisms, but i didn't know it was a requirement. Will change the template transclusion then.

Patrick87 (talk)09:27, 12 December 2013

Possibility to chose the language to translate from

Is there a possibility to choose the language to translate from? If a message is already translated to Spanish for example, why cannot we choose to show this message in the translation feature instead of English, it would allow more contributors to translate and make it easier since those languages are closer.

Amqui (talk)00:39, 29 August 2012

Would also be useful if at the top of any of the languages' pages, we could directly click on Translate instead of only saying "This is a translated page".

Amqui (talk)00:41, 29 August 2012

Bugs and feature requests should go to bugzilla.

Nikerabbit (talk)06:03, 29 August 2012

I have a large number of documents in Italian and German that I'd like to import and then translate to English. How does one go about posting feature requests to bugzilla?

~ Michael Chidester (Contact)01:28, 24 May 2013

The feature request already exists. For reporting things in the future, see How to report a bug. In short, go to bugzilla:, enter a new request, select "MediaWiki extensions->Translate". If it's a feature request (not a bug fix), choose "enhancement".

πr2 (tc)04:10, 24 May 2013

Use the assistant language feature available in your preferences.

Nikerabbit (talk)06:03, 29 August 2012

It should be directly selectionable from the translation feature if the particular message is already translated in other languages, we should have the option of selecting those to make our own translation.

Amqui (talk)07:46, 3 September 2012

Mistype with image caption

"The translation editor: a message with a tip and and a suggestion from an assistant language"

Please fix it.

Kaganer (talk)16:00, 8 November 2012

Thanks. This is still a wiki, by the way. ;-)

Nemo22:08, 8 November 2012


I think the extension should create a redirection from the page with the translated title to the page with the English_title/lang_code.

Amqui (talk)00:50, 29 August 2012

There is no way that would work cleanly because translations in different languages can be same.

Nikerabbit (talk)06:04, 29 August 2012

I agree, thanks.

Amqui (talk)07:47, 3 September 2012

Why does the extension required an admin to mark every edit for translation? Shouldn't that be automatic for confirmed users?

Amqui (talk)00:51, 29 August 2012

The rights are configurable like any other rights. However, the marker has big responsibility to not mess up things or waste translators time.

Nikerabbit (talk)06:08, 29 August 2012

OK thanks

Amqui (talk)01:23, 30 August 2012

Why is it only one way?

Why the translation only work from English to other languages? How can a speaker of one of the translated languages add a section to the page directly in its language and it marks the English version that need to be translated. The Extension should work in all directions. And we should be able to directly edit all languages' pages.

Amqui (talk)00:32, 29 August 2012

When I try to edit a translated page it says "This page cannot be updated manually. This page is a translation of page Wikimedia Indigenous Languages and the translation can be updated using the translation tool." (on Meta), but a contributor cannot use the translation tool to add "new stuff" or a new section to the page, only to translate sections of the English page.

Amqui (talk)00:37, 29 August 2012

That is a more complex problem. See this presentation at Wikimania about one system that does that.

Nikerabbit (talk)06:02, 29 August 2012

Already has translations

What would people do if the page to mark for translations already has translations from when the extension wasn't enabled?

Ebe12323:29, 6 February 2012

You have to get them out of the way and manually copy/convert them to the new system.

siebrand00:05, 7 February 2012

Done, but lots of work!

Ebe12300:54, 7 February 2012

Yes, I know... If you have any thoughts on how it could be made easier, don't hold back...

siebrand22:14, 7 February 2012

Just want to note that it's better to not move the translations. If you move them, then they are separate "useless" pages, and if you leave them where the translate feature will be used (FuzzyBot simply overrides it), then the page history is kept and you can still look at past revisions and copy the content from there.

SPQRobin02:06, 9 February 2012

Didn't know that. Thanks for the tip.

siebrand (talk)13:13, 16 February 2012

Error Report

When I try to translate [1],it will report an error when I try to include an "external link" with this: [https:// THE_TRANSLATION]. It's that really an error or just because it can't call out the CAPTCHA verification?

ZumarX06:57, 5 February 2012

bugzilla:34182: the workaround is to edit the page directly (right click the link that opens the translation editor and open it in new tab or copy the link address.

Nikerabbit08:53, 5 February 2012