File tree Expand file tree Collapse file tree 2 files changed +15
-0
lines changed
Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change 9292
9393result = {}
9494decimals = {}
95+ decimal_extras = {}
9596
9697with open (BASE_FILE ) as handle :
9798 data = json .load (handle )
103104 if "@integer" in rule
104105 ]
105106 decimals [locale ] = [name .replace ("pluralRule-count-" , "" ) for name in rules ]
107+ only_decimals = set (decimals [locale ]) - set (result [locale ])
108+ if only_decimals :
109+ decimal_extras [locale ] = list (only_decimals )
106110
107111# Process CLDR
108112with open (ALIASES_FILE ) as handle :
148152 output .write (HEADER )
149153 output .write (f"PLURAL_TAGS = { pprint .pformat (result )} \n \n " )
150154 output .write (f"DECIMAL_PLURAL_TAGS = { pprint .pformat (decimals )} \n " )
155+ output .write (f"DECIMAL_EXTRA_TAGS = { pprint .pformat (decimal_extras )} \n " )
151156 output .write (f"QT_PLURAL_TAGS = { pprint .pformat (qtplurals )} \n " )
152157
153158# Apply coding style
Original file line number Diff line number Diff line change 725725 "zh" : ["other" ],
726726 "zu" : ["one" , "other" ],
727727}
728+ DECIMAL_EXTRA_TAGS = {
729+ "be" : ["other" ],
730+ "cs" : ["many" ],
731+ "gv" : ["many" ],
732+ "lt" : ["many" ],
733+ "pl" : ["other" ],
734+ "ru" : ["other" ],
735+ "sk" : ["many" ],
736+ "uk" : ["other" ],
737+ }
728738QT_PLURAL_TAGS = {
729739 "aa" : ["one" , "other" ],
730740 "ab" : ["one" , "other" ],
You can’t perform that action at this time.
0 commit comments