The goal of this is to create and use a common framework for testing translatable and translated strings. I went ahead and added the code for that at https://github.com/rhinstaller/translation-canary. This is applicable to a lot of our projects, and in fact the catalyst for this was a problem in blivet's translated strings, but I figured that I would start here.
The "translatable" tests are run after updating anaconda.pot. Any problems detected in the translatable strings raise an error before the strings are pushed to Zanata. Part of this was previously a test in gettext_warnings.sh.
The "translated" tests are run after create the dist tarball. Here I can make a stronger case for running the tests at a weird time instead of just as a regular make check kind of test: since Zanata is out of our control, the translated strings can change right up to the last minute, so to ensure that translated strings aren't busted in a way that will crash anaconda we need to run checks on the actual source distribution.
"translated" also includes a warning about languages with a translation level below a certain threshold, currently 10% of the strings. This one is a warning instead of an error since, I don't know, maybe it's ok to have a mostly untranslated language or two, and also the lack of anonymous Zanata pulls make it impossible for this one to do anything useful in Jenkins.
Possible discussion topics:
- Is this all just a terrible idea or what? - Is using a submodule appropriate or at all a thing we want to do? - Is causing 'make release' or pot-update to fail too big a hammer? Keeping in mind that the errors caught by these tests crash anaconda. Failing at pot-update might be too big a hammer. - better ideas for paths and names and such - ???
The other projects we have that could use this:
- blivet - pykickstart - blivet-gui - libbytesize - meh - initial-setup - system-config-kickstart
The tests already found errors in translations which would need to be fixed before creating another release:
- es: `Your current <b>%(product)s</b> software selection requires...` has an extra `<a>` tag - fr: `Your current <a href="" title="%(tooltip)s"><b>%(product)s</b> software selection</a> requires...` has an unclosed `<a>` tag - hr: `Your current <b>%(product)s</b> software selection requires...` has a stray `</a>` - zh_TW: `Your current <b>%(product)s</b> software selection requires...` has a stray `</a>`
Languages proposed for the currently very conservative chopping block:
- Turkish (tr): 9% translated - Farsi (fa): 4% translated - Latvian (lv): 4% translated - Asturian (ast): 3% translated - Bengali (bn): 3% translated - British English (en_GB): 3% translated - Sinhala (si): 3% translated - Albanian (sq): 2% translated - Greek (el): 2% translated - Maithili (mai): 2% translated - Afrikaans (af): 1% translated - Amharic (am): 1% translated - Belarusian (be): 1% translated - Bosnian (bs): 1% translated - Icelandic (is): 2% translated - Iloko (ilo): 1% translated - Macedonian (mk): 1% translated - Malay (ms): 1% translated - Nepali (ne): 1% translated - Northern Sotho (nso): 1% translated - Slovenian (sl): 1% translated - Swiss German (de_CH): 1% translated - Tajik (tg): 1% translated - Urdu (ur): 1% translated - Vietnamese (vi): 1% translated - Welsh (cy): 1% translated - Zulu (zu): 1% translated
anaconda-patches@lists.fedorahosted.org