Index: trunk/extensions/Translate/data/plural-cldr.yaml |
— | — | @@ -11,6 +11,8 @@ |
12 | 12 | bm: Zero |
13 | 13 | bn: Default |
14 | 14 | bo: Zero |
| 15 | + br: Rule S |
| 16 | + brx: Default |
15 | 17 | bs: Rule J |
16 | 18 | ca: Default |
17 | 19 | chr: Default |
— | — | @@ -157,6 +159,7 @@ |
158 | 160 | one: n is 1 |
159 | 161 | Rule L: |
160 | 162 | few: n mod 10 in 2..4 and n mod 100 not in 12..14 |
| 163 | + many: n is not 1 and n mod 10 in 0..1 or n mod 10 in 5..9 or n mod 100 in 12..14 |
161 | 164 | one: n is 1 |
162 | 165 | Rule M: |
163 | 166 | few: n mod 100 in 3..4 |
— | — | @@ -169,14 +172,22 @@ |
170 | 173 | Rule O: |
171 | 174 | one: n mod 10 is 1 and n is not 11 |
172 | 175 | Rule P: |
173 | | - many: n is 8 or n is 11 |
| 176 | + few: n is 3 |
| 177 | + many: n is 6 |
174 | 178 | one: n is 1 |
175 | 179 | two: n is 2 |
| 180 | + zero: n is 0 |
176 | 181 | Rule Q: |
177 | 182 | one: n within 0..2 and n is not 0 and n is not 2 |
178 | 183 | zero: n is 0 |
179 | 184 | Rule R: |
180 | 185 | few: n in 2..10 |
181 | 186 | one: n within 0..1 |
| 187 | + Rule S: |
| 188 | + few: n is 3 |
| 189 | + many: n is 6 |
| 190 | + one: n is 1 |
| 191 | + two: n is 2 |
| 192 | + zero: n is 0 |
182 | 193 | Zero: [] |
183 | 194 | |
Index: trunk/extensions/Translate/scripts/cldr-plural-to-yaml.php |
— | — | @@ -33,7 +33,7 @@ |
34 | 34 | |
35 | 35 | $doc = new DOMDocument(); |
36 | 36 | $doc->load( 'plurals.xml' ); |
37 | | - |
| 37 | + |
38 | 38 | $rulesets = $doc->getElementsByTagName( "pluralRules" ); |
39 | 39 | foreach( $rulesets as $ruleset ) { |
40 | 40 | $codes = $ruleset->getAttribute( 'locales' ); |
— | — | @@ -69,7 +69,7 @@ |
70 | 70 | } |
71 | 71 | } |
72 | 72 | |
73 | | - file_put_contents( 'plural-CLDR.yaml', TranslateYaml::dump( array( |
| 73 | + file_put_contents( 'plural-cldr.yaml', TranslateYaml::dump( array( |
74 | 74 | 'locales' => $outLocales, |
75 | 75 | 'rulesets' => $outRulesets, |
76 | 76 | ) ) ); |
Index: trunk/extensions/Translate/scripts/plural-comparison.php |
— | — | @@ -35,7 +35,7 @@ |
36 | 36 | $this->output( sprintf( "%12s %3s %3s %4s\n", 'Code', 'MW', 'Get', 'CLDR' ) ); |
37 | 37 | foreach( $allkeys as $index => $code ) { |
38 | 38 | $mw = isset( $mwLanguages[$code] ) ? ( $mwLanguages[$code] === false ? '.' : '+' ) : ''; |
39 | | - $gt = isset( $gtLanguages[$code] ) ? ( $gtLanguages[$code] === '(n != 1)' ? '.' : '+' ) : ''; |
| 39 | + $gt = isset( $gtLanguages[$code] ) ? ( $gtLanguages[$code] === '(n != 1);' ? '.' : '+' ) : ''; |
40 | 40 | $cl = isset( $clLanguages[$code] ) ? ( $clLanguages[$code][0] === 'Default' ? '.' : '+' ) : ''; |
41 | 41 | $this->output( sprintf( "%12s %-3s %-3s %-4s\n", $code, $mw, $gt, $cl ) ); |
42 | 42 | |