migration module should take locale instead of language code

RESOLVED FIXED

Status

L20n
Python Library
RESOLVED FIXED
11 months ago
11 months ago

People

(Reporter: Pike, Assigned: stas)

Tracking

(Blocks: 1 bug)

Details

Attachments

(1 attachment)

(Reporter)

Description

11 months ago
Right now, the migration code takes a language code. It's use-case is to get the plural rule categories from cldr, which are defined for some combination of language and region tags.

We should make the conversion between the locale code we have and what cldr knows about inside cldr.py.

We should fix that before we land the migration mach command in bug 1315005.
(Assignee)

Comment 1

11 months ago
Do you think we should run some kind of a language negotiation here, or just hard-code the mapping from codes used at Mozilla to codes known by CLDR?
(Reporter)

Comment 2

11 months ago
I'd fallback in the sense of ja-JP-mac -> ja-JP -> ja. Nothing fancier than that.

I think that's easier than hard-coding 20+ entries.
(Assignee)

Comment 3

11 months ago
Created attachment 8814464 [details] [review]
Pull request
Assignee: nobody → stas
Status: NEW → ASSIGNED
Attachment #8814464 - Flags: review?(l10n)
(Reporter)

Comment 4

11 months ago
Comment on attachment 8814464 [details] [review]
Pull request

r=me
Attachment #8814464 - Flags: review?(l10n) → review+
(Assignee)

Comment 5

11 months ago
Thanks!

https://github.com/l20n/python-l20n/commit/25de7bf878df5f123a86448d333eb70cb16d225f
Status: ASSIGNED → RESOLVED
Last Resolved: 11 months ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.