Page MenuHomePhabricator

Removing all course reruns allows message bundle to be translated to all languages
Closed, ResolvedPublic4 Estimated Story PointsBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

  • Create a block in a base course
  • Allow translation of that course into other languages
  • Delete the block from base and translated courses

What happens?:
The WikiLearn system informs Meta-Wiki that no languages are needed by sending an empty priorityLanguages array since they no longer need any translation.
On Meta-Wiki, translation of that message bundle is now allowed into all languages.

What should have happened instead?:
Translation should not be allowed on Meta-Wiki

Software version (skip for WMF-hosted wikis like Wikipedia):

  • MediaWiki: master
  • Translate: master

Other information (browser name/version, screenshots, etc.):
Sample message bundles with this issue:

Event Timeline

One simple fix for this would be to not allow translation to any language if priorityLanguages is [] and allowOnlyPriorityLanguages is true.

Another option would be to add a separate`@metadata` property or delete the course entirely on MetaWiki if there are no priorities set.

On translatable pages, AFAIK it’s usually handled by setting priority languages to ['en'] (or whatever the source language is) and then setting allowOnlyPriorityLanguages to true. However, handling the empty array as you propose would be a cleaner solution, and I can think of no workflows/cases it would break.

Nikerabbit lowered the priority of this task from Medium to Low.Jan 16 2024, 8:59 AM
Nikerabbit set the point value for this task to 4.

Change 1002982 had a related patch set uploaded (by Wangombe; author: Wangombe):

[mediawiki/extensions/Translate@master] MessageBundles: Limit translation if no priority languages are set

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

Change 1009352 had a related patch set uploaded (by Wangombe; author: Wangombe):

[translatewiki@master] Ignore tpt-translation-restricted-no-priority-languages-int message

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

Change 1002982 merged by jenkins-bot:

[mediawiki/extensions/Translate@master] MessageBundle: Stop translation based on prioritylangs and priorityforce

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

Change 1009352 merged by jenkins-bot:

[translatewiki@master] Translate extension: Ignore translation of concatenated messages

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

This works as expected:

image.png (1,296×591 px, 103 KB)

There is a separate issue with styles not being applied to the warnings. I'll file a separate bug report for that.

There is a separate issue with styles not being applied to the warnings. I'll file a separate bug report for that.

See also T360668: Drop support for non-Codex message boxes (mw-message-box).