aboutsummaryrefslogtreecommitdiff
path: root/node_modules/gettext-parser/test/fixtures
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/gettext-parser/test/fixtures')
-rw-r--r--node_modules/gettext-parser/test/fixtures/latin13-mo.json69
-rw-r--r--node_modules/gettext-parser/test/fixtures/latin13-po.json100
-rw-r--r--node_modules/gettext-parser/test/fixtures/latin13.mobin0 -> 697 bytes
-rw-r--r--node_modules/gettext-parser/test/fixtures/latin13.po60
-rw-r--r--node_modules/gettext-parser/test/fixtures/utf8-mo.json69
-rw-r--r--node_modules/gettext-parser/test/fixtures/utf8-po.json127
-rw-r--r--node_modules/gettext-parser/test/fixtures/utf8.mobin0 -> 691 bytes
-rw-r--r--node_modules/gettext-parser/test/fixtures/utf8.po75
8 files changed, 500 insertions, 0 deletions
diff --git a/node_modules/gettext-parser/test/fixtures/latin13-mo.json b/node_modules/gettext-parser/test/fixtures/latin13-mo.json
new file mode 100644
index 000000000..c91b4f78e
--- /dev/null
+++ b/node_modules/gettext-parser/test/fixtures/latin13-mo.json
@@ -0,0 +1,69 @@
+{
+ "charset": "iso-8859-13",
+ "headers": {
+ "project-id-version": "gettext-parser",
+ "report-msgid-bugs-to": "andris@node.ee",
+ "pot-creation-date": "2012-05-18 14:28:00+03:00",
+ "po-revision-date": "2012-05-18 14:44+0300",
+ "last-translator": "Andris Reinman <andris@kreata.ee>",
+ "language-team": "gettext-parser <andris@node.ee>",
+ "mime-version": "1.0",
+ "content-type": "text/plain; charset=iso-8859-13",
+ "content-transfer-encoding": "8bit",
+ "language": "",
+ "plural-forms": "nplurals=2; plural=(n!=1);",
+ "x-poedit-language": "Estonian",
+ "x-poedit-country": "ESTONIA",
+ "x-poedit-sourcecharset": "iso-8859-13"
+ },
+ "translations": {
+ "": {
+ "": {
+ "msgid": "",
+ "msgstr": [
+ "Project-Id-Version: gettext-parser\nReport-Msgid-Bugs-To: andris@node.ee\nPOT-Creation-Date: 2012-05-18 14:28:00+03:00\nPO-Revision-Date: 2012-05-18 14:44+0300\nLast-Translator: Andris Reinman <andris@kreata.ee>\nLanguage-Team: gettext-parser <andris@node.ee>\nMIME-Version: 1.0\nContent-Type: text/plain; charset=iso-8859-13\nContent-Transfer-Encoding: 8bit\nLanguage: \nPlural-Forms: nplurals=2; plural=(n!=1);\nX-Poedit-Language: Estonian\nX-Poedit-Country: ESTONIA\nX-Poedit-Sourcecharset: iso-8859-13\n"
+ ]
+ },
+ "o1": {
+ "msgid": "o1",
+ "msgstr": [
+ "t1"
+ ]
+ },
+ "o2-1": {
+ "msgid": "o2-1",
+ "msgid_plural": "o2-2",
+ "msgstr": [
+ "t2-1",
+ "t2-2"
+ ]
+ },
+ "o3-õäöü": {
+ "msgid": "o3-õäöü",
+ "msgstr": [
+ "t3-žš"
+ ]
+ }
+ },
+ "c1": {
+ "co1": {
+ "msgctxt": "c1",
+ "msgid": "co1",
+ "msgstr": [
+ "ct1"
+ ]
+ }
+ },
+ "c2": {
+ "co2-1": {
+ "msgctxt": "c2",
+ "msgid": "co2-1",
+ "msgid_plural": "co2-2",
+ "msgstr": [
+ "ct2-1",
+ "ct2-2"
+ ]
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/node_modules/gettext-parser/test/fixtures/latin13-po.json b/node_modules/gettext-parser/test/fixtures/latin13-po.json
new file mode 100644
index 000000000..c4b394d0c
--- /dev/null
+++ b/node_modules/gettext-parser/test/fixtures/latin13-po.json
@@ -0,0 +1,100 @@
+{
+ "charset": "iso-8859-13",
+ "headers": {
+ "project-id-version": "gettext-parser",
+ "report-msgid-bugs-to": "andris@node.ee",
+ "pot-creation-date": "2012-05-18 14:28:00+03:00",
+ "po-revision-date": "2012-05-18 14:44+0300",
+ "last-translator": "Andris Reinman <andris@kreata.ee>",
+ "language-team": "gettext-parser <andris@node.ee>",
+ "mime-version": "1.0",
+ "content-type": "text/plain; charset=iso-8859-13",
+ "content-transfer-encoding": "8bit",
+ "language": "",
+ "plural-forms": "nplurals=2; plural=(n!=1);",
+ "x-poedit-language": "Estonian",
+ "x-poedit-country": "ESTONIA",
+ "x-poedit-sourcecharset": "iso-8859-13"
+ },
+ "translations": {
+ "": {
+ "": {
+ "msgid": "",
+ "comments": {
+ "translator": "gettext-parser test file.\nCopyright (C) 2012 Andris Reinman\nThis file is distributed under the same license as the gettext-parser package.\nANDRIS REINMAN <andris@node.ee>, 2012.\n"
+ },
+ "msgstr": [
+ "Project-Id-Version: gettext-parser\nReport-Msgid-Bugs-To: andris@node.ee\nPOT-Creation-Date: 2012-05-18 14:28:00+03:00\nPO-Revision-Date: 2012-05-18 14:44+0300\nLast-Translator: Andris Reinman <andris@kreata.ee>\nLanguage-Team: gettext-parser <andris@node.ee>\nMIME-Version: 1.0\nContent-Type: text/plain; charset=iso-8859-13\nContent-Transfer-Encoding: 8bit\nLanguage: \nPlural-Forms: nplurals=2; plural=(n!=1);\nX-Poedit-Language: Estonian\nX-Poedit-Country: ESTONIA\nX-Poedit-Sourcecharset: iso-8859-13\n"
+ ]
+ },
+ "o1": {
+ "msgid": "o1",
+ "comments": {
+ "translator": "Normal string"
+ },
+ "msgstr": [
+ "t1"
+ ]
+ },
+ "o2-1": {
+ "msgid": "o2-1",
+ "comments": {
+ "translator": "Plural string"
+ },
+ "msgid_plural": "o2-2",
+ "msgstr": [
+ "t2-1",
+ "t2-2"
+ ]
+ },
+ "o3-õäöü": {
+ "msgid": "o3-õäöü",
+ "comments": {
+ "translator": "Normal string with special chars"
+ },
+ "msgstr": [
+ "t3-žš"
+ ]
+ },
+ "test": {
+ "msgid": "test",
+ "comments": {
+ "translator": "Normal comment line 1\nNormal comment line 2",
+ "extracted": "Editors note line 1\nEditors note line 2",
+ "reference": "/absolute/path:13\n/absolute/path:14",
+ "flag": "line 1\nline 2",
+ "previous": "line 3\nline 4"
+ },
+ "msgstr": [
+ "test"
+ ]
+ }
+ },
+ "c1": {
+ "co1": {
+ "msgid": "co1",
+ "msgctxt": "c1",
+ "comments": {
+ "translator": "Normal string in a context"
+ },
+ "msgstr": [
+ "ct1"
+ ]
+ }
+ },
+ "c2": {
+ "co2-1": {
+ "msgid": "co2-1",
+ "msgctxt": "c2",
+ "comments": {
+ "translator": "Plural string in a context"
+ },
+ "msgid_plural": "co2-2",
+ "msgstr": [
+ "ct2-1",
+ "ct2-2"
+ ]
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/node_modules/gettext-parser/test/fixtures/latin13.mo b/node_modules/gettext-parser/test/fixtures/latin13.mo
new file mode 100644
index 000000000..bbfd0eb09
--- /dev/null
+++ b/node_modules/gettext-parser/test/fixtures/latin13.mo
Binary files differ
diff --git a/node_modules/gettext-parser/test/fixtures/latin13.po b/node_modules/gettext-parser/test/fixtures/latin13.po
new file mode 100644
index 000000000..d42a339bf
--- /dev/null
+++ b/node_modules/gettext-parser/test/fixtures/latin13.po
@@ -0,0 +1,60 @@
+# gettext-parser test file.
+# Copyright (C) 2012 Andris Reinman
+# This file is distributed under the same license as the gettext-parser package.
+# ANDRIS REINMAN <andris@node.ee>, 2012.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: gettext-parser\n"
+"Report-Msgid-Bugs-To: andris@node.ee\n"
+"POT-Creation-Date: 2012-05-18 14:28:00+03:00\n"
+"PO-Revision-Date: 2012-05-18 14:44+0300\n"
+"Last-Translator: Andris Reinman <andris@kreata.ee>\n"
+"Language-Team: gettext-parser <andris@node.ee>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=iso-8859-13\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Language: \n"
+"Plural-Forms: nplurals=2; plural=(n!=1);\n"
+"X-Poedit-Language: Estonian\n"
+"X-Poedit-Country: ESTONIA\n"
+"X-Poedit-Sourcecharset: iso-8859-13\n"
+
+# Normal string
+msgid "o1"
+msgstr "t1"
+
+# Plural string
+msgid "o2-1"
+msgid_plural "o2-2"
+msgstr[0] "t2-1"
+msgstr[1] "t2-2"
+
+# Normal string with special chars
+msgid "o3-õäöü"
+msgstr "t3-þð"
+
+# Normal comment line 1
+# Normal comment line 2
+#: /absolute/path:13
+#: /absolute/path:14
+#. Editors note line 1
+#. Editors note line 2
+#, line 1
+#, line 2
+#| line 3
+#| line 4
+msgid "test"
+msgstr "test"
+
+# Normal string in a context
+msgctxt "c1"
+msgid "co1"
+msgstr "ct1"
+
+# Plural string in a context
+msgctxt "c2"
+msgid "co2-1"
+msgid_plural "co2-2"
+msgstr[0] "ct2-1"
+msgstr[1] "ct2-2" \ No newline at end of file
diff --git a/node_modules/gettext-parser/test/fixtures/utf8-mo.json b/node_modules/gettext-parser/test/fixtures/utf8-mo.json
new file mode 100644
index 000000000..29b2c0852
--- /dev/null
+++ b/node_modules/gettext-parser/test/fixtures/utf8-mo.json
@@ -0,0 +1,69 @@
+{
+ "charset": "utf-8",
+ "headers": {
+ "project-id-version": "gettext-parser",
+ "report-msgid-bugs-to": "andris@node.ee",
+ "pot-creation-date": "2012-05-18 14:28:00+03:00",
+ "po-revision-date": "2012-05-18 14:37+0300",
+ "last-translator": "Andris Reinman <andris@kreata.ee>",
+ "language-team": "gettext-parser <andris@node.ee>",
+ "mime-version": "1.0",
+ "content-type": "text/plain; charset=utf-8",
+ "content-transfer-encoding": "8bit",
+ "language": "",
+ "plural-forms": "nplurals=2; plural=(n!=1);",
+ "x-poedit-language": "Estonian",
+ "x-poedit-country": "ESTONIA",
+ "x-poedit-sourcecharset": "utf-8"
+ },
+ "translations": {
+ "": {
+ "": {
+ "msgid": "",
+ "msgstr": [
+ "Project-Id-Version: gettext-parser\nReport-Msgid-Bugs-To: andris@node.ee\nPOT-Creation-Date: 2012-05-18 14:28:00+03:00\nPO-Revision-Date: 2012-05-18 14:37+0300\nLast-Translator: Andris Reinman <andris@kreata.ee>\nLanguage-Team: gettext-parser <andris@node.ee>\nMIME-Version: 1.0\nContent-Type: text/plain; charset=utf-8\nContent-Transfer-Encoding: 8bit\nLanguage: \nPlural-Forms: nplurals=2; plural=(n!=1);\nX-Poedit-Language: Estonian\nX-Poedit-Country: ESTONIA\nX-Poedit-Sourcecharset: utf-8\n"
+ ]
+ },
+ "o1": {
+ "msgid": "o1",
+ "msgstr": [
+ "t1"
+ ]
+ },
+ "o2-1": {
+ "msgid": "o2-1",
+ "msgid_plural": "o2-2",
+ "msgstr": [
+ "t2-1",
+ "t2-2"
+ ]
+ },
+ "o3-õäöü": {
+ "msgid": "o3-õäöü",
+ "msgstr": [
+ "t3-žš"
+ ]
+ }
+ },
+ "c1": {
+ "co1": {
+ "msgctxt": "c1",
+ "msgid": "co1",
+ "msgstr": [
+ "ct1"
+ ]
+ }
+ },
+ "c2": {
+ "co2-1": {
+ "msgctxt": "c2",
+ "msgid": "co2-1",
+ "msgid_plural": "co2-2",
+ "msgstr": [
+ "ct2-1",
+ "ct2-2"
+ ]
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/node_modules/gettext-parser/test/fixtures/utf8-po.json b/node_modules/gettext-parser/test/fixtures/utf8-po.json
new file mode 100644
index 000000000..e5921b7e8
--- /dev/null
+++ b/node_modules/gettext-parser/test/fixtures/utf8-po.json
@@ -0,0 +1,127 @@
+{
+ "charset": "utf-8",
+ "headers": {
+ "project-id-version": "gettext-parser",
+ "report-msgid-bugs-to": "andris@node.ee",
+ "pot-creation-date": "2012-05-18 14:28:00+03:00",
+ "po-revision-date": "2012-05-18 14:37+0300",
+ "last-translator": "Andris Reinman <andris@kreata.ee>",
+ "language-team": "gettext-parser <andris@node.ee>",
+ "mime-version": "1.0",
+ "content-type": "text/plain; charset=utf-8",
+ "content-transfer-encoding": "8bit",
+ "language": "",
+ "plural-forms": "nplurals=2; plural=(n!=1);",
+ "x-poedit-language": "Estonian",
+ "x-poedit-country": "ESTONIA",
+ "x-poedit-sourcecharset": "utf-8"
+ },
+ "translations": {
+ "": {
+ "": {
+ "msgid": "",
+ "comments": {
+ "translator": "gettext-parser test file.\nCopyright (C) 2012 Andris Reinman\nThis file is distributed under the same license as the gettext-parser package.\nANDRIS REINMAN <andris@node.ee>, 2012.\n"
+ },
+ "msgstr": [
+ "Project-Id-Version: gettext-parser\nReport-Msgid-Bugs-To: andris@node.ee\nPOT-Creation-Date: 2012-05-18 14:28:00+03:00\nPO-Revision-Date: 2012-05-18 14:37+0300\nLast-Translator: Andris Reinman <andris@kreata.ee>\nLanguage-Team: gettext-parser <andris@node.ee>\nMIME-Version: 1.0\nContent-Type: text/plain; charset=utf-8\nContent-Transfer-Encoding: 8bit\nLanguage: \nPlural-Forms: nplurals=2; plural=(n!=1);\nX-Poedit-Language: Estonian\nX-Poedit-Country: ESTONIA\nX-Poedit-Sourcecharset: utf-8\n"
+ ]
+ },
+ "o1": {
+ "msgid": "o1",
+ "comments": {
+ "translator": "Normal string"
+ },
+ "msgstr": [
+ "t1"
+ ]
+ },
+ "o2-1": {
+ "msgid": "o2-1",
+ "comments": {
+ "translator": "Plural string"
+ },
+ "msgid_plural": "o2-2\no2-3\no2-4",
+ "msgstr": [
+ "t2-1",
+ "t2-2"
+ ]
+ },
+ "o3-õäöü": {
+ "msgid": "o3-õäöü",
+ "comments": {
+ "translator": "Normal string with special chars"
+ },
+ "msgstr": [
+ "t3-žš"
+ ]
+ },
+ "test": {
+ "msgid": "test",
+ "comments": {
+ "translator": "Normal comment line 1\nNormal comment line 2",
+ "extracted": "Editors note line 1\nEditors note line 2",
+ "reference": "/absolute/path:13\n/absolute/path:14",
+ "flag": "line 1\nline 2",
+ "previous": "line 3\nline 4"
+ },
+ "msgstr": [
+ "test"
+ ]
+ },
+ "\"\\'\t": {
+ "msgid": "\"\\'\t",
+ "comments": {
+ "translator": "String with escapes"
+ },
+ "msgstr": [
+ "\"\\'\t"
+ ]
+ }
+ },
+ "c1": {
+ "co1": {
+ "msgid": "co1",
+ "msgctxt": "c1",
+ "comments": {
+ "translator": "Normal string in a context"
+ },
+ "msgstr": [
+ "ct1"
+ ]
+ }
+ },
+ "c2": {
+ "co2-1": {
+ "msgid": "co2-1",
+ "msgctxt": "c2",
+ "comments": {
+ "translator": "Plural string in a context"
+ },
+ "msgid_plural": "co2-2",
+ "msgstr": [
+ "ct2-1",
+ "ct2-2"
+ ]
+ }
+ },
+ "Button label": {
+ "Log in": {
+ "msgid": "Log in",
+ "msgctxt": "Button label",
+ "msgstr": [
+ ""
+ ]
+ }
+ },
+ "Dialog title": {
+ "Log in": {
+ "msgid": "Log in",
+ "msgctxt": "Dialog title",
+ "msgstr": [
+ ""
+ ]
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/node_modules/gettext-parser/test/fixtures/utf8.mo b/node_modules/gettext-parser/test/fixtures/utf8.mo
new file mode 100644
index 000000000..efafe43e6
--- /dev/null
+++ b/node_modules/gettext-parser/test/fixtures/utf8.mo
Binary files differ
diff --git a/node_modules/gettext-parser/test/fixtures/utf8.po b/node_modules/gettext-parser/test/fixtures/utf8.po
new file mode 100644
index 000000000..3d879463a
--- /dev/null
+++ b/node_modules/gettext-parser/test/fixtures/utf8.po
@@ -0,0 +1,75 @@
+# gettext-parser test file.
+# Copyright (C) 2012 Andris Reinman
+# This file is distributed under the same license as the gettext-parser package.
+# ANDRIS REINMAN <andris@node.ee>, 2012.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: gettext-parser\n"
+"Report-Msgid-Bugs-To: andris@node.ee\n"
+"POT-Creation-Date: 2012-05-18 14:28:00+03:00\n"
+"PO-Revision-Date: 2012-05-18 14:37+0300\n"
+"Last-Translator: Andris Reinman <andris@kreata.ee>\n"
+"Language-Team: gettext-parser <andris@node.ee>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=utf-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Language: \n"
+"Plural-Forms: nplurals=2; plural=(n!=1);\n"
+"X-Poedit-Language: Estonian\n"
+"X-Poedit-Country: ESTONIA\n"
+"X-Poedit-Sourcecharset: utf-8\n"
+
+# Normal string
+msgid "o1"
+msgstr "t1"
+
+# Plural string
+msgid "o2-1"
+msgid_plural ""
+"o2-2\n"
+"o2-3\n"
+"o2-4"
+msgstr[0] "t2-1"
+msgstr[1] "t2-2"
+
+# Normal string with special chars
+msgid "o3-õäöü"
+msgstr "t3-žš"
+
+# Normal comment line 1
+# Normal comment line 2
+#: /absolute/path:13
+#: /absolute/path:14
+#. Editors note line 1
+#. Editors note line 2
+#, line 1
+#, line 2
+#| line 3
+#| line 4
+msgid "test"
+msgstr "test"
+
+# String with escapes
+msgid "\"\\'\t"
+msgstr "\"\\'\t"
+
+# Normal string in a context
+msgctxt "c1"
+msgid "co1"
+msgstr "ct1"
+
+# Plural string in a context
+msgctxt "c2"
+msgid "co2-1"
+msgid_plural "co2-2"
+msgstr[0] "ct2-1"
+msgstr[1] "ct2-2"
+
+msgctxt "Button label"
+msgid "Log in"
+msgstr ""
+
+msgctxt "Dialog title"
+msgid "Log in"
+msgstr "" \ No newline at end of file