CKAN version
2.8.5->master.
Probably introduced in #4594.
Describe the bug
ckan.models.license:LicenseRegister.load_licenses translates the license text, which is then cached as a classmember in the package class. (as called from ckan.lib.helpers.license_options)
This cache is for the lifetime of uwsgi process, not the request.
The license options should be translated at the helper or the template level, and not cached between multiple requests, unless the cache is keyed to the request language.
Steps to reproduce
On a site with multiple localizations, restart ckan to clear any caches, then request /[lang]/dataset/edit/[name] several times to make sure all wsgi processes have loaded the licenses.
Then visit /en/dataset/edit/[name]` and the licenses will be in the previous localization.
Expected behavior
Each license popup would be rendered in the correct localization.
CKAN version
2.8.5->master.
Probably introduced in #4594.
Describe the bug
ckan.models.license:LicenseRegister.load_licenses translates the license text, which is then cached as a classmember in the package class. (as called from ckan.lib.helpers.license_options)
This cache is for the lifetime of uwsgi process, not the request.
The license options should be translated at the helper or the template level, and not cached between multiple requests, unless the cache is keyed to the request language.
Steps to reproduce
On a site with multiple localizations, restart ckan to clear any caches, then request
/[lang]/dataset/edit/[name]several times to make sure all wsgi processes have loaded the licenses.Then visit
/en/dataset/edit/[name]` and the licenses will be in the previous localization.Expected behavior
Each license popup would be rendered in the correct localization.