← Back to team overview

phatch-dev team mailing list archive

[Bug 304132] Re: Use the environment variable LANG to determine interface language.

 

** Changed in: phatch
       Status: Fix Committed => Fix Released

** Changed in: phatch
    Milestone: None => 0.2.1

-- 
Use the environment variable LANG to determine interface language.
https://bugs.launchpad.net/bugs/304132
You received this bug notification because you are a member of Phatch
Developers, which is subscribed to Phatch.

Status in Phatch = Photo & Batch!: Fix Released
Status in Debian GNU/Linux: Confirmed

Bug description:
Here I use Ubuntu written in English, but I want most of my programs to behave with Brazillian Portuguese
characteristics, so I have set the LC_* variables appropriately.

But currently, Phatch is using the LC_CTYPE to determine the Phatch Actions language. And as such, everything
in Phatch Actions wrongly appears in Portuguese for me, while the rest of the interface is correctly in English.


My LC_* environment variable are as follows:

LANG="en_US.UTF-8"

LC_CTYPE="pt_BR.UTF8"
LC_COLLATE="pt_BR.UTF8"
LC_NUMERIC="pt_BR.UTF8"
LC_MONETARY="pt_BR.UTF8"
LC_PAPER="pt_BR.UTF8"
LC_NAME="pt_BR.UTF8"
LC_ADDRESS="pt_BR.UTF8"
LC_TELEPHONE="pt_BR.UTF8"
LC_MEASUREMENT="pt_BR.UTF8"


>From 'man locale' and from the specification in:
http://opengroup.org/onlinepubs/007908799/xbd/envvar.html


LANG
    This variable determines the locale category for native language, local customs and coded character set in the absence of the LC_ALL and other LC_* (LC_COLLATE, LC_CTYPE, LC_MESSAGES, LC_MONETARY, LC_NUMERIC, LC_TIME) environment variables. This can be used by applications to determine the language to use for error messages and instructions, collating sequences, date formats, and so forth. 

LC_ALL
    This variable determines the values for all locale categories. The value of the LC_ALL environment variable has precedence over any of the other environment variables starting with LC_ (LC_COLLATE, LC_CTYPE, LC_MESSAGES, LC_MONETARY, LC_NUMERIC, LC_TIME) and the LANG environment variable. 

LC_CTYPE
    This variable determines the locale category for character handling functions, such as tolower(), toupper() and isalpha(). This environment variable determines the interpretation of sequences of bytes of text data as characters (for example, single- as opposed to multi-byte characters), the classification of characters (for example, alpha, digit, graph) and the behaviour of character classes. Additional semantics of this variable, if any, are implementation-dependent. 


Phatch is using LC_CTYPE to determine the language to use fot Phatch Actions, and this is improper.
Please use the appropriate LC_ALL variable, with a fallback to the LANG variable, so that is conforms
to the standard and works as expected!

A screenshot is attached.

Phatch is the only program in my system that presents this behaviour.
Using Phatch version 0.1.5, in Ubuntu Intrepid 64-bit.
Thank you a lot.