|
| 1 | +--- |
| 2 | +title: Adding/Fixing Plural and Ordinals |
| 3 | +--- |
| 4 | + |
| 5 | +# Adding/Fixing Plural and Ordinals |
| 6 | + |
| 7 | +## Run WritePluralRulesSpreadsheets.java |
| 8 | +Q: Is the output supposed to be captured somewhere? Prints stuff to console. |
| 9 | + |
| 10 | +## Adding rules for a locale |
| 11 | +- Add the new plural and ordinal rules to plurals.xml and ordinals.xml. |
| 12 | +- Run GeneratedPluralSamples as below. |
| 13 | +- Add the minimal pairs to the locale. |
| 14 | + |
| 15 | +## Changing rules/ranges |
| 16 | + |
| 17 | +Whenever you change plural rules, ordinal rules, or plural ranges — and at the end of the release — you must do the following. The reformatting is required, since it regenerates the samples (after @), which are now necessary for correct functioning of ICU and other clients. |
| 18 | + |
| 19 | +1. Run GeneratePluralRanges.java to reformat pluralRanges.xml |
| 20 | + - Overwrites cldr/common/supplemental/pluralRanges.xml in place. |
| 21 | + - Diff, commit if changed. |
| 22 | +1. Run GeneratedPluralSamples to reformat plurals.xml, ordinals.xml. |
| 23 | + - Overwrites cldr/common/supplemental/plurals.xml and cldr/common/supplemental/ordinals.xml in place. |
| 24 | + - Diff, commit if changed. |
| 25 | +1. Run GenerateAllCharts (actually, it is enough to run ShowLanguages) and the unit tests. |
| 26 | + - This will insure that the rules are correctly represented, and aligned with the minimal pairs. |
| 27 | + - Diff the plurals chart against the old one: eg v.s. https://unicode-org.github.io/cldr-staging/charts/38/supplemental/language_plural_rules.html |
| 28 | +~~1. Run FindPluralDifferences to see that the expected changes are there (only tests integers right now).~~ |
| 29 | +~~- Modify the versions variable to use the last release.~~ |
| 30 | +~~- This is also run at the end of the release to get the Migration info for the release.~~ |
| 31 | +1. Compare the results carefully, then check in. |
0 commit comments