Index: trunk/extensions/cldr/rebuild.php |
— | — | @@ -89,7 +89,7 @@ |
90 | 90 | $this->languages = true; |
91 | 91 | } |
92 | 92 | if ( $this->languages && $name === 'LANGUAGE' ) { |
93 | | - if ( !isset($attrs["ALT"] ) && !isset( $attrs["DRAFT"] ) ) { // Exclude names that are alt or draft |
| 93 | + if ( !isset($attrs["ALT"] ) ) { // Exclude names that are alt. |
94 | 94 | $this->parseContents = true; |
95 | 95 | $this->type = str_replace( '_', '-', strtolower( $attrs['TYPE'] ) ); |
96 | 96 | $this->languageOutput .= "'$this->type' => '"; |
— | — | @@ -160,7 +160,7 @@ |
161 | 161 | $this->currency = true; |
162 | 162 | } |
163 | 163 | if ( $this->currency && $name == 'DISPLAYNAME' ) { |
164 | | - if ( !isset( $attrs["DRAFT"] ) && !isset( $attrs["COUNT"] ) ) { // Exclude drafts and plurals |
| 164 | + if ( !isset( $attrs["COUNT"] ) ) { // Exclude plurals. |
165 | 165 | $this->currencyOutput .= "'$this->type' => '"; |
166 | 166 | $this->parseContents = true; |
167 | 167 | } |
— | — | @@ -231,15 +231,13 @@ |
232 | 232 | $this->countries = true; |
233 | 233 | } |
234 | 234 | if ( $this->countries && $name === 'TERRITORY' ) { |
235 | | - if ( !isset( $attrs["DRAFT"] ) ) { // Exclude names that are draft |
236 | | - // Exclude alt names unless they are short alternatives (which we prefer) |
237 | | - if ( !isset( $attrs["ALT"] ) || ( isset( $attrs["ALT"] ) && $attrs["ALT"] == 'short' ) ) { |
238 | | - preg_match( '/[A-Z][A-Z]/', $attrs['TYPE'], $matches ); |
239 | | - if ( $matches && $matches[0] !== 'ZZ' ) { // Exclude ZZ => Unknown Region |
240 | | - $this->parseContents = true; |
241 | | - $this->type = $matches[0]; |
242 | | - $this->countryOutput .= "'$this->type' => '"; |
243 | | - } |
| 235 | + // Exclude alt names unless they are short alternatives (which we prefer) |
| 236 | + if ( !isset( $attrs["ALT"] ) || ( isset( $attrs["ALT"] ) && $attrs["ALT"] == 'short' ) ) { |
| 237 | + preg_match( '/[A-Z][A-Z]/', $attrs['TYPE'], $matches ); |
| 238 | + if ( $matches && $matches[0] !== 'ZZ' ) { // Exclude ZZ => Unknown Region |
| 239 | + $this->parseContents = true; |
| 240 | + $this->type = $matches[0]; |
| 241 | + $this->countryOutput .= "'$this->type' => '"; |
244 | 242 | } |
245 | 243 | } |
246 | 244 | } |