Hey, Le jeudi 02 août 2012, à 21:14 +0200, Dominique Leuenberger a écrit :
Hi all,
While debugging https://bugzilla.novell.com/show_bug.cgi?id=617751 I ran across an issue with our bundle-lang-<x>-<y> packages and the way python gettext work.
In order for bundle-lang-<x>-<y> not to conflict with <package>-lang, the bundle moves the files to /usr/share/locale-bundle (as opposed to /usr/share/locale, which is the default location).
For C - Programs, this seems to be all fine, and a bundle-lang being installed helps translating the program.
As the above bug indicates, this did not work for system-config-printer (I can reproduce with other python apps as well, e.g gnome-tweak-tools).
The issue lies in python's gettext, where you can either pass a localedir to gettext.bindtextdomain, or you can omit it (which defaults, you guess, to sys.prefix/share/locale)
Now, I see several options to tackle such an issue: - Do not add -lang files of python apps to bundle-lang-<x>-<y> packages
Workaround, probably okay for 12.2.
- Do not move files to /usr/share/locale-bundle
Baaad because of file conflicts :-)
- Fix pythons gettext
That's what we want, I guess. It seems patching the find method in gettext.py shouldn't be too hard. We could add something like: if localedir in [None, _default_localedir]: _default_bundlelocaledir = os.path.join(sys.prefix, 'share', 'locale-bundle') bundle = find(domain, localedir=_default_bundlelocaledir, languages=languages, all=all) if bundle is not None: return bundle (obviously, bonus point for declaring _default_bundlelocaledir at the top of the file, where _default_localedir is declared) Cheers, Vincent -- Les gens heureux ne sont pas pressés. -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org