Page MenuHomePhabricator

Remove language URL parameter in "Translate this page" link
Closed, ResolvedPublicBUG REPORT

Description

At the top of any translatable page (example), there is a “Translate this page” small text which links to Special:Translate?group=page-PAGE_NAME&language=USELANG&action=page&filter= where PAGE_NAME is the name of the page, and USELANG is the user interface language code (example).

If MediaWiki interface is in French, language parameter is: &language=fr.
If MediaWiki interface is in English, language parameter is: &language=en.

This parameter is useless, because it automatically defaults to MediaWiki interface language when it is not set.

It is sometimes problematic, when page authors want to share this “translate” link: they share a link which will display a warning message: “The source language of this group is English. Please select another language to translate into.” because they have written the page in their own language (same than for their user interface).

Most of links shared to Translators-l have this issue.

Outcome

Removed the language attribute from the "Translate this page" link on the translatable page.

Event Timeline

Aklapper renamed this task from Remove language URL parameter in Translate this pagel link to Remove language URL parameter in "Translate this page" link.Jul 4 2021, 8:21 AM

We discussed this and we think it would make sense to have USELANG be the language of the translation page being viewed, so clicking on the "Translate this page" link when viewing the French translation would set USELANG to be fr. For the source translation page, we could skip USELANG altogether.

For translated pages, this is already the case: the translate link of m:Wikimedia movement/de contains language=de regardless of the UI language.

Given the “Translate this page” link is copied from source page in most cases, I have no opposition to use translation language code for language parameter value in translated pages (it is already the case, as Tacsipacsi said).
If this parameter is removed in link in source page, this is sufficient for me. 🙂

Change 720664 had a related patch set uploaded (by Abijeet Patro; author: Abijeet Patro):

[mediawiki/extensions/Translate@master] Remove language attribute for Translate link on source page

https://gerrit.wikimedia.org/r/720664

Change 720664 merged by jenkins-bot:

[mediawiki/extensions/Translate@master] Remove language attribute for Translate link on source page

https://gerrit.wikimedia.org/r/720664

abi_ moved this task from In Review to Done on the Language-Team (Language-2021-July-September) board.

This is deployed on translatewiki.net and tested.

image.png (657×1 px, 179 KB)