Nothing Special   »   [go: up one dir, main page]

Page MenuHomePhabricator

Deleted en-gb translations not exported into release branch as part of localisation updates
Closed, ResolvedPublic4 Estimated Story PointsBUG REPORT

Description

The British English localisation contains a number of other, likely unintentionally-included languages, which override the intended core English translation.
Steps to replicate the issue:

What happens?: Certain messages are in unexpected languages. For example, the message "filehist-datetime" displays "Gwalagizhi", which is from Hausa, and "filehist-thumb" displays "Nyangagi" from Indonesian.
What should have happened instead?: The aforementioned messages should have shown the same messages as from the core English translation (c.f. the same page with ?uselang=en, for example https://aew.freosanstudios.com/w/index.php/File:Schindler_Service_Passage.jpg?uselang=en)
Software version (on Special:Version page): 1.39.8. However, the issue affects all current MediaWiki versions due to being a translatewiki.net bug.

Other information (browser name/version, screenshots, etc.): There are some other messages in en-gb.json affected by this issue, such as "editundo". Before the translation issue occured, it seems that the affected message keys were simply not defined, which causes them to default to equivalents in en.json and is reasonable.

Appears to be a continuation of T286901: Explore options to avoid people translating into wrong language.

Event Timeline

(change visibility) 10:16, 15 May 2024 Jon Harald Søby Sọ̀rọ̀ contribs block deleted page MediaWiki:Filehist-datetime/en-gb (Wrong language: content was: "Gwalagizhi", and the only contributor was "Umar Ahmad2345" (talk)) (view/undelete) (thank)

It seems that after these messages have been deleted, they've not been exported again to REL1_39 (at least). I've noticed a few others...

"filehist-help": "Yi efo/eka'e gwa ebo wo le nyangagi wuncin ye kamina wunga tinya nan",
"filehist-datetime": "Gwalagizhi",
"filehist-thumb": "Nyangagi",

https://github.com/wikimedia/mediawiki/blob/41048a7/languages/i18n/en-gb.json#L169-L171

Reedy renamed this task from British English localisation displays strings from other languages to Deleted translations not exported into REL1_39 localisation updates for en-gb.Sep 24 2024, 2:18 PM
Reedy updated the task description. (Show Details)
Reedy renamed this task from Deleted translations not exported into REL1_39 localisation updates for en-gb to Deleted en-gb translations not exported into release branch as part of localisation updates.Sep 24 2024, 2:21 PM
		// $keyCompatibilityMap has the target (stable branch) source language key order
		foreach ( $keyCompatibilityMap as $key => $isCompatible ) {
			$sourceValue = $sourceTemplate['MESSAGES'][$key] ?? null;
			$targetValue = $targetTemplate['MESSAGES'][$key] ?? null;

			// Use existing translation value from the target (stable branch) as the default
			if ( $targetValue !== null ) {
				$combinedMessages[$key] = $targetValue;
			}

^ The code would seem to be trying to keep existing translations, rather than clobbering them?

I'm guessing this is to preserve messages (and their translations?) where they no longer exist in newer branches (master), which makes sense...

That's correct, we don't want to start removing existing translations for messages that are no longer in use.

I think we should be able to check if the message is still known and compatible but doesn't have translation and delete it in that case.

Can anyone think of cases where this wouldn't be a safe thing to do?

The bad translations have been in every release since MW 1.39, including the recent 1.42.x. Are they going to be in MW 1.43 too?

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

[mediawiki/extensions/Translate@master] WIP: Ensure deleted translations are removed from backports

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

Change #1081498 had a related patch set uploaded (by Paladox; author: Paladox):

[mediawiki/core@REL1_42] Remove words meant for yo lang from en-gb

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

Change #1081498 merged by jenkins-bot:

[mediawiki/core@REL1_42] Remove words meant for yo lang from en-gb

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

Will this fix the 1.39 LTS branch? It looks like part of this commit (specifically everything affecting en-gb.json) didn't get backported so all the 1.39 LTS releases have text in the wrong language too (e.g. looking at the current REL1_39 branch). I only ask because the above commit seems to remove different messages than these incorrect ones.

We are working on a more permanent fix that automatically removes bad translations if they get deleted on translatewiki.

Change #1078703 merged by jenkins-bot:

[mediawiki/extensions/Translate@master] Ensure deleted translations are removed from backports

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

Change #1084038 had a related patch set uploaded (by Nikerabbit; author: Nikerabbit):

[mediawiki/extensions/Translate@master] Backport: Temporarily skip translation removals for certain languages

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

Change #1084038 merged by jenkins-bot:

[mediawiki/extensions/Translate@master] Backport: Temporarily skip translation removals for certain languages

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

Nice work, thanks for the update!

abi_ set the point value for this task to 4.Wed, Nov 6, 3:15 AM

Thank you!

Noting that 1.43 looks good as well.