Bug 713649

Summary: RFE - Ability to add missing language codes
Product: [Retired] Zanata Reporter: Ruediger Landmann <rlandman>
Component: Component-LogicAssignee: Sean Flanigan <sflaniga>
Status: CLOSED CURRENTRELEASE QA Contact: Ding-Yi Chen <dchen>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 1.3CC: sflaniga, zanata-bugs
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-02-10 05:16:58 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 730186    
Attachments:
Description Flags
Script to add requested locales directly to database none

Description Ruediger Landmann 2011-06-16 06:21:05 UTC
This is really more of an administration bug than a deployment bug, but there's no category for that...

Description of problem:
Zanata is missing certain language codes that I need for my projects, specifically:

ast
bs
nds
ky
la
mn
tl
xh

Some corresponding language-region combinations would be:

ast-ES
bs-BA
nds-DE
ky-KG
mn-MN
tl-PH
xh-ZA

"la" probably should not have any region code

Version-Release number of selected component (if applicable):
1.3

How reproducible:
100%

Steps to Reproduce:
1. Click Administration -> Manage languages -> Add new language
2. Try to find any of the above codes in the drop-down menu
  
Actual results:
Languages do not exist and cannot be added

Expected results:
Ability to add these languages

Additional info:

Comment 1 Sean Flanigan 2011-06-16 08:05:48 UTC
Reassigning to Component-Logic, which is probably questionable too...

The latest version of ICU4J (4.8) only seems to add one of the above languages as standard.  I think we can add custom locales by coding them, but we should allow the administrator to enter any locale code which conforms to the appropriate format.  I'm not sure how we'll handle not knowing the name of the locales in question.  

Where's a good reference to find the native name of a locale?

Comment 2 Ruediger Landmann 2011-06-16 23:28:27 UTC
(In reply to comment #1)

> The latest version of ICU4J (4.8) only seems to add one of the above languages
> as standard.

However, all of these languages have valid subtags in the IANA registry[1], which in turn is the list that IETF and W3C rely on. In each of these eight cases, the code corresponds to the code for this language in ISO 639-1 and ISO 639-2. The official list of ISO 639-2 codes is freely available, and includes many (most? all?) ISO 639-1 codes.[2]

> Where's a good reference to find the native name of a locale?

Unfortunately, the IANA registry only includes the English name, and ISO 639-2 only includes the English and French names.

Wikipedia is by far the most readily accessible source for the native names. In every instance I've seen, the very first line in any article about a language includes its native name. 

Code -- English name -- native name

ast -- Asturian -- Asturianu
bs -- Bosnian -- Bosanski
nds -- Low German -- Plattdüütsch
ky -- Kyrgyz -- Кыргыз тили
la -- Latin -- Latina
mn -- Mongolian -- Монгол хэл
tl -- Tagalog -- Tagalog
xh -- Xhosa -- isiXhosa


[1] http://www.iana.org/assignments/language-subtag-registry

[2] http://www.loc.gov/standards/iso639-2/php/English_list.php

Comment 3 Sean Flanigan 2011-06-17 00:34:18 UTC
Sorry, I didn't mean to imply that ICU4J was the definitive list of locales we should follow.  Our current implementation gets its list of locales there, so I thought I'd mention it.  We obviously do need the ability to add extra locales.

Thanks for looking up the names.

Comment 4 Sean Flanigan 2011-06-17 00:35:41 UTC
Created attachment 505167 [details]
Script to add requested locales directly to database

Comment 5 Sean Flanigan 2011-06-17 00:43:08 UTC
All the above locales have now been added to the fedora test instance.  (Disabled by default, admin must enable.)

Not closing the bug, because we still need UI to let admin do this.

Comment 6 Sean Flanigan 2011-06-17 00:49:04 UTC
Reducing severity due to workaround, but let me know if you disagree.

Comment 7 Sean Flanigan 2012-02-10 05:16:58 UTC
See bug 730186 for a UI to add locales by their codes.