Commit add6d13
committed
Document the CLDR↔GlotPress slug mismatch in the plural-rules generator
`generate_ios_plural_rules.rb` keys CLDR locale codes against GlotPress
slugs 1:1, so a language GlotPress addresses by a different code than CLDR
(Belarusian is `bel` in GlotPress vs `be` in CLDR; likewise `mya`/`my`,
`dzo`/`dz`, …) returns `nil` from `nplurals_for` and is omitted from the
generated table. Those locales fail loud (UnknownLocaleError, now a clean
`UI.user_error!`) rather than being mis-mapped, and none are in the apps'
shipped set — but the omission was undocumented and reads as accidental,
since the old hand-written table had `be`.
Note the limitation at `nplurals_for` and in the header, including the fix
(a vetted CLDR→GlotPress alias map — a literal mapping, not prefix-matching,
since `sc`/`scn` and `ve`/`vec` are different languages) for if one of these
locales ever ships. Comment-only; the generated table is unchanged.1 parent 27ac9cb commit add6d13
1 file changed
Lines changed: 14 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
19 | 23 | | |
20 | 24 | | |
21 | 25 | | |
| |||
65 | 69 | | |
66 | 70 | | |
67 | 71 | | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
68 | 82 | | |
69 | 83 | | |
70 | 84 | | |
| |||
0 commit comments