Bug 396010 - Krita defaults to fallback locale instead of preferred locale
Summary: Krita defaults to fallback locale instead of preferred locale
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: General (other bugs)
Version First Reported In: 4.1.0
Platform: macOS (DMG) macOS
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-06-30 06:06 UTC by Pellaeon Lin
Modified: 2018-07-19 14:26 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Pellaeon Lin 2018-06-30 06:06:47 UTC
As titled, this is the first time I installed Krita, and when I opened it, it showed a Korean interface.

My system locale settings is:
1. Chinese Traditional (Taiwan) (default, highest priority)
2. English
3. Chinese Simplified
4. Korean

Seems that Krita automatically uses the least preferred language. I'm suspecting that this might be involved with how Qt handles fallback locales? https://doc.qt.io/qt-5/internationalization.html (I've never programmed in Qt)

Also, as a test, I removed 4. Korean locale from my system, and Krita now shows English.

I'm sure Krita 4.1.0 ships with Chinese Traditional locale, because on Linux it shows Chinese Traditional without problem.

I'd be happy to help triage the bug, please instruct me on how to do that.

Thanks!
Comment 1 Halla Rempt 2018-06-30 07:43:37 UTC
Does this happen if there isn't an klanguageoverriderc present? (I posted the location for that on your reddit question...)
Comment 2 Pellaeon Lin 2018-06-30 09:52:59 UTC
Yes, this will happen without klanguageoverriderc present, when my system locale setting is:
1. Chinese Traditional (Taiwan) (default, highest priority)
2. English
3. Chinese Simplified
4. Korean
Comment 3 Halla Rempt 2018-07-10 14:10:53 UTC
Hm, I setup my system like

French
English
German
Japanese

And Krita had some parts in German, but most was in French
Comment 4 Halla Rempt 2018-07-10 15:25:53 UTC
I suspect it's a bug in ki18n: https://bugs.kde.org/show_bug.cgi?id=396370 , but I'm trying to work around it.
Comment 5 Halla Rempt 2018-07-10 17:48:30 UTC
Git commit 3462dbffc43400df0ea79a4000116665ac21aaf7 by Boudewijn Rempt.
Committed on 10/07/2018 at 17:48.
Pushed by rempt into branch 'master'.

Fix converting Qt's ui languages to ki18n language codes

Also, on macOS, only set one language; ki18n gets horribly
confused and takes random translations if there's more than
one language set with setLanguages.

M  +52   -33   krita/main.cc

https://commits.kde.org/krita/3462dbffc43400df0ea79a4000116665ac21aaf7
Comment 6 Halla Rempt 2018-07-11 08:12:43 UTC
Git commit c344de335326efeb0e9b0821e49870569c41f9b2 by Boudewijn Rempt.
Committed on 11/07/2018 at 08:11.
Pushed by rempt into branch 'krita/4.1'.

Fix converting Qt's ui languages to ki18n language codes

Also, on macOS, only set one language; ki18n gets horribly
confused and takes random translations if there's more than
one language set with setLanguages.

M  +52   -33   krita/main.cc

https://commits.kde.org/krita/c344de335326efeb0e9b0821e49870569c41f9b2
Comment 7 Andrey 2018-07-19 11:30:46 UTC
Git commit 7c2b36c32109ba51590352361eaa0faa09ef486d by Andrey Kamakin, on behalf of Boudewijn Rempt.
Committed on 19/07/2018 at 11:14.
Pushed by akamakin into branch 'akamakin/T8628-multithreading-optimization'.

Fix converting Qt's ui languages to ki18n language codes

Also, on macOS, only set one language; ki18n gets horribly
confused and takes random translations if there's more than
one language set with setLanguages.

M  +52   -33   krita/main.cc

https://commits.kde.org/krita/7c2b36c32109ba51590352361eaa0faa09ef486d
Comment 8 Pellaeon Lin 2018-07-19 14:26:35 UTC
Thank you all for fixing this so quickly! Many kudos.