Skip to content

Commit 57c94a3

Browse files
committed
Add test case
1 parent 68d9f76 commit 57c94a3

12 files changed

Lines changed: 42 additions & 3 deletions

File tree

tests/AssetsTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ public function testPhpCode2()
307307
'CONTEXT' => 'my-context',
308308
],
309309
]);
310-
$countTranslations = 13;
310+
$countTranslations = 14;
311311
$countTranslated = 0;
312312
$countHeaders = 8;
313313

tests/assets/phpcode2/Csv.csv

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,4 @@ my-context,"All comments",
2020
,"i18n tagged %s",
2121
,foo,
2222
,bar,
23+
,"foo bar",

tests/assets/phpcode2/CsvDictionary.csv

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,4 @@ plain,
1111
"i18n tagged %s",
1212
foo,
1313
bar,
14+
"foo bar",

tests/assets/phpcode2/Jed.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@
4343
],
4444
"bar": [
4545
""
46+
],
47+
"foo bar": [
48+
""
4649
]
4750
}
4851
}

tests/assets/phpcode2/Json.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@
4141
],
4242
"bar": [
4343
""
44+
],
45+
"foo bar": [
46+
""
4447
]
4548
},
4649
"my-context": {

tests/assets/phpcode2/JsonDictionary.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,6 @@
1111
"One comment": "",
1212
"i18n tagged %s": "",
1313
"foo": "",
14-
"bar": ""
14+
"bar": "",
15+
"foo bar": ""
1516
}

tests/assets/phpcode2/PhpArray.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,10 @@
6565
array (
6666
0 => '',
6767
),
68+
'foo bar' =>
69+
array (
70+
0 => '',
71+
),
6872
),
6973
'my-context' =>
7074
array (

tests/assets/phpcode2/Po.po

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,3 +70,8 @@ msgstr ""
7070
#: ./tests/assets/phpcode2/input.php:44
7171
msgid "bar"
7272
msgstr ""
73+
74+
#. translators: this comment is indented with a tab.
75+
#: ./tests/assets/phpcode2/input.php:51
76+
msgid "foo bar"
77+
msgstr ""

tests/assets/phpcode2/Xliff.xlf

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,5 +149,16 @@
149149
<target></target>
150150
</segment>
151151
</unit>
152+
<unit id="327b6f07435811239bc47e1544353273">
153+
<notes>
154+
<note category="context"></note>
155+
<note category="extracted-comment">translators: this comment is indented with a tab.</note>
156+
<note category="reference">./tests/assets/phpcode2/input.php:51</note>
157+
</notes>
158+
<segment>
159+
<source>foo bar</source>
160+
<target></target>
161+
</segment>
162+
</unit>
152163
</file>
153164
</xliff>

tests/assets/phpcode2/Yaml.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,6 @@ messages:
1616
'i18n tagged %s': ''
1717
foo: ''
1818
bar: ''
19+
'foo bar': ''
1920
my-context:
2021
'All comments': ''

0 commit comments

Comments
 (0)