Comment 1 for bug 1675216

Revision history for this message
Ben Shum (bshum) wrote :

So, using pofilter here seems to potentially be a good detection for problems.

For example, running "pofilter -t printf tpac tpac-check" in Open-ILS/build/i18n/po folder, gets me just the printf check against all the tpac template files and puts them in a new folder called tpac-check.

Checking the output in that folder, I get example issues like in cs-CZ.po:

# (pofilter) printf: Missing printf variable: %1
#. (facet.cmf.label)
#: ../../Open-ILS/src/templates/opac/parts/result/facets.tt2:71
msgid "Show Fewer %1 Entries"
msgstr "Zobrazit méně údajů %"

This helps us to catch potential breakage in the template file where the variables are not set right.

pofilter has 40+ tests and checks that we can run through to help us validate and test i18n strings for problems, with stuff like whitespace checks, variables, punctuation, capitalization, etc.

I'm also seeing lots of false positives in the test runs where it looks like it might be okay, and the test is being too aggressive. It'll require both input from the developers who run the validations, and also the translators to assist with fixes. Perhaps this is a good opportunity to teach translators the approaches available to validate their strings. Alternatively, use of certain translation tools like Pootle could allow us to include pofilter checks natively as part of the translation interface, and have it more interactive experience for translators downstream. http://docs.translatehouse.org/projects/pootle/en/latest/features/checks.html