New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Do not base interface language on LC_TIME #230
Comments
Hi, Thanks |
It is working for me (I've asked others in #225 to test) - if it is working for others then I can create PR, but I do not know your app well so there might be other points to be fixed. For me I get what I want - interface in English and time in 24h format. |
After their confirmation, please send a PR. Thanks |
The patch looks like the right direction to me. |
I solved the problem by specifying both the locale and time locale. I want safeeyes to use a locale that is not my system locale, so the aostruszka's patch doesn't meet my requirements. However, if I wasn't able to set the locale I need, I would be glad to use @aostruszka 's patch. |
I find that this should be configurable at the very least by editing a .config file, not the program's source code. |
Okay, I will follow from this and fix the issue with a configurable alternative. |
@leedoyle for a workaround you could start safeeyes like |
@hartwork well, here's how I did it (quick and dirty)
|
@leedoyle You can test what results you'll get by playing with python shell. Just start it with different values for LANG/LC_TIME (e.g.
and observe the values of LC_MESSAGES and LC_TIME. For example I have LANG=en_US.utf8 (which is the system setting). This governs all categories unless overridden by more specific settings - and in my case I set LC_CTYPE, LC_COLLATE and LC_TIME to pl_PL.utf8. In that case LC_MESSAGES gets value from LANG (it could be overridden with explicit LC_MESSAGES= assignment) and LC_TIME from explicit setting and I have interface in English but time in 24h (instead of AM/PM). So if you have system locale X then you should have LANG=X. If you want safeeyes to be in:
So for me this works as I expect. LANG/LC_* settings configure locale for my whole session and safeeyes (with the patch) adapt to it. However if you want safeeyes to have different settings from the rest of your session then you would need to ask @slgobinath to implement it :). Best regards |
Hi all,
I find it more generic and the standard way to go. |
With the fix in, I won't need another way to configure locales, personally. |
Thanks for all your support. I have released Safe Eyes 2.0.3 including this fix. |
@hartwork Please note that I have immediately released 2.0.4 to fix another bug I have noticed after releasing 2.0.3. |
@slgobinath thanks, bumped to 2.0.4 now in Gentoo. |
SafeEyes/safeeyes/Utility.py
Line 100 in ee078e5
I've got maybe non-standard locale settings since I'm from Poland but I prefer to have interface in English. So I have LANG/LANGUAGE set to en_US.utf8/en_US but I set "LC_CTYPE=pl_PL.utf8 LC_COLLATE=pl_PL.utf8" in my dot files. In default settings generated by the system (/etc/default/locale) I see also LC_TIME set to pl_PL.utf8 so I can change that but actually I prefer having 24h clock instead of AM/PM.
So I'd like to ask for possibility to:
Best regards
Andrzej
PS. If you agree that such modification make sense (to me it does - since MESSAGES seems to be more specific to tell what kind of language I want to see in the interface) then it looks to me like the following patch achieves both points:
The text was updated successfully, but these errors were encountered: