Browse Source

Fixed typos in po test file and fixed test failing

Wouter van Os 8 years ago
parent
commit
d132220465

+ 3 - 3
tests/TestCase/I18n/Parser/PoFileParserTest.php

@@ -61,7 +61,7 @@ class PoFileParserTest extends TestCase
         $parser = new PoFileParser;
         $file = APP . 'Locale' . DS . 'rule_1_po' . DS . 'default.po';
         $messages = $parser->parse($file);
-        $this->assertCount(5, $messages);
+        $this->assertCount(8, $messages);
         $expected = [
             'Plural Rule 1' => [
                 '_context' => [
@@ -70,7 +70,7 @@ class PoFileParserTest extends TestCase
             ],
             '%d = 1' => [
                 '_context' => [
-                    'This is the context' => 'First Context trasnlation',
+                    'This is the context' => 'First Context translation',
                     'Another Context' => '%d = 1 (translated)'
                 ]
             ],
@@ -100,7 +100,7 @@ class PoFileParserTest extends TestCase
             ],
             '%d = 2' => [
                 '_context' => [
-                    'This is another translated context' => 'First Context trasnlation',
+                    'This is another translated context' => 'First Context translation',
                 ]
             ],
             '%-6d = 3' => [

+ 2 - 2
tests/test_app/TestApp/Locale/rule_1_po/default.po

@@ -19,7 +19,7 @@ msgctxt ""
 "This is the context"
 msgid "%d = 1"
 msgstr ""
-"First Context trasnlation"
+"First Context translation"
 
 msgctxt "Another Context"
 msgid "%d = 1"
@@ -37,7 +37,7 @@ msgctxt ""
 msgid ""
 "%d = 2"
 msgstr ""
-"First Context trasnlation"
+"First Context translation"
 
 msgid "%-6d = 3"
 msgid_plural "%-6d = 0 or > 1"