today I was doing some tests when I tried to change the language of
Bazaar Explorer. I was trying to change from Portuguese (BR) to English.
When I clicked on the "English" option I got the usual message box
saying to restart bazaar. But after I close and reopen it, the PT-BR
language is still applied. I have tried this several times, as well as
switching to other languages as well. PT-BR is the standard on my system.
How can I get some more information on this issue?
Check bazaar.conf for language setting. Has it set to correct language
code (en)?
Also, if you look at explorer/lib/i18n.py you may find the following code:
def get_current_locale():
if not os.environ.get('LANGUAGE'):
from bzrlib import config
lang = config.GlobalConfig().get_user_option('language')
if lang:
os.environ['LANGUAGE'] = lang
return lang
if sys.platform == 'win32':
_check_win32_locale()
for i in ('LANGUAGE','LC_ALL','LC_MESSAGES','LANG'):
lang = os.environ.get(i)
if lang:
return lang
return None
It seems like we force specific language from bazaar.conf only if user
does not have LANGUAGE environment variable set. Do you have this
environment variable set? Is it normal behavior for your OS?
Maybe we need to omit the check for presence of LANGUAGE, and always use
the settings from bazaar.conf. If so then please file a bug report
against bzr-explorer.
--
All the dude wanted was his rug back
Maybe we need to omit the check for presence of LANGUAGE, and always use the settings from bazaar.conf. If so then please file a bug report against bzr-explorer.
Maybe we need to omit the check for presence of LANGUAGE, and always use the settings from bazaar.conf. If so then please file a bug report against bzr-explorer.
Maybe we need to omit the check for presence of LANGUAGE, and always use the settings from bazaar.conf. If so then please file a bug report against bzr-explorer.
No, never.
> In my opinion, this may be better for get_current_locale:
>
> (assuming that /bazaar.conf: language/ may be unset)
>
> 1- if language is set in bazaar.conf, use it
>
> 2- else, get it from enviroment variable
>
> 3- or otherwise get it from the system
OK, that's almost how it works now.
> 4- do not set /bazaar.conf: language/ if it wasn't set (and bazaar
> absorbs when user changes his system's locale; but if he changed it
> before to something different, he probably may not complain about bazaar
> being different)
I don't understand this.
> I can change the code to prefer the user settings from the env. var.,
> but this will let us with the small issue (?) for step 4 above.
>
> I will file the bug.
OK, we have already had your patch merged. I still don't understand your
comment about 4.
No, never.Maybe we need to omit the check for presence of LANGUAGE, and always use the settings from bazaar.conf. If so then please file a bug report against bzr-explorer.I have a question: if I never changed the language setting in bzr-explorer, would it write "language = ..." on bazaar.conf (and other language configuration files)? In the first run or absence of it, for example?
4- do not set /bazaar.conf: language/ if it wasn't set (and bazaar absorbs when user changes his system's locale; but if he changed it before to something different, he probably may not complain about bazaar being different)
I don't understand this.
I can change the code to prefer the user settings from the env. var., but this will let us with the small issue (?) for step 4 above.
I will file the bug.
OK, we have already had your patch merged. I still don't understand your comment about 4.
Yes, bzr-explorer will use system settings, unless we have language set
in bazaar.conf. This is intended behavior. If I want to force explorer
to use some specific language for testing or if I want to learn new
language :-) then explorer should follow my wish. If I change the system
settings explorer won't notice this, because it doesn't remember what
did you have before.
> On the other hand, bazaar won't reflect changes in system localization
> if the used changed language configuration before. The user will have
> "language=..." in his bazaar configuration files that overrides the
> system language.
Yes, that's correct. Once you have selected language, there is no way to
come back, you have to delete this option (manually).