Bug 390623 - GUI wrong button language, wrong environment variable?
Summary: GUI wrong button language, wrong environment variable?
Status: RESOLVED FIXED
Alias: None
Product: i18n
Classification: Translations
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Unspecified
: NOR minor
Target Milestone: ---
Assignee: Albert Astals Cid
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-02-17 18:42 UTC by MBB
Modified: 2018-04-27 06:05 UTC (History)
6 users (show)

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


Attachments
twice in bar (118.74 KB, image/jpeg)
2018-02-17 18:42 UTC, MBB
Details
SwitchLanguageBox (9.93 KB, image/jpeg)
2018-02-17 18:44 UTC, MBB
Details
Certificates dropdown list (80.45 KB, image/jpeg)
2018-02-23 12:57 UTC, MBB
Details
Digikam 6 test regression (26.97 KB, image/png)
2018-04-26 22:38 UTC, MBB
Details

Note You need to log in before you can comment on or make changes to this bug.
Description MBB 2018-02-17 18:42:05 UTC
Created attachment 110751 [details]
twice in bar

Accidental 'translation' to Dutch happens of some words/buttons in the menu bar, even though I run an English (default) Digikam on an English Windows. 

OS: Win 7-x64 Home English, 
Keyboard: US-International
formats and region: Dutch/The Netherlands (needed for currency etc)

I suspect the root cause is that the wrong environment variable from Format&region is somewhere used as all the other menus work right. 

It might be something higher in the KDE-windows conversion, as the Kleopatra (GPG4win release, can I report those Kleopatra GUI bugs here too?) has similar issues /a lot worse.

It happens twice in the menu bar, and once in the Help>switch application Language pop-up
Comment 1 MBB 2018-02-17 18:44:34 UTC
Created attachment 110752 [details]
SwitchLanguageBox
Comment 2 Maik Qualmann 2018-02-18 21:17:55 UTC
I can reproduce the problem here also under Linux and also for example with Dolphin. The settings menu string "Show tool bar" always has the language set in the system. This QAction comes from the KF5 framework.

Maik
Comment 3 Frederik Schwarzer 2018-02-19 09:21:01 UTC
From what I can understand here, the German translators are not the right assignee. If anyone has a better place to assign this to, please do so.
Comment 4 Maik Qualmann 2018-02-19 11:31:13 UTC
I also think that the place here might not be right. It does not only affect the German translation, but probably all. Maybe, a better explanation. If the language of the application is changed via the Help menu, the entry under Settings->Show toolbar still has the language of the system.

Maik
Comment 5 MBB 2018-02-19 12:30:12 UTC
It is not a translation issue, it is the software component that calls the translation issue, which uses the wrong variable. 
Which could be the program, the Windows compiler or KDE GUI (or perhaps QT?).
It  is why I had it originally set under Digikam, hoping it would be leveled up appropriately.

PS: just to be clear, under Windows, it does NOT have the language of the system, it has the language of the *region* (used to set currencies, timezones etc), OS language is English.
Comment 6 Burkhard Lück 2018-02-19 13:40:43 UTC
I can reproduce this issue in linux master build from sources and neon-devedition-unstable with various languages and applications, digikam, kate, dolphin, konsole etc.
If I select a different language than used in Systemsettings->Language for an application via Help->Switch Application Language, the strings in the screenshots are still in systemsettings language, not in the application language.
Comment 7 Albert Astals Cid 2018-02-19 20:54:46 UTC
@Burkhard all applications? i've tried kate and okular and it all works fine.
Comment 8 Burkhard Lück 2018-02-22 20:04:18 UTC
I have updated and rebuild frameworks, workspace and applications in master.
application language != systemsettings language and using kate or okular I have the strings in the screenshots are still in systemsettings language
Comment 9 Albert Astals Cid 2018-02-22 20:50:14 UTC
I'm on KF5 5.43 and KDE Applications 17.12.1 so that should be comparable enough to what you're running.

You're going to need to debug this one or we have to try to figure out what is different in your system than on mine if i have to debug it.
Comment 10 Albert Astals Cid 2018-02-23 00:04:55 UTC
i can reproduce it now.
Comment 11 Albert Astals Cid 2018-02-23 00:37:33 UTC
Should be fixed with 
https://phabricator.kde.org/D10757
https://phabricator.kde.org/D10758
https://phabricator.kde.org/D10759

Note the last one is in ecm, which means you need to recompile all the frameworks that have _qt.po files
Comment 12 Burkhard Lück 2018-02-23 06:26:45 UTC
with D10757, D10758, and D10759 the bug is fixed, thanks a lot
Comment 13 MBB 2018-02-23 12:57:32 UTC
Created attachment 110933 [details]
Certificates dropdown list

 All Certificates dropdown list, first 5 items are correct, the last 3 take local language. 
May already work in the patched version, I can not verify. 
Thank you all for fixing this
Comment 14 MBB 2018-02-23 13:00:08 UTC
I found another place where it happens: in the All Certificates dropdown list, first 5 items are correct, the last 3 take local language. (see attachment)
(May already be fixed in the patch, but I can not test that. )

Thank you all for fixing this so quickly. :-)
Comment 15 Albert Astals Cid 2018-02-26 18:38:25 UTC
Git commit 8361ddef086795cffc43ef9757198642af2439f9 by Albert Astals Cid.
Committed on 26/02/2018 at 18:39.
Pushed by aacid into branch 'master'.

Reset QLocale internals when we have a custom app language

Test Plan: See https://bugs.kde.org/show_bug.cgi?id=390623

Subscribers: #frameworks

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D10757

M  +21   -0    autotests/kxmlgui_unittest.cpp
M  +1    -0    autotests/kxmlgui_unittest.h
M  +1    -0    src/CMakeLists.txt
M  +16   -7    src/kswitchlanguagedialog_p.cpp
M  +5    -0    src/kswitchlanguagedialog_p.h

https://commits.kde.org/kxmlgui/8361ddef086795cffc43ef9757198642af2439f9
Comment 16 MBB 2018-04-26 11:48:36 UTC
Is this bug fix supposed to be in the new Digikam 5.9 yet? Because it is not fixed for me. To make sure it was not leftover from the upgrade, I did installs ion a Win7 and win10 system that did not have Digikam/KDE software before. 

I've been able to confirm the bug both ways:
OS Region=Netherlands and language=English; Main GUI is English with Dutch bugs
OS Region=USA and language=Dutch; Main GUI is Dutch with English bugs
Comment 17 caulier.gilles 2018-04-26 12:05:49 UTC
Not sure if the bug is really fixed with 5.9.0.

Please try the 6.0.0 pre-release bundle just build today :

https://files.kde.org/digikam/

Gilles Caulier
Comment 18 Maik Qualmann 2018-04-26 16:39:32 UTC
Here under Linux with KF-5.45 the problem is solved. But right now I can not say against which KF version the Windows packages are built.

Maik
Comment 19 caulier.gilles 2018-04-26 17:44:44 UTC
Look in Help/Components Info dialog

Gilles Caulier
Comment 20 MBB 2018-04-26 22:38:39 UTC
Created attachment 112276 [details]
Digikam 6 test regression
Comment 21 MBB 2018-04-26 22:39:25 UTC
(Also under About>libraries)
The Windows 6.0.0-x64  reports 
KF-5.44.0
QT 5.10.1
LibQtAV	1.12.0

Unfortunately, bug is still there. There seems to be even a tiny regression: the button with the chosen language (and the underlying pop-up-menu) now get unwanted translated too. 
The pop-up list used to be in all English and/or the languages to choose from (or both?), and is now all translated, see new attachment.
Comment 22 Maik Qualmann 2018-04-27 06:05:25 UTC
If I see it correctly, this correction is included in KF-5.45.

Maik