Allow finding locale in system location on Linux
Bug #542429 reported by
Toshio Kuratomi
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
QBzr |
Fix Released
|
Medium
|
Toshio Kuratomi |
Bug Description
On Linux, locale files should be placed in /usr/share/locale/ to conform to the FHS http://
I'll attach a patch which allows qbzr to look for the locale files in that location if they aren't found in the directory relative to the install. This is backwards compatible (as the current location is looked for first) but allows Linux distributions to move the locale directory under /usr/share/ if they choose.
Related branches
Changed in qbzr: | |
assignee: | Alexander Belchenko (bialix) → Toshio Kuratomi (toshio) |
status: | Confirmed → Fix Released |
To post a comment you must log in.
Toshio Kuratomi пишет: launchpadlibrar ian.net/ 41366002/ qbzr-localedir. patch
> ** Attachment added: "Short patch to check for locales in /usr/share/locale if they don't exist in the default location relative to the plugin installation"
> http://
This patch makes sense only for Linux. It definitely won't for Windows.
And I'm not sure how it will work for Mac OS X.
Also there is note in the documentation for Python gettext module:
The default locale directory is system dependent; for example, on RedHat share/locale. For this reason, it is
Linux it is /usr/share/locale, but on Solaris it is /usr/lib/locale. The
gettext module does not try to support these system dependent defaults;
instead its default is sys.prefix/
always best to call bindtextdomain() with an explicit absolute path at
the start of your application.
So, at least I think we should change the preferences to
/usr/share/locale only if we on Linux. E.g. there should be condition
like that
if sys.platform == 'linux2':
...