Extension talk:Translate

About this board


Bever (talkcontribs)

Hi, when reading this help page, it occurred to me that I could translate it immediately, but I got a little fatigued after reading things like this:

"The Translate extension has many features specifically targeted to translators, while making back-end integration with actual source code as easy as possible. Meanwhile, everything runs inside MediaWiki, which allows users an almost endless degree of freedom for communication and self-organization."

This looks more like some ad, attempting to overwhelm the reader with jargon and fashionable words like 'communication', than like a help text. Does it mean anything? Bever (talk) 00:17, 11 July 2020 (UTC)

Nikerabbit (talkcontribs)

I am sure it could be improved to communicate the benefits more clearly, but I am still learning about technical documentation.

Bever (talkcontribs)

Hi, thank for your response. I hope you didn't think my comment was too harsh. :-) Bever (talk) 23:05, 23 July 2020 (UTC)

Reply to "Help page"
Bever (talkcontribs)

Hello, the template uses the variable construct {{{type|{{SUBJECTSPACE formatted}}} to refer to the page on which the template is used, for example "this help page" on Help:Preferences. However, in translation, not all types of pages have the same word for 'this' in Dutch, and probably other languages with grammatical gender, like French and German. It is "deze helppagina" but "dit sjabloon" (='this template'). Is there a way to have the correct pronoun for each type of page?

Shirayuki (talkcontribs)

I have replaced "this {{{type|{{SUBJECTSPACE formatted}}}}}" with generic "this page".

Nikerabbit (talkcontribs)

This is mostly out of scope for Translate. {{GRAMMAR:}} or {{#switch:}} could be used if your language supports it.

Reply to "Variable problem in Template:Update"
NicoV (talkcontribs)

Hi. I'm the author of a tool to fix syntax problems in MediaWiki wikis, WPCleaner. I want to use it on Meta also, but edits on translated page through action=edit is not possible, so I would like to be able to know in advance if the page will be editable. How can I do it through the API in a portable way between wikis?

Nikerabbit (talkcontribs)
NicoV (talkcontribs)

Thanks for the answer, but not very practical to have to do another API call just to get that information... I hope there's something can be retrieved when asking for information about pages

Nikerabbit (talkcontribs)

That information could be stored in pageprops, but that would be a feature request.

NicoV (talkcontribs)
Nikerabbit (talkcontribs)

Oh I didn't know that exists!

Translate URLs in target language

Tuxxic (talkcontribs)


Is there any means to translate a page URL written in a language to another language ?

For instance, I have : https://mywiki/index.php?title=Mon_titre_en_français

The English version is : https://mywiki/index.php?title=Mon_titre_en_français/en

I would like to have : https://mywiki/index.php?title=My_title_in_English

I already translate the page titles, so I have the translation.

I also use a model to display translated title in the translated pages, which is as follows :

{{#ifexist: Translations:{{{1}}}/Page display title{{#translation:}}<!-- 
     then -->|[[Special:MyLanguage/{{{1}}}|{{Translations:{{{1}}}/Page display title{{#translation:}}}}]]<!-- 
     else -->|[[Special:MyLanguage/{{{1}}}|{{{1}}}]]

So when people use this model and a page name, it is translated to the display page (ex: {{Traduction|Ma page en français}} will display My page in English as a link.

My first guess was to use redirections, but as there are too many pages to redirect, is there a way to do it automatically with Translate module or another technique ?

Nikerabbit (talkcontribs)

No, changing the links is not supported, because there is no way to avoid conflicts with identical translations in different languages.

Tuxxic (talkcontribs)


Do you think my first idea using redirections is usable ?

Nikerabbit (talkcontribs)

It may work in some restricted situations, but not as a general solutions.

Reply to "Translate URLs in target language"
Funkenstern (talkcontribs)


Is it possible to install the Translate extension on a Postgres or must I fear breaking MediaWiki?



Tuxxic (talkcontribs)


Honestly, I can only invite you to be careful and have a test on a replication of your MediaWiki instance first, but this goes for any test of any extension you will be using.

But I'd say, regarding requirements, that it is not compatible : Help:Extension:Translate/Installation

Best regards

Nikerabbit (talkcontribs)

We do not support Postgres at the moment. That might change with Phab:T191231.

Reply to "PostgresQL 12 support"

Automatically mark pages for translation

Tuxxic (talkcontribs)


I have been using the Translation extension for a few years now, and I wonder if there is a means to automatically mark pages for translation like with a cron for instance.

I am also using the Extension:Replace Text and each time I use it, I have to manually go on each page and mark it.

Also, my users are not very used to mark every update for translation, so the updates are not always marked.

Is it possible or is it out of scope ?

Thanks in advance

DannyS712 (talkcontribs)

I plan to write a bot to automatically mark pages for translation once phab:T235397 is done, but that would still be from the front end

APatro (WMF) (talkcontribs)
Reply to "Automatically mark pages for translation" (talkcontribs)

I have to install this on my english wiki to import templates that use it. E.g. Warning.

Reply to "not template friendly"

MATCH ... AGAINST does not work in SQLITE

Axdr (talkcontribs)

When requesting API the action = translationaids, an error occurs that causes a bug in ApiMain.php.

The error is the syntax MATCH-AGAINST error in SQLite.

The latest version of MediaWiki is not available to me, but I think this bug is there.

Where can we discuss the topic in more detail? ~~~~

Nikerabbit (talkcontribs)
Reply to "MATCH ... AGAINST does not work in SQLITE"
Blinkingline (talkcontribs)

I've just added some translations to my wiki. In Special:RecentChanges, I have my filter to not see translation, but I can still see where new translations are built and show as unpatrolled. Even worse, when I go to patrol them, there's no "Mark as Patrolled" link for these edits. Am I missing something?

Nikerabbit (talkcontribs)

Translate has its own translation review feature. Patrolling the translation pages would be extra work. There is hardcoded whitelist of actions for translation pages, and it doesn't currently include patrolling.

Reply to "Patrolling Translations"

Unused translation units in the percent stats

Want (talkcontribs)

Section "Changing the source text" from Help:Extension:Translate/Page_translation_administration page state:

Unused unit translations are not deleted automatically, but that should not cause trouble.

It's ok. But unused messages is along count into the info value percentual about state of translated page and it is confusing.

Is usable call of the function MessageGroupStats::clearGroup() for remove unused translation units? Or exists another method for it?

Wladek92 (talkcontribs)

By 'unused messages' do you mean for example T:201 T:202 of the following snippet ? (from https://www.mediawiki.org/wiki/Manual:HTMLForm_Tutorial_3). These comments correspond to previous translated sections which have been corrected such as NO longer to be translated now. Advice in the translation rules was to keep the tags. These comments do not appear on the page but if they generate erroneous statistics we can decide in a first step to remove them (?) carefully from the source (non excluding the developpement part of ignoring them for statistics - but this will be a Phabricator task).

Select multiple users.....
<source lang="php">
$formDescriptor = [...

== url== <!--T:201-->

[[File:HTMLForm Url.jpg|500px]]


... let we still read other points of view.

Christian Wia (talk) 07:23, 1 August 2019 (UTC)

Want (talkcontribs)

No. I specifically meant translation units 51 and 52 from page Help:Signatures (Special:Diff/3339237/3338935). After reverting changes and re-mark page to translate for some time, it still showed that only 95 percent of translation units were translated. It seems to have been just some cache, because now it's ok. But still interest me, what method I can use to get a list of currently id's of the translation units from the page what use by the current revision.

Reply to "Unused translation units in the percent stats"
Return to "Translate" page.