Babel 2.4 and ko_KR
I see in: http://logs.openstack.org/8d/8d993d3bbd17ce22288b9ea9caa6d93618522f46/post/o... "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, Andreas -- Andreas Jaeger aj@{suse.com,opensuse.org} Twitter: jaegerandi SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg) GPG fingerprint = 93A3 365E CE47 B889 DF7F FED1 389A 563C C272 A126
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: - https://github.com/python-babel/babel/commit/08b9c5e76e19ae610f28759a5cf3762... The change parses "Language: ko-KR\n" line in po files and Korean po files use 'ko-KR', not 'ko_KR' [1]. However, the change just call Locale.parse() function without considering '-' character, and Locale.parse() function assumes that '_' is the separator if not specified [2]. I think it would be one possible candidate which caused such error. With many thanks, /Ian [1] http://git.openstack.org/cgit/openstack/openstack-manuals/tree/doc/install-g... [2] 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: http://logs.openstack.org/8d/8d993d3bbd17ce22288b9ea9caa6d93618522f46/post/o...
"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, Andreas
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:
- https://github.com/python-babel/babel/commit/08b9c5e76e19ae610f28759a5cf3762...
The change parses "Language: ko-KR\n" line in po files and Korean po files use 'ko-KR', not 'ko_KR' [1].
Is this coming in via Zanata and set there wrongly?
However, the change just call Locale.parse() function without considering '-' character, and Locale.parse() function assumes that '_' is the separator if not specified [2].
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? Andreas
With many thanks,
/Ian
[1] http://git.openstack.org/cgit/openstack/openstack-manuals/tree/doc/install-g...
[2] 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: http://logs.openstack.org/8d/8d993d3bbd17ce22288b9ea9caa6d93618522f46/post/o...
"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, Andreas
-- Andreas Jaeger aj@{suse.com,opensuse.org} Twitter: jaegerandi SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg) GPG fingerprint = 93A3 365E CE47 B889 DF7F FED1 389A 563C C272 A126
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:
- https://github.com/python-babel/babel/commit/08b9c5e76e19ae610f28759a5cf3762...
The change parses "Language: ko-KR\n" line in po files and Korean po files use 'ko-KR', not 'ko_KR' [1]. 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 [2].
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 : https://github.com/python-babel/babel/blob/v2.4.0/tests/test_core.py#L100 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, /Ian
Andreas
With many thanks,
/Ian
[1] http://git.openstack.org/cgit/openstack/openstack-manuals/tree/doc/install-g...
[2] 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: http://logs.openstack.org/8d/8d993d3bbd17ce22288b9ea9caa6d93618522f46/post/o...
"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, Andreas
Alex, is Babel 2.4 hitting Zanata users in other areas as well? On 2017-04-05 14:21, Ian Y. Choi wrote:
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:
- https://github.com/python-babel/babel/commit/08b9c5e76e19ae610f28759a5cf3762...
The change parses "Language: ko-KR\n" line in po files and Korean po files use 'ko-KR', not 'ko_KR' [1]. 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 [2].
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 : https://github.com/python-babel/babel/blob/v2.4.0/tests/test_core.py#L100
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.
I filed now the following: https://github.com/python-babel/babel/issues/489 Andreas
With many thanks,
/Ian
Andreas
With many thanks,
/Ian
[1] http://git.openstack.org/cgit/openstack/openstack-manuals/tree/doc/install-g...
[2] 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: http://logs.openstack.org/8d/8d993d3bbd17ce22288b9ea9caa6d93618522f46/post/o...
"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, Andreas
-- Andreas Jaeger aj@{suse.com,opensuse.org} Twitter: jaegerandi SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg) GPG fingerprint = 93A3 365E CE47 B889 DF7F FED1 389A 563C C272 A126
One idea: Convert '-' to '_' in our downloaded locale files like in: https://review.openstack.org/453997 I'll mark this as WIP until I hear feedback - and would love to learn about other solutions, Andreas -- Andreas Jaeger aj@{suse.com,opensuse.org} Twitter: jaegerandi SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg) GPG fingerprint = 93A3 365E CE47 B889 DF7F FED1 389A 563C C272 A126
On 2017-04-06 08:29, Andreas Jaeger wrote:
https://github.com/python-babel/babel/issues/489
Andreas
This is fixed now for the upcoming Babel 2.4.1 release. Let me blacklist Babel 2.4.0 in openstack-manuals since that's the only repo I noticed a problem with, Andreas -- Andreas Jaeger aj@{suse.com,opensuse.org} Twitter: jaegerandi SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg) GPG fingerprint = 93A3 365E CE47 B889 DF7F FED1 389A 563C C272 A126
Andreas Jaeger wrote on 4/6/2017 9:19 PM:
On 2017-04-06 08:29, Andreas Jaeger wrote:
https://github.com/python-babel/babel/issues/489
Andreas This is fixed now for the upcoming Babel 2.4.1 release.
Thanks a lot for taking care of this bug by issuing to babel. Greatly appreciated!
Let me blacklist Babel 2.4.0 in openstack-manuals since that's the only repo I noticed a problem with,
+1 - but still curious for me why only ko-KR affected on openstack-manuals ( https://review.openstack.org/#/c/454024/ ) With many thanks, /Ian
Andreas
participants (2)
-
Andreas Jaeger
-
Ian Y. Choi