Bug 441028 - Auto-detect current locale and set it for News when enabling it for the first time
Summary: Auto-detect current locale and set it for News when enabling it for the first...
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Usability (other bugs)
Version First Reported In: nightly build (please specify the git hash!)
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Alvin Wong
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-08-16 03:05 UTC by Tyson Tan
Modified: 2021-08-19 09:20 UTC (History)
1 user (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 Tyson Tan 2021-08-16 03:05:30 UTC
Krita 5.0's news widget now supports multiple languages (if available on krita.org). But it requires the user to confirm before it shows anything. Currently, when enabling it for the first time, the language is set to English.

Can we make it possible to auto-detect the current locale when enabling News for the first time? People probably don't expect Krita to have any news other than English, so they don't even bother to look :P.

Maybe we can default it to English + Current locale (if available)?

Tested: 
krita-nightly-x64-5.0.0-prealpha-afacd70a7a-setup.exe
Comment 1 Alvin Wong 2021-08-19 07:54:25 UTC
It already does that though. If you start with a clean profile, the news language matching the current UI language will be selected by default, if there is one. Have you found a case in which this doesn't happen?
Comment 2 Tyson Tan 2021-08-19 08:08:07 UTC
Yes, I think I've encountered such an instance. I was testing under Windows 10 21H1, using krita-nightly-x64-5.0.0-prealpha-afacd70a7a-setup.exe. I cleared the configuration files and all the resources. I started Krita a few times before switching on the News (which means nobody touched those settings). But when it was switched on for the first time, it was in English. Both the system and Krita was on Simplified Chinese when the News was switched on.
Comment 3 Alvin Wong 2021-08-19 08:43:32 UTC
taking
Comment 4 Alvin Wong 2021-08-19 08:52:09 UTC
Git commit 724ba29320477a5b7a5035fe8882ab611edf9fe1 by Alvin Wong.
Committed on 19/08/2021 at 08:50.
Pushed by alvinwong into branch 'master'.

Fix logic when iterating fallback lang for news lang

M  +4    -3    libs/ui/KisWelcomePageWidget.cpp

https://invent.kde.org/graphics/krita/commit/724ba29320477a5b7a5035fe8882ab611edf9fe1
Comment 5 Alvin Wong 2021-08-19 08:52:39 UTC
Git commit ea38224126167ef77dcb1ce83d7e54f0e46b0420 by Alvin Wong.
Committed on 19/08/2021 at 08:52.
Pushed by alvinwong into branch 'krita/5.0'.

Fix logic when iterating fallback lang for news lang
(cherry picked from commit 724ba29320477a5b7a5035fe8882ab611edf9fe1)

M  +4    -3    libs/ui/KisWelcomePageWidget.cpp

https://invent.kde.org/graphics/krita/commit/ea38224126167ef77dcb1ce83d7e54f0e46b0420
Comment 6 Tyson Tan 2021-08-19 09:20:49 UTC
Thank you Alvin! :D