Skip to content

Commit

Permalink
correcting iso standard for nld (dutch) - making dut the alias
Browse files Browse the repository at this point in the history
  • Loading branch information
euromark committed Sep 27, 2012
1 parent 76d21c6 commit c87b53a
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 12 deletions.
8 changes: 4 additions & 4 deletions lib/Cake/I18n/L10n.php
Expand Up @@ -105,8 +105,8 @@ class L10n {
/* Czech */ 'cze' => 'cs',
/* Czech */ 'ces' => 'cs',
/* Danish */ 'dan' => 'da',
/* Dutch (Standard) */ 'dut' => 'nl',
/* Dutch (Standard) */ 'nld' => 'nl',
/* Dutch (Standard) */ 'dut' => 'nl',
/* English */ 'eng' => 'en',
/* Estonian */ 'est' => 'et',
/* Faeroese */ 'fao' => 'fo',
Expand Down Expand Up @@ -280,10 +280,10 @@ class L10n {
'mk-mk' => array('language' => 'Macedonian', 'locale' => 'mk_mk', 'localeFallback' => 'mac', 'charset' => 'utf-8', 'direction' => 'ltr'),
'ms' => array('language' => 'Malaysian', 'locale' => 'may', 'localeFallback' => 'may', 'charset' => 'utf-8', 'direction' => 'ltr'),
'mt' => array('language' => 'Maltese', 'locale' => 'mlt', 'localeFallback' => 'mlt', 'charset' => 'utf-8', 'direction' => 'ltr'),
'n' => array('language' => 'Dutch (Standard)', 'locale' => 'dut', 'localeFallback' => 'dut', 'charset' => 'utf-8', 'direction' => 'ltr'),
'n' => array('language' => 'Dutch (Standard)', 'locale' => 'nld', 'localeFallback' => 'nld', 'charset' => 'utf-8', 'direction' => 'ltr'),
'nb' => array('language' => 'Norwegian Bokmal', 'locale' => 'nob', 'localeFallback' => 'nor', 'charset' => 'utf-8', 'direction' => 'ltr'),
'nl' => array('language' => 'Dutch (Standard)', 'locale' => 'dut', 'localeFallback' => 'dut', 'charset' => 'utf-8', 'direction' => 'ltr'),
'nl-be' => array('language' => 'Dutch (Belgium)', 'locale' => 'nl_be', 'localeFallback' => 'dut', 'charset' => 'utf-8', 'direction' => 'ltr'),
'nl' => array('language' => 'Dutch (Standard)', 'locale' => 'nld', 'localeFallback' => 'nld', 'charset' => 'utf-8', 'direction' => 'ltr'),
'nl-be' => array('language' => 'Dutch (Belgium)', 'locale' => 'nl_be', 'localeFallback' => 'nld', 'charset' => 'utf-8', 'direction' => 'ltr'),
'nn' => array('language' => 'Norwegian Nynorsk', 'locale' => 'nno', 'localeFallback' => 'nor', 'charset' => 'utf-8', 'direction' => 'ltr'),
'no' => array('language' => 'Norwegian', 'locale' => 'nor', 'localeFallback' => 'nor', 'charset' => 'utf-8', 'direction' => 'ltr'),
'p' => array('language' => 'Polish', 'locale' => 'pol', 'localeFallback' => 'pol', 'charset' => 'utf-8', 'direction' => 'ltr'),
Expand Down
20 changes: 12 additions & 8 deletions lib/Cake/Test/Case/I18n/L10nTest.php
Expand Up @@ -186,17 +186,21 @@ public function testMap() {
$this->assertEquals($expected, $result);

$result = $localize->map(array('dut', 'nl'));
$expected = array('dut' => 'nl', 'nl' => 'dut');
$expected = array('dut' => 'nl', 'nl' => 'nld');
$this->assertEquals($expected, $result);

$result = $localize->map(array('nld', 'nl'));
$expected = array('nld' => 'nl', 'nl' => 'dut');
$expected = array('nld' => 'nl', 'nl' => 'nld');
$this->assertEquals($expected, $result);

$result = $localize->map(array('nld'));
$expected = array('nld' => 'nl');
$this->assertEquals($expected, $result);

$result = $localize->map(array('dut'));
$expected = array('dut' => 'nl');
$this->assertEquals($expected, $result);

$result = $localize->map(array('eng', 'en'));
$expected = array('eng' => 'en', 'en' => 'eng');
$this->assertEquals($expected, $result);
Expand Down Expand Up @@ -740,22 +744,22 @@ public function testCatalog() {

$result = $localize->catalog(array('n', 'nl', 'nl-be'));
$expected = array(
'n' => array('language' => 'Dutch (Standard)', 'locale' => 'dut', 'localeFallback' => 'dut', 'charset' => 'utf-8', 'direction' => 'ltr'),
'nl' => array('language' => 'Dutch (Standard)', 'locale' => 'dut', 'localeFallback' => 'dut', 'charset' => 'utf-8', 'direction' => 'ltr'),
'nl-be' => array('language' => 'Dutch (Belgium)', 'locale' => 'nl_be', 'localeFallback' => 'dut', 'charset' => 'utf-8', 'direction' => 'ltr')
'n' => array('language' => 'Dutch (Standard)', 'locale' => 'nld', 'localeFallback' => 'nld', 'charset' => 'utf-8', 'direction' => 'ltr'),
'nl' => array('language' => 'Dutch (Standard)', 'locale' => 'nld', 'localeFallback' => 'nld', 'charset' => 'utf-8', 'direction' => 'ltr'),
'nl-be' => array('language' => 'Dutch (Belgium)', 'locale' => 'nl_be', 'localeFallback' => 'nld', 'charset' => 'utf-8', 'direction' => 'ltr')
);
$this->assertEquals($expected, $result);

$result = $localize->catalog('nl');
$expected = array('language' => 'Dutch (Standard)', 'locale' => 'dut', 'localeFallback' => 'dut', 'charset' => 'utf-8', 'direction' => 'ltr');
$expected = array('language' => 'Dutch (Standard)', 'locale' => 'nld', 'localeFallback' => 'nld', 'charset' => 'utf-8', 'direction' => 'ltr');
$this->assertEquals($expected, $result);

$result = $localize->catalog('nld');
$expected = array('language' => 'Dutch (Standard)', 'locale' => 'dut', 'localeFallback' => 'dut', 'charset' => 'utf-8', 'direction' => 'ltr');
$expected = array('language' => 'Dutch (Standard)', 'locale' => 'nld', 'localeFallback' => 'nld', 'charset' => 'utf-8', 'direction' => 'ltr');
$this->assertEquals($expected, $result);

$result = $localize->catalog('dut');
$expected = array('language' => 'Dutch (Standard)', 'locale' => 'dut', 'localeFallback' => 'dut', 'charset' => 'utf-8', 'direction' => 'ltr');
$expected = array('language' => 'Dutch (Standard)', 'locale' => 'nld', 'localeFallback' => 'nld', 'charset' => 'utf-8', 'direction' => 'ltr');
$this->assertEquals($expected, $result);

$result = $localize->catalog(array('nb'));
Expand Down

0 comments on commit c87b53a

Please sign in to comment.