Permalink
Browse files

Merge pull request #869 from dereuromark/2.3-nld

Correcting iso standard for nld (dutch) - making dut the alias

Fixes #795
  • Loading branch information...
markstory committed Sep 28, 2012
2 parents 76d21c6 + c87b53a commit f55160e83b1e3c445a769289e6bb2ba4cbfbc7bf
Showing with 16 additions and 12 deletions.
  1. +4 −4 lib/Cake/I18n/L10n.php
  2. +12 −8 lib/Cake/Test/Case/I18n/L10nTest.php
View
@@ -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',
@@ -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'),
@@ -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);
@@ -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'));

0 comments on commit f55160e

Please sign in to comment.