Skip to content

kcms/region/language: Warn for more invalid language combinations

We currently warn the user when they configure American English (en_US) as their first language with any other languages underneath it--because it causes a mix of languages to be shown in the UI and confuses the heck out of people.

But we only check if the top language is en_US! There are other Englishes too that technically count as full languages--such as en_GB. If the user makes en_GB their top language and then puts any other non-English language under it, the same thing happens as the system will fall back to the second non-English language for any string that isn't found in the British English translation catalogue, which turns out to be a lot. What a person using en_GB actually wants is to fall back to en_US, which is the implicit default and happens when there are no other languages configured beneath en_GB.

To fix this, let's change the check to encompass all en_* languages, not just en_US. Hopefully making the warning text appear for these use cases will be good enough and we won't have to do something drastic like secretly insert en_US after the last non-en_US English language, and C after the last en_* language of any kind when there are other non-en_* languages underneath it in the language list.

This is targeted at Plasma 6.0 because the error message shown in the UI needs to change to make sense given the new condition, and we're far past the string freeze for Plasma 5.27.

BUG: 465449 FIXED-IN: 6.0

cc @hanyoung @sitter

Merge request reports

Loading