[frameworks-kxmlgui] [Bug 464694] Mixed language in UI when using application-specific override language on Windows

2023-02-27 Thread Ingo Klöcker
https://bugs.kde.org/show_bug.cgi?id=464694

Ingo Klöcker  changed:

   What|Removed |Added

   Version Fixed In||5.104

-- 
You are receiving this mail because:
You are watching all bug changes.

[frameworks-kxmlgui] [Bug 464694] Mixed language in UI when using application-specific override language on Windows

2023-02-27 Thread Ingo Klöcker
https://bugs.kde.org/show_bug.cgi?id=464694

Ingo Klöcker  changed:

   What|Removed |Added

 Resolution|--- |FIXED
 Status|ASSIGNED|RESOLVED

--- Comment #12 from Ingo Klöcker  ---
This issue is now fixed in ki18n and in the code generated by
ecm_create_qm_loader for libraries using Qt's translation functionality.

-- 
You are receiving this mail because:
You are watching all bug changes.

[frameworks-kxmlgui] [Bug 464694] Mixed language in UI when using application-specific override language on Windows

2023-02-27 Thread Ingo Klöcker
https://bugs.kde.org/show_bug.cgi?id=464694

--- Comment #11 from Ingo Klöcker  ---
Git commit bc92a8611b2c93ec0c4b3ae13b7b8c021845f483 by Ingo Klöcker, on behalf
of Ingo Klöcker.
Committed on 27/02/2023 at 08:15.
Pushed by kloecker into branch 'master'.

Load translations for application-specific language also on Win and Mac

On Windows and Apple OSs, we cannot use QLocale::system() because on
those OSs Qt ignores LANGUAGE (which is set by kxmlgui to the
application-specific languages configured by the user). We need to
check LANGUAGE ourselves.

M  +24   -4modules/ECMQmLoader.cpp.in

https://invent.kde.org/frameworks/extra-cmake-modules/commit/bc92a8611b2c93ec0c4b3ae13b7b8c021845f483

-- 
You are receiving this mail because:
You are watching all bug changes.

[frameworks-kxmlgui] [Bug 464694] Mixed language in UI when using application-specific override language on Windows

2023-02-27 Thread Ingo Klöcker
https://bugs.kde.org/show_bug.cgi?id=464694

--- Comment #10 from Ingo Klöcker  ---
Git commit 7cdbd9789d3b7beeb5acda22c3e940f0235f438a by Ingo Klöcker, on behalf
of Ingo Klöcker.
Committed on 27/02/2023 at 08:19.
Pushed by kloecker into branch 'kf5'.

Load translations for application-specific language also on Win and Mac

On Windows and Apple OSs, we cannot use QLocale::system() because on
those OSs Qt ignores LANGUAGE (which is set by kxmlgui to the
application-specific languages configured by the user). We need to
check LANGUAGE ourselves.


(cherry picked from commit bc92a8611b2c93ec0c4b3ae13b7b8c021845f483)

M  +24   -4modules/ECMQmLoader.cpp.in

https://invent.kde.org/frameworks/extra-cmake-modules/commit/7cdbd9789d3b7beeb5acda22c3e940f0235f438a

-- 
You are receiving this mail because:
You are watching all bug changes.

[frameworks-kxmlgui] [Bug 464694] Mixed language in UI when using application-specific override language on Windows

2023-02-27 Thread Bug Janitor Service
https://bugs.kde.org/show_bug.cgi?id=464694

--- Comment #9 from Bug Janitor Service  ---
A possibly relevant merge request was started @
https://invent.kde.org/frameworks/extra-cmake-modules/-/merge_requests/342

-- 
You are receiving this mail because:
You are watching all bug changes.

[frameworks-kxmlgui] [Bug 464694] Mixed language in UI when using application-specific override language on Windows

2023-02-21 Thread Ingo Klöcker
https://bugs.kde.org/show_bug.cgi?id=464694

--- Comment #8 from Ingo Klöcker  ---
Git commit fb5d9bdbdc6fb832c53078cd72a6b4b62660c9e6 by Ingo Klöcker.
Committed on 21/02/2023 at 16:26.
Pushed by kloecker into branch 'kf5'.

Load translations for application-specific language also on Win and Mac

On Windows and Apple OSs, we cannot use QLocale::system() because on
those OSs Qt ignores LANGUAGE (which is set by kxmlgui to the
application-specific languages configured by the user). We need to
check LANGUAGE ourselves.

(cherry picked from commit fb7d5e2a0433f171229ef58393cbfbf0e23ab2b6)

M  +20   -2src/i18n/main.cpp

https://invent.kde.org/frameworks/ki18n/commit/fb5d9bdbdc6fb832c53078cd72a6b4b62660c9e6

-- 
You are receiving this mail because:
You are watching all bug changes.

[frameworks-kxmlgui] [Bug 464694] Mixed language in UI when using application-specific override language on Windows

2023-02-21 Thread Ingo Klöcker
https://bugs.kde.org/show_bug.cgi?id=464694

--- Comment #7 from Ingo Klöcker  ---
Git commit fb7d5e2a0433f171229ef58393cbfbf0e23ab2b6 by Ingo Klöcker.
Committed on 21/02/2023 at 16:17.
Pushed by kloecker into branch 'master'.

Load translations for application-specific language also on Win and Mac

On Windows and Apple OSs, we cannot use QLocale::system() because on
those OSs Qt ignores LANGUAGE (which is set by kxmlgui to the
application-specific languages configured by the user). We need to
check LANGUAGE ourselves.

This MR replaces kxmlgui!145. It fixes the bug for the translations provided by
Qt. To fix the bug also for translations coming from .qm files in KF libraries
a similar change in ecm is needed.

I have tested this MR (for KF5) with Kate on Windows.

M  +20   -2src/i18n/main.cpp

https://invent.kde.org/frameworks/ki18n/commit/fb7d5e2a0433f171229ef58393cbfbf0e23ab2b6

-- 
You are receiving this mail because:
You are watching all bug changes.

[frameworks-kxmlgui] [Bug 464694] Mixed language in UI when using application-specific override language on Windows

2023-01-30 Thread Bug Janitor Service
https://bugs.kde.org/show_bug.cgi?id=464694

--- Comment #6 from Bug Janitor Service  ---
A possibly relevant merge request was started @
https://invent.kde.org/frameworks/extra-cmake-modules/-/merge_requests/333

-- 
You are receiving this mail because:
You are watching all bug changes.

[frameworks-kxmlgui] [Bug 464694] Mixed language in UI when using application-specific override language on Windows

2023-01-30 Thread Bug Janitor Service
https://bugs.kde.org/show_bug.cgi?id=464694

--- Comment #5 from Bug Janitor Service  ---
A possibly relevant merge request was started @
https://invent.kde.org/frameworks/ki18n/-/merge_requests/78

-- 
You are receiving this mail because:
You are watching all bug changes.

[frameworks-kxmlgui] [Bug 464694] Mixed language in UI when using application-specific override language on Windows

2023-01-30 Thread Ingo Klöcker
https://bugs.kde.org/show_bug.cgi?id=464694

--- Comment #4 from Ingo Klöcker  ---
Git commit b614a60a2e5bcca6c40675e3a1a9de3000911066 by Ingo Klöcker, on behalf
of Ingo Klöcker.
Committed on 30/01/2023 at 14:35.
Pushed by kloecker into branch 'fix-language-override-on-win-and-mac'.

Load translations for application-specific language also on Win and Mac

On Windows and Apple OSs, we cannot use QLocale::system() because on
those OSs Qt ignores LANGUAGE (which is set by kxmlgui to the
application-specific languages configured by the user). We need to
check LANGUAGE ourselves.

M  +19   -1src/i18n/main.cpp

https://invent.kde.org/frameworks/ki18n/commit/b614a60a2e5bcca6c40675e3a1a9de3000911066

-- 
You are receiving this mail because:
You are watching all bug changes.

[frameworks-kxmlgui] [Bug 464694] Mixed language in UI when using application-specific override language on Windows

2023-01-27 Thread Ingo Klöcker
https://bugs.kde.org/show_bug.cgi?id=464694

--- Comment #3 from Ingo Klöcker  ---
Analysis:
* kxmlgui prepends the application-specific languages to the LANGUAGE
environment variable.
* ki18n uses QLocale::system().name() to know which translations to load.
* This works on Unix because Qt considers LANGUAGE when (re-)initializing the
system locale.
* This doesn't work on Windows because Qt completely ignores LANGUAGE on
Windows. On Windows, Qt does consider LANG, but unfortunately LANG is stored in
a function static, i.e. once it has been initialized changes to LANG will be
ignored. Therefore, my naïve attempt with
https://invent.kde.org/frameworks/kxmlgui/-/merge_requests/145 doesn't work.

The result is that on Windows all .qm files are loaded for the system language
and not for the application-specific language.

Possible (Windows-specific) solutions:
a) Replace all usage of QLocale::system().name() in ki18n and in the
ECM-generated qm loader with QLocale(first language in LANGUAGE).name(). This
could be a performance problem if creating a custom QLocale is very slow.
(QLocale::system() is a singleton.)
b) Set LANG before QLocale::system() is initialized the first time which means
before Q*Application is created. This creates a chicken-egg-problem which may
not be solvable without touching all applications because the code that loads
the application-specific language needs to know the name of the application
(and currently uses qAppName() which requires Q*Application to be created
already).

I'll go for a).

-- 
You are receiving this mail because:
You are watching all bug changes.

[frameworks-kxmlgui] [Bug 464694] Mixed language in UI when using application-specific override language on Windows

2023-01-25 Thread Bug Janitor Service
https://bugs.kde.org/show_bug.cgi?id=464694

Bug Janitor Service  changed:

   What|Removed |Added

 Ever confirmed|0   |1
 Status|REPORTED|ASSIGNED

--- Comment #2 from Bug Janitor Service  ---
A possibly relevant merge request was started @
https://invent.kde.org/frameworks/kxmlgui/-/merge_requests/145

-- 
You are receiving this mail because:
You are watching all bug changes.

[frameworks-kxmlgui] [Bug 464694] Mixed language in UI when using application-specific override language on Windows

2023-01-23 Thread Ingo Klöcker
https://bugs.kde.org/show_bug.cgi?id=464694

--- Comment #1 from Ingo Klöcker  ---
This problem does not exist in Krita 5.1.5 (which uses copies of many KF5
frameworks). On startup Krita also first loads the German (and English) .qm
files, but later it also loads the Spanish .qm files.

-- 
You are receiving this mail because:
You are watching all bug changes.