Bug Description

Binary package hint: software-store

if the cache was geneated with a english locale and then is used by a user with german locale, the cache will be english only. this needs to be fixed by storting a language attribute in the cache and forcing a re-generation (or a generation of a new one) if they don't match.

Would it make sense to keep separate caches for each language that is used? That way if a machine is frequently used by two or more administrators that use different languages, they won't constantly be waiting for regeneration of the cache that was generated by the other.

(I guess if the other administrator actually installed or removed anything, the cache in your language would still need regenerating, but at least it would save having to regenerate it if they just browsed.)

This bug has been around now for a very long time and there hasn't been any activity on this in the recent past so I'd like to get your attention on this issue again.

It's very confusing to new users who might NOT know how to display the translated package descriptions and it also destroys all the effort the translation teams put into translating package descriptions.

Please fix this bug asap. It would be really nice to actually be able to see translated package descriptions on a fresh install of Ubuntu, at least in Oneiric.

By the way: The workaround above doesn't work in Natty anymore. I tried on two fresh installs and even after running the command I don't see the translated package descriptions although translations exist. The short descriptions appear translated though. Maybe a different bug?

= Fresh install with network =
* all apps are translated
* translated package descriptions are available in /var/lib/apt/lists
* translated packages descriptions are *not* displayed until the first "apt-get update" *or* "rm -f /var/cache/apt/*.bin" (the binary package cache is generated/copied with LANG=C for some reason?) - this appears to be a more general problem with apt/the way we install, I investigate further

It turns out that the problem with the missing translations in the apt cache is actually triggered by aptdaemon. It gets loaded on demand by dbus activation but its not getting any language environment from there. It rebuilds the apt cache but without language information this will lead to a english language only cache.

I never changed locale but changed regional settings. And I also have the same problem. The problem also applies to Update manager and even authorization windows once in a while pulls out a message in the regional settings language rather than GUI language

Some thoughts about this:
- we could do build a language specific db only o demand, this would require a aptdaemon call to do that
- we could build multple dbs for each langauge at install time of app-install-data-ubuntu
- we would need to add a dpkg trigger somehow to add/remove DBs when languages gets added/removed

For building the language-specific DB on demand, I've sketched a progress window. <https://wiki.ubuntu.com/SoftwareCenter#Launching> I'm not sure of this presentation, though. Embedding the progress display in the USC window (basically replacing the usual launch spinner with a determinate progress bar) would be more elegant, because it would involve fewer windows. But it might lead people to be more frustrated with USC itself.

In any case, generating the DB on launch would be the last resort, used only if the app-install-data-ubuntu and language pack triggers haven't already produced a database in your current language.

If there are multiple languages supported s-c buids a xapian index for each of them (that takes some time of course).
That works with the branch and if you run:
$ rm -rf ./data/xapian
$ PYTHONPATH=. utils/update-software-center --local
$ ./software-center

What is missing is:
- cleanup when languages get removed
- ensuring that there is always a default fallback DB
- ensure to not rebuild if there are no changes in the app-install-data
- robustness

But the biggest problem is that the package descriptions are only availalbe in the system default language. That is a problem
with "apt" and not software-center. It download only that. I add a apt task to allow it having a option to download all supported
languages.

System installed in English, but later played with locale and/or GUI regional settings. After a while, I reverted everything to English, but software-center still used French for the short descriptions of packages (and English for the full descriptions).

I deleted "/var/cache/software-center/" and "/var/cache/apt-xapian-index/", which made software-center crash.

I just met with the same issue in an Ubuntu custom built on top of Ubuntu LTS : Edition Precise, 12.04.4. (an LTS perfectly up to date). I was about to make a screen shot when I met with the bug. Here is a pic:http://meets.free.fr/images/USC-en-fr.png

I will add an attachement to present the environment variables and the locales. Then there is also:
$ echo $LANG
en_US.UTF-8
$

It would be nice if two languages or more can be installed in the system without USC confusing which language to pick when displaying descriptions.