Closed amercader closed 2 weeks ago
Didn't get a chance to test this today as the CI tooling was out of date and had to be updated first. Will get to this tomorrow.
@amercader Looks good, but there's a failure in the tests under pypy. Looks like the tests might be depending on the ordering of the translation list, https://github.com/python-babel/flask-babel/actions/runs/9577423964/job/26405619814
When translations from different catalogs are being merged, there is a workaround to copy the
plurals()
function from the catalog to the combinedtranslations
object. If the locale catalog doesn't exist for a particular domain, a default value is copied, overriding the properplurals()
function. This results in the plural version of a string not being translated for languages with different plural values.See for instance
test_gettext.py::test_plurals_different_domains
: the Japanese locale exists only in themessages
domain (translations
folder) but not on themyapp
one (translations_different_domain
folder).First reported in https://github.com/ckan/ckan/issues/8258