[OpenStack-I18n] Babel 2.4 and ko_KR
Ian Y. Choi
ianyrchoi at gmail.com
Wed Apr 5 12:21:46 UTC 2017
Andreas Jaeger wrote on 4/5/2017 8:39 PM:
> On 2017-04-05 13:27, Ian Y. Choi wrote:
>> Hello Andreas,
>> I have briefly did diff between Babel 2.3.4 and 2.4 and found one
>> suspicious change
>> which would generate such error:
>> The change parses "Language: ko-KR\n" line in po files
>> and Korean po files use 'ko-KR', not 'ko_KR' .
> Is this coming in via Zanata and set there wrongly?
Yes, it comes from Zanata - AFAIK Zanata manages all separators using '-'.
However, it is hard to tell that Zanata sets the language codes wrongly,
since I think it is on purpose in Zanata, as seen in language list
: https://translate.openstack.org/language/list .
>> However, the change just call Locale.parse() function without
>> considering '-' character,
>> and Locale.parse() function assumes that '_' is the separator if not
>> specified .
>> I think it would be one possible candidate which caused such error.
> Yeah, that would explain it.
> But whose bug is this? Zanata, Babel, ours?
I think it would be so nice if Babel deals with this, since it seems
that Babel has taken care of
'-' separator using some test codes
Note that I am too much familiar with the details on language codes.
If developers on I18n, translators or language coordinators have more
knowledge or insight, please share your thoughts here.
With many thanks,
>> With many thanks,
>>  https://github.com/python-babel/babel/blob/v2.4.0/babel/core.py#L221
>> Andreas Jaeger wrote on 4/5/2017 7:05 PM:
>>> I see in:
>>> "ValueError: expected only letters, got u'ko-kr'"
>>> Is there anybody that can investigate whether Babel is broken and needs
>>> blacklisting - or what else needs to change?
>>> This is using BAbel 2.4.0,
>>> Thanks for any help,
More information about the OpenStack-I18n