diff --git a/cake/tests/cases/libs/i18n.test.php b/cake/tests/cases/libs/i18n.test.php index 7fd78f048..326c4c12f 100644 --- a/cake/tests/cases/libs/i18n.test.php +++ b/cake/tests/cases/libs/i18n.test.php @@ -2341,8 +2341,6 @@ class I18nTest extends CakeTestCase { function testPluginTranslation() { $pluginPaths = Configure::read('pluginPaths'); - - Configure::write('localPaths', array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'locale')); Configure::write('pluginPaths', array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'plugins')); Configure::write('Config.language', 'po'); @@ -2401,6 +2399,17 @@ This is the third line. This is the forth line. (translated) EOD; $this->assertEqual($result, $expected); + + $singular = "valid \nsecond line"; + $plural = "valids \nsecond line"; + + $result = __n($singular, $plural, 1, true); + $expected = "v \nsecond line"; + $this->assertEqual($result, $expected); + + $result = __n($singular, $plural, 2, true); + $expected = "vs \nsecond line"; + $this->assertEqual($result, $expected); } /** * testPoNoTranslationNeeded method diff --git a/cake/tests/test_app/locale/po/LC_MESSAGES/default.po b/cake/tests/test_app/locale/po/LC_MESSAGES/default.po index 570753dda..1230c7412 100644 --- a/cake/tests/test_app/locale/po/LC_MESSAGES/default.po +++ b/cake/tests/test_app/locale/po/LC_MESSAGES/default.po @@ -69,5 +69,10 @@ msgstr[0] "v \n" msgstr[1] "vs \n" "second line" +msgid "valid \nsecond line" +msgid_plural "valid \nsecond line" +msgstr[0] "v \nsecond line" +msgstr[1] "vs \nsecond line" + msgid "this is a \"quoted string\"" msgstr "this is a \"quoted string\" (translated)" \ No newline at end of file