Skip to content
This repository
Browse code

after correcting nld the iso standard should be enforced for all lang…

…uages
  • Loading branch information...
commit 032704346a99c0daf31e4a95ed6d5bdcb36187e2 1 parent e550332
Mark authored September 28, 2012
79  lib/Cake/I18n/L10n.php
@@ -85,47 +85,52 @@ class L10n {
85 85
 
86 86
 /**
87 87
  * Maps ISO 639-3 to I10n::_l10nCatalog
  88
+ * The terminological codes (first one per language) should be used if possible.
  89
+ * The bibliographic codes are aliases and work as well, though.
88 90
  *
89 91
  * @var array
90 92
  */
91 93
 	protected $_l10nMap = array(
92 94
 		/* Afrikaans */ 'afr' => 'af',
93  
-		/* Albanian */ 'alb' => 'sq',
  95
+		/* Albanian */ 'sqi' => 'sq',
  96
+		/* Albanian - bibliographic */ 'alb' => 'sq',
94 97
 		/* Arabic */ 'ara' => 'ar',
95  
-		/* Armenian - Armenia */ 'hye' => 'hy',
  98
+		/* Armenian/Armenia */ 'hye' => 'hy',
  99
+		/* Basque */ 'eus' => 'eu',
96 100
 		/* Basque */ 'baq' => 'eu',
97 101
 		/* Tibetan */ 'bod' => 'bo',
  102
+		/* Tibetan - bibliographic */ 'tib' => 'bo',
98 103
 		/* Bosnian */ 'bos' => 'bs',
99 104
 		/* Bulgarian */ 'bul' => 'bg',
100 105
 		/* Byelorussian */ 'bel' => 'be',
101 106
 		/* Catalan */ 'cat' => 'ca',
102  
-		/* Chinese */ 'chi' => 'zh',
103 107
 		/* Chinese */ 'zho' => 'zh',
  108
+		/* Chinese - bibliographic */ 'chi' => 'zh',
104 109
 		/* Croatian */ 'hrv' => 'hr',
105  
-		/* Czech */ 'cze' => 'cs',
106 110
 		/* Czech */ 'ces' => 'cs',
  111
+		/* Czech - bibliographic */ 'cze' => 'cs',
107 112
 		/* Danish */ 'dan' => 'da',
108 113
 		/* Dutch (Standard) */ 'nld' => 'nl',
109  
-		/* Dutch (Standard) */ 'dut' => 'nl',
  114
+		/* Dutch (Standard) - bibliographic */ 'dut' => 'nl',
110 115
 		/* English */ 'eng' => 'en',
111 116
 		/* Estonian */ 'est' => 'et',
112 117
 		/* Faeroese */ 'fao' => 'fo',
113  
-		/* Farsi */ 'fas' => 'fa',
114  
-		/* Farsi */ 'per' => 'fa',
  118
+		/* Farsi/Persian */ 'fas' => 'fa',
  119
+		/* Farsi/Persian - bibliographic */ 'per' => 'fa',
115 120
 		/* Finnish */ 'fin' => 'fi',
116  
-		/* French (Standard) */ 'fre' => 'fr',
117 121
 		/* French (Standard) */ 'fra' => 'fr',
  122
+		/* French (Standard)  - bibliographic */ 'fre' => 'fr',
118 123
 		/* Gaelic (Scots) */ 'gla' => 'gd',
119 124
 		/* Galician */ 'glg' => 'gl',
120 125
 		/* German (Standard) */ 'deu' => 'de',
121  
-		/* German (Standard) */ 'ger' => 'de',
  126
+		/* German (Standard) - bibliographic */ 'ger' => 'de',
122 127
 		/* Greek */ 'gre' => 'el',
123 128
 		/* Greek */ 'ell' => 'el',
124 129
 		/* Hebrew */ 'heb' => 'he',
125 130
 		/* Hindi */ 'hin' => 'hi',
126 131
 		/* Hungarian */ 'hun' => 'hu',
127  
-		/* Icelandic */ 'ice' => 'is',
128 132
 		/* Icelandic */ 'isl' => 'is',
  133
+		/* Icelandic - bibliographic */ 'ice' => 'is',
129 134
 		/* Indonesian */ 'ind' => 'id',
130 135
 		/* Irish */ 'gle' => 'ga',
131 136
 		/* Italian */ 'ita' => 'it',
@@ -133,10 +138,10 @@ class L10n {
133 138
 		/* Korean */ 'kor' => 'ko',
134 139
 		/* Latvian */ 'lav' => 'lv',
135 140
 		/* Lithuanian */ 'lit' => 'lt',
136  
-		/* Macedonian */ 'mac' => 'mk',
137 141
 		/* Macedonian */ 'mkd' => 'mk',
138  
-		/* Malaysian */ 'may' => 'ms',
  142
+		/* Macedonian - bibliographic */ 'mac' => 'mk',
139 143
 		/* Malaysian */ 'msa' => 'ms',
  144
+		/* Malaysian - bibliographic */ 'may' => 'ms',
140 145
 		/* Maltese */ 'mlt' => 'mt',
141 146
 		/* Norwegian */ 'nor' => 'no',
142 147
 		/* Norwegian Bokmal */ 'nob' => 'nb',
@@ -144,14 +149,13 @@ class L10n {
144 149
 		/* Polish */ 'pol' => 'pl',
145 150
 		/* Portuguese (Portugal) */ 'por' => 'pt',
146 151
 		/* Rhaeto-Romanic */ 'roh' => 'rm',
147  
-		/* Romanian */ 'rum' => 'ro',
148 152
 		/* Romanian */ 'ron' => 'ro',
  153
+		/* Romanian - bibliographic */ 'rum' => 'ro',
149 154
 		/* Russian */ 'rus' => 'ru',
150 155
 		/* Sami (Lappish) */ 'smi' => 'sz',
151  
-		/* Serbian */ 'scc' => 'sr',
152 156
 		/* Serbian */ 'srp' => 'sr',
153  
-		/* Slovak */ 'slo' => 'sk',
154 157
 		/* Slovak */ 'slk' => 'sk',
  158
+		/* Slovak - bibliographic */ 'slo' => 'sk',
155 159
 		/* Slovenian */ 'slv' => 'sl',
156 160
 		/* Sorbian */ 'wen' => 'sb',
157 161
 		/* Spanish (Spain - Traditional) */ 'spa' => 'es',
@@ -165,6 +169,7 @@ class L10n {
165 169
 		/* Venda */ 'ven' => 've',
166 170
 		/* Vietnamese */ 'vie' => 'vi',
167 171
 		/* Welsh */ 'cym' => 'cy',
  172
+		/* Welsh - bibliographic */ 'wel' => 'cy',
168 173
 		/* Xhosa */ 'xho' => 'xh',
169 174
 		/* Yiddish */ 'yid' => 'yi',
170 175
 		/* Zulu */ 'zul' => 'zu'
@@ -203,7 +208,7 @@ class L10n {
203 208
 		'bo-in' => array('language' => 'Tibetan (India)', 'locale' => 'bo_in', 'localeFallback' => 'bod', 'charset' => 'utf-8', 'direction' => 'ltr'),
204 209
 		'bs' => array('language' => 'Bosnian', 'locale' => 'bos', 'localeFallback' => 'bos', 'charset' => 'utf-8', 'direction' => 'ltr'),
205 210
 		'ca' => array('language' => 'Catalan', 'locale' => 'cat', 'localeFallback' => 'cat', 'charset' => 'utf-8', 'direction' => 'ltr'),
206  
-		'cs' => array('language' => 'Czech', 'locale' => 'cze', 'localeFallback' => 'cze', 'charset' => 'utf-8', 'direction' => 'ltr'),
  211
+		'cs' => array('language' => 'Czech', 'locale' => 'ces', 'localeFallback' => 'ces', 'charset' => 'utf-8', 'direction' => 'ltr'),
207 212
 		'da' => array('language' => 'Danish', 'locale' => 'dan', 'localeFallback' => 'dan', 'charset' => 'utf-8', 'direction' => 'ltr'),
208 213
 		'de' => array('language' => 'German (Standard)', 'locale' => 'deu', 'localeFallback' => 'deu', 'charset' => 'utf-8', 'direction' => 'ltr'),
209 214
 		'de-at' => array('language' => 'German (Austria)', 'locale' => 'de_at', 'localeFallback' => 'deu', 'charset' => 'utf-8', 'direction' => 'ltr'),
@@ -245,16 +250,16 @@ class L10n {
245 250
 		'es-uy' => array('language' => 'Spanish (Uruguay)', 'locale' => 'es_uy', 'localeFallback' => 'spa', 'charset' => 'utf-8', 'direction' => 'ltr'),
246 251
 		'es-ve' => array('language' => 'Spanish (Venezuela)', 'locale' => 'es_ve', 'localeFallback' => 'spa', 'charset' => 'utf-8', 'direction' => 'ltr'),
247 252
 		'et' => array('language' => 'Estonian', 'locale' => 'est', 'localeFallback' => 'est', 'charset' => 'utf-8', 'direction' => 'ltr'),
248  
-		'eu' => array('language' => 'Basque', 'locale' => 'baq', 'localeFallback' => 'baq', 'charset' => 'utf-8', 'direction' => 'ltr'),
  253
+		'eu' => array('language' => 'Basque', 'locale' => 'eus', 'localeFallback' => 'eus', 'charset' => 'utf-8', 'direction' => 'ltr'),
249 254
 		'fa' => array('language' => 'Farsi', 'locale' => 'per', 'localeFallback' => 'per', 'charset' => 'utf-8', 'direction' => 'rtl'),
250 255
 		'fi' => array('language' => 'Finnish', 'locale' => 'fin', 'localeFallback' => 'fin', 'charset' => 'utf-8', 'direction' => 'ltr'),
251 256
 		'fo' => array('language' => 'Faeroese', 'locale' => 'fao', 'localeFallback' => 'fao', 'charset' => 'utf-8', 'direction' => 'ltr'),
252  
-		'fr' => array('language' => 'French (Standard)', 'locale' => 'fre', 'localeFallback' => 'fre', 'charset' => 'utf-8', 'direction' => 'ltr'),
253  
-		'fr-be' => array('language' => 'French (Belgium)', 'locale' => 'fr_be', 'localeFallback' => 'fre', 'charset' => 'utf-8', 'direction' => 'ltr'),
254  
-		'fr-ca' => array('language' => 'French (Canadian)', 'locale' => 'fr_ca', 'localeFallback' => 'fre', 'charset' => 'utf-8', 'direction' => 'ltr'),
255  
-		'fr-ch' => array('language' => 'French (Swiss)', 'locale' => 'fr_ch', 'localeFallback' => 'fre', 'charset' => 'utf-8', 'direction' => 'ltr'),
256  
-		'fr-fr' => array('language' => 'French (France)', 'locale' => 'fr_fr', 'localeFallback' => 'fre', 'charset' => 'utf-8', 'direction' => 'ltr'),
257  
-		'fr-lu' => array('language' => 'French (Luxembourg)', 'locale' => 'fr_lu', 'localeFallback' => 'fre', 'charset' => 'utf-8', 'direction' => 'ltr'),
  257
+		'fr' => array('language' => 'French (Standard)', 'locale' => 'fra', 'localeFallback' => 'fra', 'charset' => 'utf-8', 'direction' => 'ltr'),
  258
+		'fr-be' => array('language' => 'French (Belgium)', 'locale' => 'fr_be', 'localeFallback' => 'fra', 'charset' => 'utf-8', 'direction' => 'ltr'),
  259
+		'fr-ca' => array('language' => 'French (Canadian)', 'locale' => 'fr_ca', 'localeFallback' => 'fra', 'charset' => 'utf-8', 'direction' => 'ltr'),
  260
+		'fr-ch' => array('language' => 'French (Swiss)', 'locale' => 'fr_ch', 'localeFallback' => 'fra', 'charset' => 'utf-8', 'direction' => 'ltr'),
  261
+		'fr-fr' => array('language' => 'French (France)', 'locale' => 'fr_fr', 'localeFallback' => 'fra', 'charset' => 'utf-8', 'direction' => 'ltr'),
  262
+		'fr-lu' => array('language' => 'French (Luxembourg)', 'locale' => 'fr_lu', 'localeFallback' => 'fra', 'charset' => 'utf-8', 'direction' => 'ltr'),
258 263
 		'ga' => array('language' => 'Irish', 'locale' => 'gle', 'localeFallback' => 'gle', 'charset' => 'utf-8', 'direction' => 'ltr'),
259 264
 		'gd' => array('language' => 'Gaelic (Scots)', 'locale' => 'gla', 'localeFallback' => 'gla', 'charset' => 'utf-8', 'direction' => 'ltr'),
260 265
 		'gd-ie' => array('language' => 'Gaelic (Irish)', 'locale' => 'gd_ie', 'localeFallback' => 'gla', 'charset' => 'utf-8', 'direction' => 'ltr'),
@@ -266,7 +271,7 @@ class L10n {
266 271
 		'hy' => array('language' => 'Armenian - Armenia', 'locale' => 'hye', 'localeFallback' => 'hye', 'charset' => 'utf-8', 'direction' => 'ltr'),
267 272
 		'id' => array('language' => 'Indonesian', 'locale' => 'ind', 'localeFallback' => 'ind', 'charset' => 'utf-8', 'direction' => 'ltr'),
268 273
 		'in' => array('language' => 'Indonesian', 'locale' => 'ind', 'localeFallback' => 'ind', 'charset' => 'utf-8', 'direction' => 'ltr'),
269  
-		'is' => array('language' => 'Icelandic', 'locale' => 'ice', 'localeFallback' => 'ice', 'charset' => 'utf-8', 'direction' => 'ltr'),
  274
+		'is' => array('language' => 'Icelandic', 'locale' => 'isl', 'localeFallback' => 'isl', 'charset' => 'utf-8', 'direction' => 'ltr'),
270 275
 		'it' => array('language' => 'Italian', 'locale' => 'ita', 'localeFallback' => 'ita', 'charset' => 'utf-8', 'direction' => 'ltr'),
271 276
 		'it-ch' => array('language' => 'Italian (Swiss) ', 'locale' => 'it_ch', 'localeFallback' => 'ita', 'charset' => 'utf-8', 'direction' => 'ltr'),
272 277
 		'ja' => array('language' => 'Japanese', 'locale' => 'jpn', 'localeFallback' => 'jpn', 'charset' => 'utf-8', 'direction' => 'ltr'),
@@ -276,9 +281,9 @@ class L10n {
276 281
 		'koi8-r' => array('language' => 'Russian', 'locale' => 'koi8_r', 'localeFallback' => 'rus', 'charset' => 'koi8-r', 'direction' => 'ltr'),
277 282
 		'lt' => array('language' => 'Lithuanian', 'locale' => 'lit', 'localeFallback' => 'lit', 'charset' => 'utf-8', 'direction' => 'ltr'),
278 283
 		'lv' => array('language' => 'Latvian', 'locale' => 'lav', 'localeFallback' => 'lav', 'charset' => 'utf-8', 'direction' => 'ltr'),
279  
-		'mk' => array('language' => 'FYRO Macedonian', 'locale' => 'mk', 'localeFallback' => 'mac', 'charset' => 'utf-8', 'direction' => 'ltr'),
280  
-		'mk-mk' => array('language' => 'Macedonian', 'locale' => 'mk_mk', 'localeFallback' => 'mac', 'charset' => 'utf-8', 'direction' => 'ltr'),
281  
-		'ms' => array('language' => 'Malaysian', 'locale' => 'may', 'localeFallback' => 'may', 'charset' => 'utf-8', 'direction' => 'ltr'),
  284
+		'mk' => array('language' => 'FYRO Macedonian', 'locale' => 'mk', 'localeFallback' => 'mkd', 'charset' => 'utf-8', 'direction' => 'ltr'),
  285
+		'mk-mk' => array('language' => 'Macedonian', 'locale' => 'mk_mk', 'localeFallback' => 'mkd', 'charset' => 'utf-8', 'direction' => 'ltr'),
  286
+		'ms' => array('language' => 'Malaysian', 'locale' => 'msa', 'localeFallback' => 'msa', 'charset' => 'utf-8', 'direction' => 'ltr'),
282 287
 		'mt' => array('language' => 'Maltese', 'locale' => 'mlt', 'localeFallback' => 'mlt', 'charset' => 'utf-8', 'direction' => 'ltr'),
283 288
 		'n' => array('language' => 'Dutch (Standard)', 'locale' => 'nld', 'localeFallback' => 'nld', 'charset' => 'utf-8', 'direction' => 'ltr'),
284 289
 		'nb' => array('language' => 'Norwegian Bokmal', 'locale' => 'nob', 'localeFallback' => 'nor', 'charset' => 'utf-8', 'direction' => 'ltr'),
@@ -291,15 +296,15 @@ class L10n {
291 296
 		'pt' => array('language' => 'Portuguese (Portugal)', 'locale' => 'por', 'localeFallback' => 'por', 'charset' => 'utf-8', 'direction' => 'ltr'),
292 297
 		'pt-br' => array('language' => 'Portuguese (Brazil)', 'locale' => 'pt_br', 'localeFallback' => 'por', 'charset' => 'utf-8', 'direction' => 'ltr'),
293 298
 		'rm' => array('language' => 'Rhaeto-Romanic', 'locale' => 'roh', 'localeFallback' => 'roh', 'charset' => 'utf-8', 'direction' => 'ltr'),
294  
-		'ro' => array('language' => 'Romanian', 'locale' => 'rum', 'localeFallback' => 'rum', 'charset' => 'utf-8', 'direction' => 'ltr'),
295  
-		'ro-mo' => array('language' => 'Romanian (Moldavia)', 'locale' => 'ro_mo', 'localeFallback' => 'rum', 'charset' => 'utf-8', 'direction' => 'ltr'),
  299
+		'ro' => array('language' => 'Romanian', 'locale' => 'ron', 'localeFallback' => 'ron', 'charset' => 'utf-8', 'direction' => 'ltr'),
  300
+		'ro-mo' => array('language' => 'Romanian (Moldavia)', 'locale' => 'ro_mo', 'localeFallback' => 'ron', 'charset' => 'utf-8', 'direction' => 'ltr'),
296 301
 		'ru' => array('language' => 'Russian', 'locale' => 'rus', 'localeFallback' => 'rus', 'charset' => 'utf-8', 'direction' => 'ltr'),
297 302
 		'ru-mo' => array('language' => 'Russian (Moldavia)', 'locale' => 'ru_mo', 'localeFallback' => 'rus', 'charset' => 'utf-8', 'direction' => 'ltr'),
298 303
 		'sb' => array('language' => 'Sorbian', 'locale' => 'wen', 'localeFallback' => 'wen', 'charset' => 'utf-8', 'direction' => 'ltr'),
299  
-		'sk' => array('language' => 'Slovak', 'locale' => 'slo', 'localeFallback' => 'slo', 'charset' => 'utf-8', 'direction' => 'ltr'),
  304
+		'sk' => array('language' => 'Slovak', 'locale' => 'slk', 'localeFallback' => 'slk', 'charset' => 'utf-8', 'direction' => 'ltr'),
300 305
 		'sl' => array('language' => 'Slovenian', 'locale' => 'slv', 'localeFallback' => 'slv', 'charset' => 'utf-8', 'direction' => 'ltr'),
301  
-		'sq' => array('language' => 'Albanian', 'locale' => 'alb', 'localeFallback' => 'alb', 'charset' => 'utf-8', 'direction' => 'ltr'),
302  
-		'sr' => array('language' => 'Serbian', 'locale' => 'scc', 'localeFallback' => 'scc', 'charset' => 'utf-8', 'direction' => 'ltr'),
  306
+		'sq' => array('language' => 'Albanian', 'locale' => 'sqi', 'localeFallback' => 'sqi', 'charset' => 'utf-8', 'direction' => 'ltr'),
  307
+		'sr' => array('language' => 'Serbian', 'locale' => 'srp', 'localeFallback' => 'srp', 'charset' => 'utf-8', 'direction' => 'ltr'),
303 308
 		'sv' => array('language' => 'Swedish', 'locale' => 'swe', 'localeFallback' => 'swe', 'charset' => 'utf-8', 'direction' => 'ltr'),
304 309
 		'sv-fi' => array('language' => 'Swedish (Finland)', 'locale' => 'sv_fi', 'localeFallback' => 'swe', 'charset' => 'utf-8', 'direction' => 'ltr'),
305 310
 		'sx' => array('language' => 'Sutu', 'locale' => 'sx', 'localeFallback' => 'sx', 'charset' => 'utf-8', 'direction' => 'ltr'),
@@ -315,11 +320,11 @@ class L10n {
315 320
 		'cy' => array('language' => 'Welsh', 'locale' => 'cym', 'localeFallback' => 'cym', 'charset' => 'utf-8', 'direction' => 'ltr'),
316 321
 		'xh' => array('language' => 'Xhosa', 'locale' => 'xho', 'localeFallback' => 'xho', 'charset' => 'utf-8', 'direction' => 'ltr'),
317 322
 		'yi' => array('language' => 'Yiddish', 'locale' => 'yid', 'localeFallback' => 'yid', 'charset' => 'utf-8', 'direction' => 'ltr'),
318  
-		'zh' => array('language' => 'Chinese', 'locale' => 'chi', 'localeFallback' => 'chi', 'charset' => 'utf-8', 'direction' => 'ltr'),
319  
-		'zh-cn' => array('language' => 'Chinese (PRC)', 'locale' => 'zh_cn', 'localeFallback' => 'chi', 'charset' => 'GB2312', 'direction' => 'ltr'),
320  
-		'zh-hk' => array('language' => 'Chinese (Hong Kong)', 'locale' => 'zh_hk', 'localeFallback' => 'chi', 'charset' => 'utf-8', 'direction' => 'ltr'),
321  
-		'zh-sg' => array('language' => 'Chinese (Singapore)', 'locale' => 'zh_sg', 'localeFallback' => 'chi', 'charset' => 'utf-8', 'direction' => 'ltr'),
322  
-		'zh-tw' => array('language' => 'Chinese (Taiwan)', 'locale' => 'zh_tw', 'localeFallback' => 'chi', 'charset' => 'utf-8', 'direction' => 'ltr'),
  323
+		'zh' => array('language' => 'Chinese', 'locale' => 'zho', 'localeFallback' => 'zho', 'charset' => 'utf-8', 'direction' => 'ltr'),
  324
+		'zh-cn' => array('language' => 'Chinese (PRC)', 'locale' => 'zh_cn', 'localeFallback' => 'zho', 'charset' => 'GB2312', 'direction' => 'ltr'),
  325
+		'zh-hk' => array('language' => 'Chinese (Hong Kong)', 'locale' => 'zh_hk', 'localeFallback' => 'zho', 'charset' => 'utf-8', 'direction' => 'ltr'),
  326
+		'zh-sg' => array('language' => 'Chinese (Singapore)', 'locale' => 'zh_sg', 'localeFallback' => 'zho', 'charset' => 'utf-8', 'direction' => 'ltr'),
  327
+		'zh-tw' => array('language' => 'Chinese (Taiwan)', 'locale' => 'zh_tw', 'localeFallback' => 'zho', 'charset' => 'utf-8', 'direction' => 'ltr'),
323 328
 		'zu' => array('language' => 'Zulu', 'locale' => 'zul', 'localeFallback' => 'zul', 'charset' => 'utf-8', 'direction' => 'ltr')
324 329
 	);
325 330
 
100  lib/Cake/Test/Case/I18n/L10nTest.php
@@ -125,8 +125,12 @@ public function testMap() {
125 125
 		$expected = array('afr' => 'af', 'af' => 'afr');
126 126
 		$this->assertEquals($expected, $result);
127 127
 
  128
+		$result = $localize->map(array('sqi', 'sq'));
  129
+		$expected = array('sqi' => 'sq', 'sq' => 'sqi');
  130
+		$this->assertEquals($expected, $result);
  131
+
128 132
 		$result = $localize->map(array('alb', 'sq'));
129  
-		$expected = array('alb' => 'sq', 'sq' => 'alb');
  133
+		$expected = array('alb' => 'sq', 'sq' => 'sqi');
130 134
 		$this->assertEquals($expected, $result);
131 135
 
132 136
 		$result = $localize->map(array('ara', 'ar'));
@@ -137,12 +141,12 @@ public function testMap() {
137 141
 		$expected = array('hye' => 'hy', 'hy' => 'hye');
138 142
 		$this->assertEquals($expected, $result);
139 143
 
140  
-		$result = $localize->map(array('baq', 'eu'));
141  
-		$expected = array('baq' => 'eu', 'eu' => 'baq');
  144
+		$result = $localize->map(array('eus', 'eu'));
  145
+		$expected = array('eus' => 'eu', 'eu' => 'eus');
142 146
 		$this->assertEquals($expected, $result);
143 147
 
144 148
 		$result = $localize->map(array('baq', 'eu'));
145  
-		$expected = array('baq' => 'eu', 'eu' => 'baq');
  149
+		$expected = array('baq' => 'eu', 'eu' => 'eus');
146 150
 		$this->assertEquals($expected, $result);
147 151
 
148 152
 		$result = $localize->map(array('bos', 'bs'));
@@ -162,11 +166,11 @@ public function testMap() {
162 166
 		$this->assertEquals($expected, $result);
163 167
 
164 168
 		$result = $localize->map(array('chi', 'zh'));
165  
-		$expected = array('chi' => 'zh', 'zh' => 'chi');
  169
+		$expected = array('chi' => 'zh', 'zh' => 'zho');
166 170
 		$this->assertEquals($expected, $result);
167 171
 
168 172
 		$result = $localize->map(array('zho', 'zh'));
169  
-		$expected = array('zho' => 'zh', 'zh' => 'chi');
  173
+		$expected = array('zho' => 'zh', 'zh' => 'zho');
170 174
 		$this->assertEquals($expected, $result);
171 175
 
172 176
 		$result = $localize->map(array('hrv', 'hr'));
@@ -174,11 +178,11 @@ public function testMap() {
174 178
 		$this->assertEquals($expected, $result);
175 179
 
176 180
 		$result = $localize->map(array('ces', 'cs'));
177  
-		$expected = array('ces' => 'cs', 'cs' => 'cze');
  181
+		$expected = array('ces' => 'cs', 'cs' => 'ces');
178 182
 		$this->assertEquals($expected, $result);
179 183
 
180 184
 		$result = $localize->map(array('cze', 'cs'));
181  
-		$expected = array('cze' => 'cs', 'cs' => 'cze');
  185
+		$expected = array('cze' => 'cs', 'cs' => 'ces');
182 186
 		$this->assertEquals($expected, $result);
183 187
 
184 188
 		$result = $localize->map(array('dan', 'da'));
@@ -226,11 +230,11 @@ public function testMap() {
226 230
 		$this->assertEquals($expected, $result);
227 231
 
228 232
 		$result = $localize->map(array('fra', 'fr'));
229  
-		$expected = array('fra' => 'fr', 'fr' => 'fre');
  233
+		$expected = array('fra' => 'fr', 'fr' => 'fra');
230 234
 		$this->assertEquals($expected, $result);
231 235
 
232 236
 		$result = $localize->map(array('fre', 'fr'));
233  
-		$expected = array('fre' => 'fr', 'fr' => 'fre');
  237
+		$expected = array('fre' => 'fr', 'fr' => 'fra');
234 238
 		$this->assertEquals($expected, $result);
235 239
 
236 240
 		$result = $localize->map(array('gla', 'gd'));
@@ -270,11 +274,11 @@ public function testMap() {
270 274
 		$this->assertEquals($expected, $result);
271 275
 
272 276
 		$result = $localize->map(array('ice', 'is'));
273  
-		$expected = array('ice' => 'is', 'is' => 'ice');
  277
+		$expected = array('ice' => 'is', 'is' => 'isl');
274 278
 		$this->assertEquals($expected, $result);
275 279
 
276 280
 		$result = $localize->map(array('isl', 'is'));
277  
-		$expected = array('isl' => 'is', 'is' => 'ice');
  281
+		$expected = array('isl' => 'is', 'is' => 'isl');
278 282
 		$this->assertEquals($expected, $result);
279 283
 
280 284
 		$result = $localize->map(array('ind', 'id'));
@@ -306,19 +310,19 @@ public function testMap() {
306 310
 		$this->assertEquals($expected, $result);
307 311
 
308 312
 		$result = $localize->map(array('mac', 'mk'));
309  
-		$expected = array('mac' => 'mk', 'mk' => 'mac');
  313
+		$expected = array('mac' => 'mk', 'mk' => 'mkd');
310 314
 		$this->assertEquals($expected, $result);
311 315
 
312 316
 		$result = $localize->map(array('mkd', 'mk'));
313  
-		$expected = array('mkd' => 'mk', 'mk' => 'mac');
  317
+		$expected = array('mkd' => 'mk', 'mk' => 'mkd');
314 318
 		$this->assertEquals($expected, $result);
315 319
 
316 320
 		$result = $localize->map(array('may', 'ms'));
317  
-		$expected = array('may' => 'ms', 'ms' => 'may');
  321
+		$expected = array('may' => 'ms', 'ms' => 'msa');
318 322
 		$this->assertEquals($expected, $result);
319 323
 
320 324
 		$result = $localize->map(array('msa', 'ms'));
321  
-		$expected = array('msa' => 'ms', 'ms' => 'may');
  325
+		$expected = array('msa' => 'ms', 'ms' => 'msa');
322 326
 		$this->assertEquals($expected, $result);
323 327
 
324 328
 		$result = $localize->map(array('mlt', 'mt'));
@@ -350,11 +354,11 @@ public function testMap() {
350 354
 		$this->assertEquals($expected, $result);
351 355
 
352 356
 		$result = $localize->map(array('ron', 'ro'));
353  
-		$expected = array('ron' => 'ro', 'ro' => 'rum');
  357
+		$expected = array('ron' => 'ro', 'ro' => 'ron');
354 358
 		$this->assertEquals($expected, $result);
355 359
 
356 360
 		$result = $localize->map(array('rum', 'ro'));
357  
-		$expected = array('rum' => 'ro', 'ro' => 'rum');
  361
+		$expected = array('rum' => 'ro', 'ro' => 'ron');
358 362
 		$this->assertEquals($expected, $result);
359 363
 
360 364
 		$result = $localize->map(array('rus', 'ru'));
@@ -365,20 +369,16 @@ public function testMap() {
365 369
 		$expected = array('smi' => 'sz', 'sz' => 'smi');
366 370
 		$this->assertEquals($expected, $result);
367 371
 
368  
-		$result = $localize->map(array('scc', 'sr'));
369  
-		$expected = array('scc' => 'sr', 'sr' => 'scc');
370  
-		$this->assertEquals($expected, $result);
371  
-
372 372
 		$result = $localize->map(array('srp', 'sr'));
373  
-		$expected = array('srp' => 'sr', 'sr' => 'scc');
  373
+		$expected = array('srp' => 'sr', 'sr' => 'srp');
374 374
 		$this->assertEquals($expected, $result);
375 375
 
376 376
 		$result = $localize->map(array('slk', 'sk'));
377  
-		$expected = array('slk' => 'sk', 'sk' => 'slo');
  377
+		$expected = array('slk' => 'sk', 'sk' => 'slk');
378 378
 		$this->assertEquals($expected, $result);
379 379
 
380 380
 		$result = $localize->map(array('slo', 'sk'));
381  
-		$expected = array('slo' => 'sk', 'sk' => 'slo');
  381
+		$expected = array('slo' => 'sk', 'sk' => 'slk');
382 382
 		$this->assertEquals($expected, $result);
383 383
 
384 384
 		$result = $localize->map(array('slv', 'sl'));
@@ -509,7 +509,7 @@ public function testCatalog() {
509 509
 
510 510
 		$result = $localize->catalog(array('cs'));
511 511
 		$expected = array(
512  
-			'cs' => array('language' => 'Czech', 'locale' => 'cze', 'localeFallback' => 'cze', 'charset' => 'utf-8', 'direction' => 'ltr')
  512
+			'cs' => array('language' => 'Czech', 'locale' => 'ces', 'localeFallback' => 'ces', 'charset' => 'utf-8', 'direction' => 'ltr')
513 513
 		);
514 514
 		$this->assertEquals($expected, $result);
515 515
 
@@ -587,7 +587,7 @@ public function testCatalog() {
587 587
 
588 588
 		$result = $localize->catalog(array('eu'));
589 589
 		$expected = array(
590  
-			'eu' => array('language' => 'Basque', 'locale' => 'baq', 'localeFallback' => 'baq', 'charset' => 'utf-8', 'direction' => 'ltr')
  590
+			'eu' => array('language' => 'Basque', 'locale' => 'eus', 'localeFallback' => 'eus', 'charset' => 'utf-8', 'direction' => 'ltr')
591 591
 		);
592 592
 		$this->assertEquals($expected, $result);
593 593
 
@@ -611,12 +611,12 @@ public function testCatalog() {
611 611
 
612 612
 		$result = $localize->catalog(array('fr', 'fr-be', 'fr-ca', 'fr-ch', 'fr-fr', 'fr-lu'));
613 613
 		$expected = array(
614  
-			'fr' => array('language' => 'French (Standard)', 'locale' => 'fre', 'localeFallback' => 'fre', 'charset' => 'utf-8', 'direction' => 'ltr'),
615  
-			'fr-be' => array('language' => 'French (Belgium)', 'locale' => 'fr_be', 'localeFallback' => 'fre', 'charset' => 'utf-8', 'direction' => 'ltr'),
616  
-			'fr-ca' => array('language' => 'French (Canadian)', 'locale' => 'fr_ca', 'localeFallback' => 'fre', 'charset' => 'utf-8', 'direction' => 'ltr'),
617  
-			'fr-ch' => array('language' => 'French (Swiss)', 'locale' => 'fr_ch', 'localeFallback' => 'fre', 'charset' => 'utf-8', 'direction' => 'ltr'),
618  
-			'fr-fr' => array('language' => 'French (France)', 'locale' => 'fr_fr', 'localeFallback' => 'fre', 'charset' => 'utf-8', 'direction' => 'ltr'),
619  
-			'fr-lu' => array('language' => 'French (Luxembourg)', 'locale' => 'fr_lu', 'localeFallback' => 'fre', 'charset' => 'utf-8', 'direction' => 'ltr')
  614
+			'fr' => array('language' => 'French (Standard)', 'locale' => 'fra', 'localeFallback' => 'fra', 'charset' => 'utf-8', 'direction' => 'ltr'),
  615
+			'fr-be' => array('language' => 'French (Belgium)', 'locale' => 'fr_be', 'localeFallback' => 'fra', 'charset' => 'utf-8', 'direction' => 'ltr'),
  616
+			'fr-ca' => array('language' => 'French (Canadian)', 'locale' => 'fr_ca', 'localeFallback' => 'fra', 'charset' => 'utf-8', 'direction' => 'ltr'),
  617
+			'fr-ch' => array('language' => 'French (Swiss)', 'locale' => 'fr_ch', 'localeFallback' => 'fra', 'charset' => 'utf-8', 'direction' => 'ltr'),
  618
+			'fr-fr' => array('language' => 'French (France)', 'locale' => 'fr_fr', 'localeFallback' => 'fra', 'charset' => 'utf-8', 'direction' => 'ltr'),
  619
+			'fr-lu' => array('language' => 'French (Luxembourg)', 'locale' => 'fr_lu', 'localeFallback' => 'fra', 'charset' => 'utf-8', 'direction' => 'ltr')
620 620
 		);
621 621
 		$this->assertEquals($expected, $result);
622 622
 
@@ -678,7 +678,7 @@ public function testCatalog() {
678 678
 
679 679
 		$result = $localize->catalog(array('is'));
680 680
 		$expected = array(
681  
-			'is' => array('language' => 'Icelandic', 'locale' => 'ice', 'localeFallback' => 'ice', 'charset' => 'utf-8', 'direction' => 'ltr')
  681
+			'is' => array('language' => 'Icelandic', 'locale' => 'isl', 'localeFallback' => 'isl', 'charset' => 'utf-8', 'direction' => 'ltr')
682 682
 		);
683 683
 		$this->assertEquals($expected, $result);
684 684
 
@@ -725,14 +725,14 @@ public function testCatalog() {
725 725
 
726 726
 		$result = $localize->catalog(array('mk', 'mk-mk'));
727 727
 		$expected = array(
728  
-			'mk' => array('language' => 'FYRO Macedonian', 'locale' => 'mk', 'localeFallback' => 'mac', 'charset' => 'utf-8', 'direction' => 'ltr'),
729  
-			'mk-mk' => array('language' => 'Macedonian', 'locale' => 'mk_mk', 'localeFallback' => 'mac', 'charset' => 'utf-8', 'direction' => 'ltr')
  728
+			'mk' => array('language' => 'FYRO Macedonian', 'locale' => 'mk', 'localeFallback' => 'mkd', 'charset' => 'utf-8', 'direction' => 'ltr'),
  729
+			'mk-mk' => array('language' => 'Macedonian', 'locale' => 'mk_mk', 'localeFallback' => 'mkd', 'charset' => 'utf-8', 'direction' => 'ltr')
730 730
 		);
731 731
 		$this->assertEquals($expected, $result);
732 732
 
733 733
 		$result = $localize->catalog(array('ms'));
734 734
 		$expected = array(
735  
-			'ms' => array('language' => 'Malaysian', 'locale' => 'may', 'localeFallback' => 'may', 'charset' => 'utf-8', 'direction' => 'ltr')
  735
+			'ms' => array('language' => 'Malaysian', 'locale' => 'msa', 'localeFallback' => 'msa', 'charset' => 'utf-8', 'direction' => 'ltr')
736 736
 		);
737 737
 		$this->assertEquals($expected, $result);
738 738
 
@@ -797,8 +797,8 @@ public function testCatalog() {
797 797
 
798 798
 		$result = $localize->catalog(array('ro', 'ro-mo'));
799 799
 		$expected = array(
800  
-			'ro' => array('language' => 'Romanian', 'locale' => 'rum', 'localeFallback' => 'rum', 'charset' => 'utf-8', 'direction' => 'ltr'),
801  
-			'ro-mo' => array('language' => 'Romanian (Moldavia)', 'locale' => 'ro_mo', 'localeFallback' => 'rum', 'charset' => 'utf-8', 'direction' => 'ltr')
  800
+			'ro' => array('language' => 'Romanian', 'locale' => 'ron', 'localeFallback' => 'ron', 'charset' => 'utf-8', 'direction' => 'ltr'),
  801
+			'ro-mo' => array('language' => 'Romanian (Moldavia)', 'locale' => 'ro_mo', 'localeFallback' => 'ron', 'charset' => 'utf-8', 'direction' => 'ltr')
802 802
 		);
803 803
 		$this->assertEquals($expected, $result);
804 804
 
@@ -810,7 +810,7 @@ public function testCatalog() {
810 810
 
811 811
 		$result = $localize->catalog(array('sk'));
812 812
 		$expected = array(
813  
-			'sk' => array('language' => 'Slovak', 'locale' => 'slo', 'localeFallback' => 'slo', 'charset' => 'utf-8', 'direction' => 'ltr')
  813
+			'sk' => array('language' => 'Slovak', 'locale' => 'slk', 'localeFallback' => 'slk', 'charset' => 'utf-8', 'direction' => 'ltr')
814 814
 		);
815 815
 		$this->assertEquals($expected, $result);
816 816
 
@@ -822,13 +822,13 @@ public function testCatalog() {
822 822
 
823 823
 		$result = $localize->catalog(array('sq'));
824 824
 		$expected = array(
825  
-			'sq' => array('language' => 'Albanian', 'locale' => 'alb', 'localeFallback' => 'alb', 'charset' => 'utf-8', 'direction' => 'ltr')
  825
+			'sq' => array('language' => 'Albanian', 'locale' => 'sqi', 'localeFallback' => 'sqi', 'charset' => 'utf-8', 'direction' => 'ltr')
826 826
 		);
827 827
 		$this->assertEquals($expected, $result);
828 828
 
829 829
 		$result = $localize->catalog(array('sr'));
830 830
 		$expected = array(
831  
-			'sr' => array('language' => 'Serbian', 'locale' => 'scc', 'localeFallback' => 'scc', 'charset' => 'utf-8', 'direction' => 'ltr')
  831
+			'sr' => array('language' => 'Serbian', 'locale' => 'srp', 'localeFallback' => 'srp', 'charset' => 'utf-8', 'direction' => 'ltr')
832 832
 		);
833 833
 		$this->assertEquals($expected, $result);
834 834
 
@@ -920,11 +920,11 @@ public function testCatalog() {
920 920
 
921 921
 		$result = $localize->catalog(array('zh', 'zh-cn', 'zh-hk', 'zh-sg', 'zh-tw'));
922 922
 		$expected = array(
923  
-			'zh' => array('language' => 'Chinese', 'locale' => 'chi', 'localeFallback' => 'chi', 'charset' => 'utf-8', 'direction' => 'ltr'),
924  
-			'zh-cn' => array('language' => 'Chinese (PRC)', 'locale' => 'zh_cn', 'localeFallback' => 'chi', 'charset' => 'GB2312', 'direction' => 'ltr'),
925  
-			'zh-hk' => array('language' => 'Chinese (Hong Kong)', 'locale' => 'zh_hk', 'localeFallback' => 'chi', 'charset' => 'utf-8', 'direction' => 'ltr'),
926  
-			'zh-sg' => array('language' => 'Chinese (Singapore)', 'locale' => 'zh_sg', 'localeFallback' => 'chi', 'charset' => 'utf-8', 'direction' => 'ltr'),
927  
-			'zh-tw' => array('language' => 'Chinese (Taiwan)', 'locale' => 'zh_tw', 'localeFallback' => 'chi', 'charset' => 'utf-8', 'direction' => 'ltr')
  923
+			'zh' => array('language' => 'Chinese', 'locale' => 'zho', 'localeFallback' => 'zho', 'charset' => 'utf-8', 'direction' => 'ltr'),
  924
+			'zh-cn' => array('language' => 'Chinese (PRC)', 'locale' => 'zh_cn', 'localeFallback' => 'zho', 'charset' => 'GB2312', 'direction' => 'ltr'),
  925
+			'zh-hk' => array('language' => 'Chinese (Hong Kong)', 'locale' => 'zh_hk', 'localeFallback' => 'zho', 'charset' => 'utf-8', 'direction' => 'ltr'),
  926
+			'zh-sg' => array('language' => 'Chinese (Singapore)', 'locale' => 'zh_sg', 'localeFallback' => 'zho', 'charset' => 'utf-8', 'direction' => 'ltr'),
  927
+			'zh-tw' => array('language' => 'Chinese (Taiwan)', 'locale' => 'zh_tw', 'localeFallback' => 'zho', 'charset' => 'utf-8', 'direction' => 'ltr')
928 928
 		);
929 929
 		$this->assertEquals($expected, $result);
930 930
 
@@ -940,7 +940,7 @@ public function testCatalog() {
940 940
 			'es-do' => array('language' => 'Spanish (Dominican Republic)', 'locale' => 'es_do', 'localeFallback' => 'spa', 'charset' => 'utf-8', 'direction' => 'ltr'),
941 941
 			'sz' => array('language' => 'Sami (Lappish)', 'locale' => 'smi', 'localeFallback' => 'smi', 'charset' => 'utf-8', 'direction' => 'ltr'),
942 942
 			'ar-lb' => array('language' => 'Arabic (Lebanon)', 'locale' => 'ar_lb', 'localeFallback' => 'ara', 'charset' => 'utf-8', 'direction' => 'rtl'),
943  
-			'zh-hk' => array('language' => 'Chinese (Hong Kong)', 'locale' => 'zh_hk', 'localeFallback' => 'chi', 'charset' => 'utf-8', 'direction' => 'ltr'),
  943
+			'zh-hk' => array('language' => 'Chinese (Hong Kong)', 'locale' => 'zh_hk', 'localeFallback' => 'zho', 'charset' => 'utf-8', 'direction' => 'ltr'),
944 944
 			'pt-br' => array('language' => 'Portuguese (Brazil)', 'locale' => 'pt_br', 'localeFallback' => 'por', 'charset' => 'utf-8', 'direction' => 'ltr')
945 945
 		);
946 946
 		$this->assertEquals($expected, $result);
@@ -949,8 +949,8 @@ public function testCatalog() {
949 949
 		$expected = array(
950 950
 			'eng' => array('language' => 'English', 'locale' => 'eng', 'localeFallback' => 'eng', 'charset' => 'utf-8', 'direction' => 'ltr'),
951 951
 			'deu' => array('language' => 'German (Standard)', 'locale' => 'deu', 'localeFallback' => 'deu', 'charset' => 'utf-8', 'direction' => 'ltr'),
952  
-			'zho' => array('language' => 'Chinese', 'locale' => 'chi', 'localeFallback' => 'chi', 'charset' => 'utf-8', 'direction' => 'ltr'),
953  
-			'rum' => array('language' => 'Romanian', 'locale' => 'rum', 'localeFallback' => 'rum', 'charset' => 'utf-8', 'direction' => 'ltr'),
  952
+			'zho' => array('language' => 'Chinese', 'locale' => 'zho', 'localeFallback' => 'zho', 'charset' => 'utf-8', 'direction' => 'ltr'),
  953
+			'rum' => array('language' => 'Romanian', 'locale' => 'ron', 'localeFallback' => 'ron', 'charset' => 'utf-8', 'direction' => 'ltr'),
954 954
 			'zul' => array('language' => 'Zulu', 'locale' => 'zul', 'localeFallback' => 'zul', 'charset' => 'utf-8', 'direction' => 'ltr'),
955 955
 			'yid' => array('language' => 'Yiddish', 'locale' => 'yid', 'localeFallback' => 'yid', 'charset' => 'utf-8', 'direction' => 'ltr')
956 956
 		);

0 notes on commit 0327043

Please sign in to comment.
Something went wrong with that request. Please try again.