Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Added simple context test

  • Loading branch information...
commit a784a3ab528edd115e7bf82528bd3134d7d912ab 1 parent 95efe61
Torsten Raudssus authored January 05, 2013
6  t/20-locale-simple.t
@@ -55,4 +55,10 @@ is(
55 55
 	"other changing position test"
56 56
 );
57 57
 
  58
+is(
  59
+	lp("alien","Hello"),
  60
+	"Hallo Ausserirdischer",
  61
+	"simple test with context"
  62
+);
  63
+
58 64
 done_testing;
2  t/data/locale/de_DE/LC_MESSAGES/test.json
... ...
@@ -1 +1 @@
1  
-locale_data['test'] = {"":{"Plural-Forms":" nplurals=2; plural=n != 1;","MIME-Version":" 1.0","POT-Creation-Date":" 2009-06-14 09:29-0400","Language":" de_DE","Last-Translator":" Community","Content-Type":" text/plain; charset=UTF-8","Language-Team":" DuckDuckGo Community <community@duckduckgo.com>","PO-Revision-Date":" 2009-06-14 09:29-0400","Content-Transfer-Encoding":" 8bit","Project-Id-Version":" DuckDuckGo-Translation-0.000"},"Hello":[null,"Hallo"],"Change order test %s %s":[null,"Andere Reihenfolge hier %2$s %1$s"],"You have %d message of %s":["You have %d messages of %s","Du hast %d Nachricht von %s","Du hast %d Nachrichten von %s"],"You have %d message":["You have %d messages","Du hast %d Nachricht","Du hast %d Nachrichten"],"Other change order test %s %s %s":[null,"Verhalten aus http://perldoc.perl.org/functions/sprintf.html %3$s %s %1$s"]};
  1
+locale_data['test'] = {"":{"Plural-Forms":" nplurals=2; plural=n != 1;","MIME-Version":" 1.0","POT-Creation-Date":" 2009-06-14 09:29-0400","Language":" de_DE","Last-Translator":" Community","Content-Type":" text/plain; charset=UTF-8","Language-Team":" DuckDuckGo Community <community@duckduckgo.com>","PO-Revision-Date":" 2009-06-14 09:29-0400","Content-Transfer-Encoding":" 8bit","Project-Id-Version":" DuckDuckGo-Translation-0.000"},"alien\u0004Hello":[null,"Hallo Ausserirdischer"],"Hello":[null,"Hallo"],"Change order test %s %s":[null,"Andere Reihenfolge hier %2$s %1$s"],"You have %d message of %s":["You have %d messages of %s","Du hast %d Nachricht von %s","Du hast %d Nachrichten von %s"],"You have %d message":["You have %d messages","Du hast %d Nachricht","Du hast %d Nachrichten"],"Other change order test %s %s %s":[null,"Verhalten aus http://perldoc.perl.org/functions/sprintf.html %3$s %s %1$s"]};
BIN  t/data/locale/de_DE/LC_MESSAGES/test.mo
Binary file not shown
4  t/data/locale/de_DE/LC_MESSAGES/test.po
@@ -29,3 +29,7 @@ msgstr "Andere Reihenfolge hier %2$s %1$s"
29 29
 
30 30
 msgid "Other change order test %s %s %s"
31 31
 msgstr "Verhalten aus http://perldoc.perl.org/functions/sprintf.html %3$s %s %1$s"
  32
+
  33
+msgctxt "alien"
  34
+msgid "Hello"
  35
+msgstr "Hallo Ausserirdischer"
2  t/data/locale_simple_test.html
@@ -32,6 +32,8 @@
32 32
 				add_t('Should be: "' + 'Andere Reihenfolge hier 2 1' + '"');
33 33
 				add_t(l("Other change order test %s %s %s",1,2,3)); 
34 34
 				add_t('Should be: "' + 'Verhalten aus http://perldoc.perl.org/functions/sprintf.html 3 1 1' + '"');
  35
+				add_t(lp("alien","Hello"));
  36
+				add_t('Should be: "' + 'Hallo Ausserirdischer' + '"');
35 37
 
36 38
 			}
37 39
 

0 notes on commit a784a3a

Please sign in to comment.
Something went wrong with that request. Please try again.