Page MenuHomePhabricator

Banana checker should not block CI on issues with translated content
Closed, ResolvedPublic

Description

Translated content (i.e. anything outside of en/qqq.json) is effectively owned by TranslateWiki and their bot which self +2s. Flagging issues with the data and blocking CI (e.g. trailing whitespace) is useless as the data should only be fixed upstream.
At most we should show a warning when such issues are detected.

Event Timeline

This appears to be a new issue with grunt-banana-checker 0.12.0, which turned on whitespace checks by default for all languages.

CI is failing on all patches in CentralAuth extension after https://gerrit.wikimedia.org/r/c/mediawiki/extensions/CentralAuth/+/1030782.

Running "banana:SpecialCentralAuth" (banana) task
>> The "zh-hant" translation has 1 translation with trailing whitespace:
>> The translation of "apihelp-query+globaluserinfo-example-2" has trailing whitespace.
Warning: Task "banana:SpecialCentralAuth" failed. Use --force to continue.

Interestingly, the translation in question has been unchanged since 2014.

https://translatewiki.net/w/i.php?title=MediaWiki:Apihelp-query%2Bglobaluserinfo-example-2/zh-hant&action=history.

With it containing the trailing space since that same revision.

This suggests there is an additional issue where translatewiki, starting this month?, is now exporting trailing spaces into i18n commits where previously it was somehow trimmed away?

Change #1031467 had a related patch set uploaded (by Krinkle; author: SD0001):

[mediawiki/extensions/Scribunto@master] Revert "Localisation updates from https://translatewiki.net."

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

Change #1031467 merged by jenkins-bot:

[mediawiki/extensions/Scribunto@master] Revert "Localisation updates from https://translatewiki.net."

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

Change #1031852 had a related patch set uploaded (by Krinkle; author: Krinkle):

[mediawiki/extensions/CentralAuth@master] Revert "build: Updating grunt-banana-checker to 0.12.0"

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

Change #1031852 merged by jenkins-bot:

[mediawiki/extensions/CentralAuth@master] Revert "build: Updating grunt-banana-checker to 0.12.0"

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

This suggests there is an additional issue where translatewiki, starting this month?, is now exporting trailing spaces into i18n commits where previously it was somehow trimmed away?

It has always exported them, but the recent dependency upgrades auto-fixed them, and the localisation exports are just restoring them. For example:

They have always been exported, but last week a different bot removed them from the JSON files: https://gerrit.wikimedia.org/r/c/mediawiki/extensions/DiscussionTools/+/1029837

jforrester merged https://gitlab.wikimedia.org/repos/ci-tools/banana-checker/-/merge_requests/13

Downgrade errors with translated data (in default config) to warnings

Fixed when updating grunt-banana-checker to 0.13.0