← Back to team overview

touch-packages team mailing list archive

[Bug 1413644] Re: init-departments tool doesn't correctly handle multiple locales

 

Status changed to 'Confirmed' because the bug affects multiple users.

** Changed in: unity-scope-click (Ubuntu)
       Status: New => Confirmed

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to unity-scope-click in
Ubuntu.
https://bugs.launchpad.net/bugs/1413644

Title:
  init-departments tool doesn't correctly handle multiple locales

Status in unity-scope-click package in Ubuntu:
  Confirmed

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/init-departments
  LANGUAGE=es_ES init-departments test.db es_ES
  rm -rf ~/.cache/init-departments
  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.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/unity-scope-click/+bug/1413644/+subscriptions


References