Need to load all the PO files for a locale
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Evergreen |
Fix Released
|
High
|
Unassigned |
Bug Description
Evergreen master / and all previous versions with web client
When configuring locales for the catalog and web client, we specify them in the separate Locations of eg_vhost.conf. One is /eg/ (which is where the catalog is) and /eg/staff/ (for the web client).
So for example, it would look something like:
<LocationMatch /eg/>
...
PerlAddVar OILSWebLocale "fr_ca"
PerlAddVar OILSWebLocale "/openils/
...
</LocationMatch>
<LocationMatch /eg/staff/>
...
PerlAddVar OILSWebLocale "fr_ca"
PerlAddVar OILSWebLocale "/openils/
...
</LocationMatch>
The problem manifests where only one of the PO files gets loaded up for the locale, and so either you end up with only opac strings (missing most of the menu translations and web client functionality, etc.), or you get only the webstaff strings (which leads to an untranslated catalog search in the web client and broken catalog views for cataloging).
Talking to berick on IRC, we isolated the problem to this line in Open-ILS/
next if grep { $_ eq $tag } keys %registered_
Commenting out this line allowed us to load more than one PO file to the locale and appeared to fix the loading issue on one of our test servers.
Reporting this bug separately from when it was uncovered in bug 1629078. Fixing this issue would be considered critical to having functional i18n for the web client.
tags: | added: apache i18n opac tpac webstaffclient |
Changed in evergreen: | |
milestone: | none → 3.0-beta2 |
status: | New → Confirmed |
Changed in evergreen: | |
importance: | Undecided → High |
Changed in evergreen: | |
status: | Fix Committed → Fix Released |
I have a branch for this here:
http:// git.evergreen- ils.org/ ?p=working/ Evergreen. git;a=shortlog; h=refs/ heads/user/ miker/lp- 1717777- load-all- PO-files
From the commit message:
We assumed only one file per locale, but apache <Location>s because are not independent WRT locale helpers in mod_perl, we need to load all files from all <Location> directives for a given locale.
NOTE: there is a risk of translation collision, where the same key string in two PO files have different translations, but in our context that is almost surely a mistake.