Page MenuHomePhabricator

disallowBlankTranslations banana rule is enforced although empty translations can be valid
Open, Needs TriagePublic

Description

https://gerrit.wikimedia.org/r/#/c/331689/ exports a json with empty message keys, breaking banana tests

17:15:30 Running "banana:Material" (banana) task
17:15:30 >> The "ext" translation has 2 blank translations:
17:15:30 >> The translation of "material-desc" is blank.
17:15:30 >> The translation of "material-guest" is blank.
17:15:30 Warning: Task "banana:Material" failed. Use --force to continue.

The export script should ignore empty message keys, empty means here after trim and also with nbsp (the real one, not  ), because with T155160 a non-empty string was detected.

Details

Event Timeline

Change 361213 had a related patch set uploaded (by Umherirrender; owner: Umherirrender):
[mediawiki/extensions/Translate@master] Skip blank translation on export

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

Change 361213 had a related patch set uploaded (by Umherirrender; owner: Umherirrender):
[mediawiki/extensions/Translate@master] Skip blank translation on export

This appears to be an incorrect "solution". Blank messages can be correct translations, see T59238#611638.

Change 361213 abandoned by Umherirrender:
Skip blank translation on export

Reason:
per comment

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

Than the default of disallowBlankTranslations in banana is wrong or not useful for use in mediawiki.

So change disallowBlankTranslations in banana and release a new version and use it everywhere?
Or set it to false in each repository using banana >= 0.3.0

It was set back in 0.3.0 with [1]
The also changed disallowDuplicateTranslations and disallowUnusedTranslations are already reverted back to false in 0.4.0 [2][3]

[1] https://github.com/wikimedia/grunt-banana-checker/commit/e4f495a7dc78ba1df135ad26ae60c538b96f003e
[2] https://github.com/wikimedia/grunt-banana-checker/commit/a9d3aaddc3df9b9f933340d55d0b337a12964eae
[3] https://github.com/wikimedia/grunt-banana-checker/commit/71880f9b7da060518abb388194fdbb9de90e6334

Nemo_bis renamed this task from l10n-bot/translatewiki.net should not export messages not matching banana rules (empty keys) to disallowBlankTranslations banana rule is enforced although empty translations can be valid.Oct 15 2017, 7:27 PM
Nemo_bis edited projects, added I18n; removed translatewiki.net.