← Back to team overview

openshot.developers team mailing list archive

[Bug 650910] Re: Localization does not respect LC_MESSAGES

 

I rechecked some code and I think the correct fix is to change file
openshot/language/Language_Init.py
and the fix is to replace line
                lc, encoding = locale.getdefaultlocale()
with
                lc, encoding = locale.getlocale(locale.LC_MESSAGES)

Rationale:

It seems that return value of
                locale.getdefaultlocale()
is identical to
                locale.getlocale(locale.LC_CTYPE)
and as such it should not be used for localization messages as I explained earlier.

Note that there's an error in my comment #14 where I claim that
locale.getlocale(locale.LC_MESSAGES) would return only locale. Instead,
it always returns locale AND encoding, just like
locale.getdefaultlocale().

-- 
You received this bug notification because you are a member of OpenShot
Developers, which is subscribed to OpenShot Video Editor.
https://bugs.launchpad.net/bugs/650910

Title:
  Localization does not respect LC_MESSAGES

Status in OpenShot Video Editor:
  New

Bug description:
  Openshot Video Editor incorrectly uses Finnish user interface localization in following environment:

LC_ADDRESS=fi_FI.UTF-8
LC_COLLATE=fi_FI.UTF-8
LC_CTYPE=fi_FI.UTF-8
LC_MEASUREMENT=fi_FI.UTF-8
LC_MESSAGES=en_DK.UTF-8
LC_MONETARY=fi_FI.UTF-8
LC_NAME=fi_FI.UTF-8
LC_NUMERIC=en_DK.UTF-8
LC_PAPER=fi_FI.UTF-8
LC_TELEPHONE=fi_FI.UTF-8
LC_TIME=en_DK.UTF-8

As far as I know, LC_MESSAGES should specify user interface text language.





References