diff options
author | Andy Staudacher <andy.st@gmail.com> | 2009-01-15 10:02:41 +0000 |
---|---|---|
committer | Andy Staudacher <andy.st@gmail.com> | 2009-01-15 10:02:41 +0000 |
commit | e4a9b19bf9997f46203fbc18c696c63703a72625 (patch) | |
tree | c33f4cb354961eeba452f428dfa68c664bc3226f /core/tests/I18n_Test.php | |
parent | e53916dd0622e3db61d6a05ad0fe69e8d7c7f11a (diff) |
Changing t() placeholder syntax from {{replace_me}} to %replace_me.
Diffstat (limited to 'core/tests/I18n_Test.php')
-rw-r--r-- | core/tests/I18n_Test.php | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/core/tests/I18n_Test.php b/core/tests/I18n_Test.php index f99dd9c1..e621c0e3 100644 --- a/core/tests/I18n_Test.php +++ b/core/tests/I18n_Test.php @@ -34,10 +34,10 @@ class I18n_Test extends Unit_Test_Case { $messages_de_DE = array( array('Hello world', 'Hallo Welt'), array(array('one' => 'One item has been added', - 'other' => '{{count}} elements have been added'), + 'other' => '%count elements have been added'), array('one' => 'Ein Element wurde hinzugefuegt.', - 'other' => '{{count}} Elemente wurden hinzugefuegt.')), - array('Hello {{name}}, how are you today?', 'Hallo {{name}}, wie geht es Dir heute?')); + 'other' => '%count Elemente wurden hinzugefuegt.')), + array('Hello %name, how are you today?', 'Hallo %name, wie geht es Dir heute?')); foreach ($messages_de_DE as $data) { list ($message, $translation) = $data; @@ -65,25 +65,25 @@ class I18n_Test extends Unit_Test_Case { public function translate_plural_other_test() { $result = $this->i18n->translate(array('one' => 'One item has been added', - 'other' => '{{count}} items have been added.'), + 'other' => '%count items have been added.'), array('count' => 5)); $this->assert_equal('5 Elemente wurden hinzugefuegt.', $result); } public function translate_plural_one_test() { $result = $this->i18n->translate(array('one' => 'One item has been added', - 'other' => '{{count}} items have been added.'), + 'other' => '%count items have been added.'), array('count' => 1)); $this->assert_equal('Ein Element wurde hinzugefuegt.', $result); } public function translate_interpolate_test() { - $result = $this->i18n->translate('Hello {{name}}, how are you today?', array('name' => 'John')); + $result = $this->i18n->translate('Hello %name, how are you today?', array('name' => 'John')); $this->assert_equal('Hallo John, wie geht es Dir heute?', $result); } public function translate_interpolate_missing_value_test() { - $result = $this->i18n->translate('Hello {{name}}, how are you today?', array('foo' => 'bar')); - $this->assert_equal('Hallo {{name}}, wie geht es Dir heute?', $result); + $result = $this->i18n->translate('Hello %name, how are you today?', array('foo' => 'bar')); + $this->assert_equal('Hallo %name, wie geht es Dir heute?', $result); } }
\ No newline at end of file |