Bug 424862 - Error messages should respect plasma language
Summary: Error messages should respect plasma language
Status: RESOLVED FIXED
Alias: None
Product: Discover
Classification: Applications
Component: discover (other bugs)
Version First Reported In: unspecified
Platform: Neon Linux
: NOR normal
Target Milestone: ---
Assignee: Dan Leinir Turthra Jensen
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-07-31 13:58 UTC by Patrick Silva
Modified: 2021-01-14 19:34 UTC (History)
2 users (show)

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


Attachments
screenshot (143.35 KB, image/png)
2020-07-31 13:58 UTC, Patrick Silva
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Silva 2020-07-31 13:58:13 UTC
Created attachment 130536 [details]
screenshot

STEPS TO REPRODUCE
1. open system settings > regional settings > language
1. add american english and another language (I added american english and portuguese)
2. set default language to american english
3. restart Plasma session
4. open Discover

OBSERVED RESULT
language of eventual error messages shown on opening is the non-default one in Languages kcm. My screenshot shows Discover in american english and an error message in portuguese.

EXPECTED RESULT
error messages in american english

SOFTWARE/OS VERSIONS
Operating System: KDE neon Unstable Edition
KDE Plasma Version: 5.19.80
KDE Frameworks Version: 5.73.0
Qt Version: 5.14.2
Comment 1 Nate Graham 2020-08-01 19:34:06 UTC
These messages come straight from PackageKit or whatever the backend is. Perhaps the problem is our KCM not setting whatever environment variables needed to make it notice? Does the same thing happen if you run `pkcon` by hand in the terminal, or other language-aware CLI apps like git?
Comment 2 Patrick Silva 2020-08-01 19:46:01 UTC
both git and pkcon print their outputs in american english.
Comment 3 Nate Graham 2020-08-01 19:59:42 UTC
Interesting. Maybe it is Discover's fault then.
Comment 4 Bug Janitor Service 2020-08-11 01:02:21 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/discover/-/merge_requests/22
Comment 5 Aleix Pol 2020-08-11 01:02:36 UTC
Please test.
Comment 6 Patrick Silva 2020-09-23 12:55:56 UTC
Tested your patch on neon unstable. The issue persists.

Operating System: KDE neon Unstable Edition
KDE Plasma Version: 5.19.90
KDE Frameworks Version: 5.75.0
Qt Version: 5.15.0
Comment 7 Aleix Pol 2020-11-13 15:30:23 UTC
Git commit 06cccdf45b8b82d31b413aa42e464eb6414e8d9a by Aleix Pol.
Committed on 13/11/2020 at 15:28.
Pushed by apol into branch 'master'.

pk: Set the Daemon locale at start

Just in case we have a different locale than the system's

M  +2    -0    libdiscover/backends/PackageKitBackend/PackageKitBackend.cpp

https://invent.kde.org/plasma/discover/commit/06cccdf45b8b82d31b413aa42e464eb6414e8d9a
Comment 8 Aleix Pol 2020-11-13 15:53:38 UTC
Git commit 88cd73a57d7b068970eee885bd3ea6a9b907b0c6 by Aleix Pol Gonzalez, on behalf of Aleix Pol.
Committed on 13/11/2020 at 15:53.
Pushed by apol into branch 'cherry-pick-06cccdf4'.

pk: Set the Daemon locale at start

Just in case we have a different locale than the system's


(cherry picked from commit 06cccdf45b8b82d31b413aa42e464eb6414e8d9a)

M  +2    -0    libdiscover/backends/PackageKitBackend/PackageKitBackend.cpp

https://invent.kde.org/plasma/discover/commit/88cd73a57d7b068970eee885bd3ea6a9b907b0c6
Comment 9 Bug Janitor Service 2020-11-13 15:54:21 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/discover/-/merge_requests/47
Comment 10 Aleix Pol 2021-01-14 19:34:53 UTC
Assuming it's fixed.