Bug 420268 - Removed language reappears in the languages list after re-login and is applied to Plasma
Summary: Removed language reappears in the languages list after re-login and is applie...
Status: RESOLVED FIXED
Alias: None
Product: systemsettings
Classification: Applications
Component: kcm_language (show other bugs)
Version: 5.19.3
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Eike Hein
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-04-18 18:48 UTC by Patrick Silva
Modified: 2022-07-02 09:31 UTC (History)
5 users (show)

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


Attachments
screenshot (84.75 KB, image/png)
2021-09-30 21:09 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-04-18 18:48:20 UTC
SUMMARY
Reproducible on both Arch Linux (Plasma 5.18.5) and Neon instable.

STEPS TO REPRODUCE
1. open system settings > regional settings > language
2. add two languages (I added american english and portuguese)
3. restart Plasma session
4. open system settings > regional settings > language again
5. remove the second language - portuguese in my case (the first one remains in the language list as expected)
6. restart Plasma session: notice that now your Plasma language unexpectedly is the previously removed one - portuguese in my case)
7. open system settings > regional settings > language again: only the language previously removed is present in languages list


EXPECTED RESULT
Language KCM should remove languages correctly

SOFTWARE/OS VERSIONS
Operating System: KDE neon Unstable Edition
KDE Plasma Version: 5.18.80
KDE Frameworks Version: 5.70.0
Qt Version: 5.14.1
Comment 1 Patrick Silva 2020-07-18 21:57:11 UTC
Humm, apparently when just one language is present in Languages kcm Plasma uses the language of the region configured in Formats kcm.
Another user have related this issue on reddit

https://old.reddit.com/r/kde/comments/htlldv/kdes_language_changed_for_no_apparent_reason/fyhw78r/
Comment 2 Patrick Silva 2021-05-16 15:00:14 UTC
Still an issue on neon unstable.

Operating System: KDE neon Unstable Edition
KDE Plasma Version: 5.22.80
KDE Frameworks Version: 5.83.0
Qt Version: 5.15.2
Graphics Platform: Wayland
Comment 3 Nate Graham 2021-09-30 19:34:18 UTC
If this is still reproducible, can you provide the output of `cat ~/.config/plasma-localerc` before and after deleting the language and clicking the Apply button?
Comment 4 Patrick Silva 2021-09-30 20:17:07 UTC
it's still reproducible on neon unstable.

output before deleting the language:
[Formats]
LANG=pt_BR.UTF-8

[Translations]
LANGUAGE=en_US:pt_BR


output after deleting the language:
[Formats]
LANG=pt_BR.UTF-8

Operating System: KDE neon Unstable Edition
KDE Plasma Version: 5.23.80
KDE Frameworks Version: 5.87.0
Qt Version: 5.15.3
Graphics Platform: Wayland
Comment 5 Nate Graham 2021-09-30 20:31:07 UTC
So the KCM has correctly removed the language in the config file. Something must be adding it back in.

Can you also provide the output of `cat ~/.config/plasma-localerc` after restarting Plasma, and then again after opening the Language KCM?
Comment 6 Patrick Silva 2021-09-30 20:43:02 UTC
outputs after restarting Plasma session and after opening the Language KCM
are the same:

[Formats]
LANG=pt_BR.UTF-8
Comment 7 Nate Graham 2021-09-30 20:48:21 UTC
So the file says

[Formats]
LANG=pt_BR.UTF-8

But the KCM lists more than one language in it?
Comment 8 Patrick Silva 2021-09-30 20:56:40 UTC
No. Only the language removed before re-login (pt-br, called 'Portuguese' in KCM)
is listed in Languages KCM.
Comment 9 Nate Graham 2021-09-30 20:57:49 UTC
So what does the KCM say now?
Comment 10 Patrick Silva 2021-09-30 21:09:32 UTC
Created attachment 142040 [details]
screenshot

See the attached screenshot.
Comment 11 Nate Graham 2021-09-30 21:12:01 UTC
So in this case you are actually experiencing the desired effect and not suffering from Bug 341235. :) However you got there via a different bug in the code!
Comment 12 Patrick Silva 2022-01-02 03:00:33 UTC
*** Bug 447783 has been marked as a duplicate of this bug. ***
Comment 13 hanyoung 2022-07-02 09:31:31 UTC
Git commit 134e2d5c989c36ac0e985ee0ae382996c6b7b56e by Han Young.
Committed on 02/07/2022 at 09:29.
Pushed by hanyoung into branch 'master'.

merge Language and Formats
Related: bug 192019, bug 341235, bug 344588, bug 394477, bug 397974, bug 397975, bug 403580, bug 417564, bug 429474, bug 431292, bug 444772, bug 446785, bug 447787, bug 448324, bug 448355, bug 451919, bug 451944, bug 454991

closes https://invent.kde.org/plasma/plasma-workspace/-/issues/23

M  +1    -0    .kde-ci.yml
M  +52   -8    CMakeLists.txt
M  +2    -1    config-workspace.h.cmake
D  +0    -2    doc/kcontrol/formats/CMakeLists.txt
D  +0    -63   doc/kcontrol/formats/index.docbook
R  +1    -1    doc/kcontrol/region_language/CMakeLists.txt [from: doc/kcontrol/translations/CMakeLists.txt - 063% similarity]
R  +-    --    doc/kcontrol/region_language/go-top.png [from: doc/kcontrol/translations/go-top.png - 100% similarity]
R  +36   -23   doc/kcontrol/region_language/index.docbook [from: doc/kcontrol/translations/index.docbook - 050% similarity]
A  +-    --    doc/kcontrol/region_language/list-remove.png
D  +-    --    doc/kcontrol/translations/list-remove.png
M  +1    -2    kcms/CMakeLists.txt
D  +0    -30   kcms/formats/CMakeLists.txt
D  +0    -5    kcms/formats/Messages.sh
D  +0    -61   kcms/formats/formatssettings.kcfg
D  +0    -80   kcms/formats/kcmformats.cpp
D  +0    -34   kcms/formats/kcmformats.h
D  +0    -183  kcms/formats/localelistmodel.cpp
D  +0    -140  kcms/formats/optionsmodel.cpp
D  +0    -126  kcms/formats/package/contents/ui/main.qml
A  +75   -0    kcms/region_language/CMakeLists.txt
A  +8    -0    kcms/region_language/Messages.sh
R  +2    -27   kcms/region_language/exampleutility.cpp [from: kcms/formats/exampleutility.cpp - 052% similarity]
A  +22   -0    kcms/region_language/exampleutility.h     [License: GPL(v2.0+)]
A  +82   -0    kcms/region_language/kcm_regionandlang.desktop [TRAILING SPACE] ** [TRAILING SPACE] **
R  +4    -4    kcms/region_language/kcm_regionandlang.json [from: kcms/formats/kcm_formats.json - 098% similarity]
A  +250  -0    kcms/region_language/kcmregionandlang.cpp     [License: GPL(v2.0+)]
A  +58   -0    kcms/region_language/kcmregionandlang.h     [License: GPL(v2.0+)]
A  +372  -0    kcms/region_language/languagelistmodel.cpp     [License: GPL(v2.0+)]
A  +100  -0    kcms/region_language/languagelistmodel.h     [License: GPL(v2.0+)]
A  +30   -0    kcms/region_language/localegenerator.cpp     [License: LGPL(v2.0+)]
A  +17   -0    kcms/region_language/localegenerator.h     [License: LGPL(v2.0+)]
A  +19   -0    kcms/region_language/localegeneratorbase.cpp     [License: GPL(v2.0+)]
A  +23   -0    kcms/region_language/localegeneratorbase.h     [License: GPL(v2.0+)]
A  +32   -0    kcms/region_language/localegeneratorglibc.cpp     [License: GPL(v2.0+)]
A  +24   -0    kcms/region_language/localegeneratorglibc.h     [License: GPL(v2.0+)]
A  +101  -0    kcms/region_language/localegeneratorubuntu.cpp     [License: GPL(v2.0+)]
A  +27   -0    kcms/region_language/localegeneratorubuntu.h     [License: GPL(v2.0+)]
A  +36   -0    kcms/region_language/localegenhelper/CMakeLists.txt
A  +187  -0    kcms/region_language/localegenhelper/localegenhelper.cpp     [License: GPL(v2.0+)]
A  +46   -0    kcms/region_language/localegenhelper/localegenhelper.h     [License: GPL(v2.0+)]
A  +20   -0    kcms/region_language/localegenhelper/org.kde.localegenhelper.conf
A  +21   -0    kcms/region_language/localegenhelper/org.kde.localegenhelper.policy
A  +8    -0    kcms/region_language/localegenhelper/org.kde.localegenhelper.service.in
A  +158  -0    kcms/region_language/localelistmodel.cpp     [License: GPL (v2+)]
R  +22   -22   kcms/region_language/localelistmodel.h [from: kcms/formats/localelistmodel.h - 060% similarity]
A  +197  -0    kcms/region_language/optionsmodel.cpp     [License: GPL(v2.0+)]
R  +21   -11   kcms/region_language/optionsmodel.h [from: kcms/formats/optionsmodel.h - 054% similarity]
A  +204  -0    kcms/region_language/package/contents/ui/AdvancedLanguageSelectPage.qml     [License: LGPL(v3.0+)]
A  +238  -0    kcms/region_language/package/contents/ui/main.qml     [License: LGPL(v3.0+)]
A  +64   -0    kcms/region_language/regionandlangsettings.cpp     [License: GPL(v2.0+)]
A  +21   -0    kcms/region_language/regionandlangsettings.h     [License: GPL(v2.0+)]
A  +37   -0    kcms/region_language/regionandlangsettingsbase.kcfg
R  +2    -2    kcms/region_language/regionandlangsettingsbase.kcfgc [from: kcms/formats/formatssettings.kcfgc - 055% similarity]
A  +17   -0    kcms/region_language/settingtype.h     [License: GPL(v2.0+)]
D  +0    -49   kcms/translations/CMakeLists.txt
D  +0    -2    kcms/translations/Messages.sh
D  +0    -191  kcms/translations/language.cpp
D  +0    -32   kcms/translations/language.h
D  +0    -312  kcms/translations/package/contents/ui/main.qml
D  +0    -86   kcms/translations/translations.cpp
D  +0    -53   kcms/translations/translations.h
D  +0    -193  kcms/translations/translationsmodel.cpp
D  +0    -72   kcms/translations/translationsmodel.h
D  +0    -27   kcms/translations/translationssettings.cpp
D  +0    -24   kcms/translations/translationssettings.h
D  +0    -28   kcms/translations/translationssettingsbase.kcfg
D  +0    -6    kcms/translations/translationssettingsbase.kcfgc

The files marked with ** at the end have a problem. Either the file contains a trailing space or the file contains a call to potentially dangerous code. Please read: https://community.kde.org/Sysadmin/CommitHooks#Email_notifications for further information. Please either fix the trailing space or review the dangerous code.


https://invent.kde.org/plasma/plasma-workspace/commit/134e2d5c989c36ac0e985ee0ae382996c6b7b56e