init-departments tool doesn't correctly handle multiple locales
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
unity-scope-click (Ubuntu) |
Confirmed
|
High
|
Unassigned |
Bug Description
According to the README file, init-departments tool should support multiple locales with single invocation like this:
init-departments DBFILE LOCALE1 [LOCALE2 ...]
but that doesn't work and just fetches names for current system locale (based on LANGUAGE) and stores them in the dbfile as LOCALE1, LOCALE2 etc. This is because requested locales are not really passed to the Index API calls and webclient code picks the language from LANGUAGE env var.
Also running the tool twice for each locale separately, e.g.
LANGUAGE=es_ES init-departments test.db es_ES
LANGUAGE=en_US init-departments test.db en_US
produces incorrect result for second invocation (en_US entries have same strings as es_ES), because of network caching.
The workaround for the above problems is to run the tool twice and clean network disk cache inbetween like this:
rm -rf ~/.cache/
LANGUAGE=es_ES init-departments test.db es_ES
rm -rf ~/.cache/
LANGUAGE=en_US init-departments test.db en_US
Suggested solution: this is internal tool, so changing Index and webclient API (also used by click scope) is not justified. Instead init-departments should just handle one language at a time (and it could internally set LANGUAGE env var). It should also disable network caching.
Changed in unity-scope-click (Ubuntu): | |
status: | Confirmed → Triaged |
importance: | Undecided → High |
Status changed to 'Confirmed' because the bug affects multiple users.