Bug 59840 - Language codes displayed instead of full name
Summary: Language codes displayed instead of full name
Status: RESOLVED FIXED
Alias: None
Product: xkeyboard-config
Classification: Unclassified
Component: General (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) Linux (All)
: medium minor
Assignee: xkb
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-01-25 09:41 UTC by Pierre Buard
Modified: 2013-04-16 07:21 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
Screenshot of the language filter list from the Add Layout dialog box (24.27 KB, image/png)
2013-01-25 09:41 UTC, Pierre Buard
Details
Includes the changes listed in comments #3 & #5 (596 bytes, patch)
2013-01-31 15:24 UTC, Pierre Buard
Details | Splinter Review

Description Pierre Buard 2013-01-25 09:41:00 UTC
Created attachment 73635 [details]
Screenshot of the language filter list from the Add Layout dialog box

A dialog box in KDE Keyboard Layout allows to filter layouts by their language. In this list are 4 entries named simply: fr, mng, scr and trv (see screenshot).

"fr" contains:
- a duplicate of the "French (Canada)" layout also found under "French",
- a "Bambara" layout only available under the "fr" language entry, despite the fact that the "Bambara" language is listed. Maybe the one under "fr" should be moved to the "Bambara" entry, uniting the French and English layouts?

The other 3 are either wrongly labelled or incorrectly linked to the layouts they contain. Presently, "mng" is tied to the "Mongolian" layout, "scr" has "Croatian" and "trv" "Taiwanese". But according to the iso-codes bug report linked below: "mng" is "Eastern Mnong", "scr" is a retired code for "Croatian" and "trv" is Taroko.

Since KDE and iso-codes deny being the source of this problem, xkeyboard-config seems to be the only one remaining.

Tested with xkeyboard-config 2.7 and iso-codes 3.38 and 3.40.
Original KDE bug report: <https://bugs.kde.org/show_bug.cgi?id=313082>
iso-codes bug report: <https://alioth.debian.org/tracker/?func=detail&atid=413077&aid=313984&group_id=30316>
Comment 1 Sergey V. Udaltsov 2013-01-29 15:27:45 UTC
The incorrect labels are about KDE (or whatever library they are using) incorrectly parsing/understanding rules/base.xml

Other issues are related to the xkeyboard-config indeed. One layout can be bound to single or multiple languages. Could you pls have a look at rules/base.xml.in, the format is straightworward enough to understand.

http://cgit.freedesktop.org/xkeyboard-config/tree/rules/base.xml.in
Comment 2 Sergey V. Udaltsov 2013-01-29 15:31:26 UTC
Keep in mind that we are using both ISO639 and ISO3166 codes - for languages and countries correspondingly.
Comment 3 Pierre Buard 2013-01-31 11:11:09 UTC
Thanks for the pointers. After reviewing rules/base.xml.in, the duplication doesn't appear to come from this file, as confirmed by using the "Layout" drop-down menu and completely ignoring the KDE language filter. I'll return to the KDE people with this new information.

As for the other problem, I can confirm that the layouts mentioned (mng, scr and trv) are not linked to their proper ISO codes:
- "mng" refers to the Mnong people from Vietnam and Cambodia. Pretty far from Mongolia. The correct code is "mon" with 2 subsets: "khk", Halh Mongolian and "mvf", Peripheral Mongolian.
- "scr" is a retired term to designate "Croatian". The new code is "hrv".
- the Taiwanese code is fuzzier. While "trv" is not entirely wrong, it refers to just a single language spoken by the Seediq and Truku/Taroko tribes. Since the consensus is to put all the island languages under the "Formosan" family, why not use the "fox" ISO code?

Finally, during my research I found that the "Taiwanese (indigenous)" variant is missing a couple of languages in its "languageList" tag:
- xnb = Kanakanabu
- sxr = Saaroa
- trv = Taroko
- uun = Kulon-Pazeh
- fos = Siraya

*Sources*
Mnong/mng: <http://www.ethnologue.com/show_language.asp?code=mng>
Mongolian: <http://www.sil.org/iso639-3/documentation.asp?id=mon>
Croatian: <http://www.sil.org/iso639-3/documentation.asp?id=scr>
Taiwanese/Formosan languages: <https://en.wikipedia.org/wiki/Formosan_languages#Living_languages3> and <http://www.ethnologue.com/show_country.asp?name=TW>

Tested with xkeyboard-config 2.8.

Wow, I didn't realize where this particular rabbit hole would lead me. At least I learned something in the process ;-)
Comment 4 Sergey V. Udaltsov 2013-01-31 11:19:07 UTC
I am glad that you are enjoying the process. Dealing with languages is really sometimes quite interesting (that is why I am here:)

Do I understand it right that instead of "mng" you want 3 items in the list: "mon", "khk", "mvf"?

What about having both "fox" and "trv" in the list?

Other items are ok. Happy to change.

Would you be able to submit a patch to base.xml.in?
Comment 5 Pierre Buard 2013-01-31 15:23:02 UTC
Sorry for the confusion. Lots of information flying in my head.

"fox" should be used instead of "trv", since it's the "master" language.
"trv" joins the languageList in the "Taiwanese (indigenous)" variant, with all the other local dialects.
"mon" replaces "mng".

The "khk" and "mvf" are variations of the Mongol language, to which extent I know not. I would suggest to forget about them until someone more knowledgeable comes along and asks to create a <variantList> including those 2.

A (remarkably small) diff is attached. Hopefully I have included everything.
Comment 6 Pierre Buard 2013-01-31 15:24:43 UTC
Created attachment 73999 [details] [review]
Includes the changes listed in comments #3 & #5
Comment 7 Sergey V. Udaltsov 2013-02-01 00:34:24 UTC
Great! You can check in git. Thanks!


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.