Bug 345761

Summary: pt_BR showing twice on language settings
Product: [Applications] systemsettings Reporter: Luiz Fernando Ranghetti <elchevive>
Component: kcm_languageAssignee: John Layt <jlayt>
Status: RESOLVED FIXED    
Severity: normal CC: alvarenga, joanmaspons, lueck, simonandric5
Priority: NOR    
Version: 5.2.2   
Target Milestone: ---   
Platform: openSUSE   
OS: Other   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Translations in systemsettings

Description Luiz Fernando Ranghetti 2015-04-01 14:32:27 UTC
Hi,

There is an incorrect translation of pt and pt_BR languages at regional settings in systemsettings. Both are presented as "português do Brasil" as seen on the attached screenshot where only one is the correct, the other is just "português" This confuse users.

Reproducible: Always
Comment 1 Luiz Fernando Ranghetti 2015-04-01 14:48:06 UTC
Created attachment 91846 [details]
Translations in systemsettings
Comment 2 Burkhard Lück 2015-04-02 06:37:42 UTC
Confirmed with latest frameworks compiled from sources and in kubuntu 15.04 beta2

But l10n-kf5 in trunk does not have the string with lowercase "português"
$ wcgrep "português do Brasil" l10n-kf5/*/messages/|wc -l
0

$ wcgrep "Português do Brasil" l10n-kf5/*/messages/|grep -v "#~"| wc -l
9

Is the string from Qt?
Comment 3 jmaspons 2015-08-18 17:44:00 UTC
I found the same problem with Catalan and Catalan from València. The same string for both options points to ca and ca@valencia
Comment 4 Albert Astals Cid 2015-08-23 11:42:06 UTC
Git commit adb75ec59296ff17ef9d07a7cae0614235c592a6 by Albert Astals Cid.
Committed on 23/08/2015 at 11:41.
Pushed by aacid into branch 'Plasma/5.4'.

Fix issues in translation control module

Fixes two problems:
 * Variants not being shown up, i.e. ca ca@valencia showing up both as "català"
 * pt showing up as "português do Brasil"

For the first one i've went the easy route of adding the languageCode if there's an @ in it
For pt i had to hardcode it since i found no other way to make Qt understand that for "pt" we mean portuguese from portugal

REVIEW: 124885
Related: bug 347956

M  +15   -1    kcms/translations/kcmtranslations.cpp

http://commits.kde.org/plasma-desktop/adb75ec59296ff17ef9d07a7cae0614235c592a6