diff options
Diffstat (limited to 'node_modules/po2json/test')
| -rw-r--r-- | node_modules/po2json/test/fixtures/en-empty.json | 40 | ||||
| -rw-r--r-- | node_modules/po2json/test/fixtures/en-empty.po | 45 | ||||
| -rw-r--r-- | node_modules/po2json/test/fixtures/en-mf-fallback-to-msgid.json | 9 | ||||
| -rw-r--r-- | node_modules/po2json/test/fixtures/en-no-header.json | 6 | ||||
| -rw-r--r-- | node_modules/po2json/test/fixtures/en-no-header.po | 4 | ||||
| -rw-r--r-- | node_modules/po2json/test/fixtures/ja-jed1.x.json | 1 | ||||
| -rw-r--r-- | node_modules/po2json/test/fixtures/ja.json | 17 | ||||
| -rwxr-xr-x | node_modules/po2json/test/fixtures/ja.po | 27 | ||||
| -rw-r--r-- | node_modules/po2json/test/fixtures/pl-jed.json | 40 | ||||
| -rw-r--r-- | node_modules/po2json/test/fixtures/pl-jed1.x.json | 34 | ||||
| -rw-r--r-- | node_modules/po2json/test/fixtures/pl-mf.json | 7 | ||||
| -rw-r--r-- | node_modules/po2json/test/fixtures/pl-mf.po | 44 | ||||
| -rw-r--r-- | node_modules/po2json/test/fixtures/pl.json | 43 | ||||
| -rw-r--r-- | node_modules/po2json/test/fixtures/pl.po | 58 | ||||
| -rw-r--r-- | node_modules/po2json/test/po2json_test.js | 158 |
15 files changed, 0 insertions, 533 deletions
diff --git a/node_modules/po2json/test/fixtures/en-empty.json b/node_modules/po2json/test/fixtures/en-empty.json deleted file mode 100644 index 4216a1c05..000000000 --- a/node_modules/po2json/test/fixtures/en-empty.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "": { - "project-id-version": "po2json", - "pot-creation-date": "2012-10-26 12:00+0000", - "po-revision-date": "2013-11-08 09:09+0200", - "last-translator": "Illimar Tambek <illimar.tambek@gmail.com>", - "language-team": "po2json", - "mime-version": "1.0", - "plural-forms": "nplurals=2; plural=(n != 1);", - "content-type": "text/plain; charset=UTF-8", - "content-transfer-encoding": "8bit", - "x-generator": "Poedit 1.5.7", - "language": "en" - }, - "Hello, world!\n": [ - null, - "Hello, world!\n" - ], - "string context\u0004the contextual phrase": [ - null, - "the contextual phrase" - ], - "this is the first line\nthis is the next one\nbut this is the last\n": [ - null, - "this is the first line\nthis is the next one\nbut this is the last\n" - ], - "one product": [ - "%d products", - "one product", - "%d products" - ], - "A sentence with \"quotation\" marks.": [ - null, - "A sentence with \"quotation\" marks." - ], - "A fuzzy translation": [ - null, - "A fuzzy translation" - ] -}
\ No newline at end of file diff --git a/node_modules/po2json/test/fixtures/en-empty.po b/node_modules/po2json/test/fixtures/en-empty.po deleted file mode 100644 index b2cb6bd55..000000000 --- a/node_modules/po2json/test/fixtures/en-empty.po +++ /dev/null @@ -1,45 +0,0 @@ -# English empty translation for po2json text fixture. -# -msgid "" -msgstr "" -"Project-Id-Version: po2json\n" -"POT-Creation-Date: 2012-10-26 12:00+0000\n" -"PO-Revision-Date: 2013-11-08 09:09+0200\n" -"Last-Translator: Illimar Tambek <illimar.tambek@gmail.com>\n" -"Language-Team: po2json\n" -"MIME-Version: 1.0\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 1.5.7\n" -"Language: en\n" - -#: test.js:1 -msgid "Hello, world!\n" -msgstr "" - -#: test.js:2 -msgctxt "string context" -msgid "the contextual phrase" -msgstr "" - -#: test.js:3 -msgid "" -"this is the first line\n" -"this is the next one\n" -"but this is the last\n" -msgstr "" - -#: test.js:4 -msgid "one product" -msgid_plural "%d products" -msgstr[0] "" -msgstr[1] "" - -#: test.js:5 -msgid "A sentence with \"quotation\" marks." -msgstr "" - -#: test.js:6 -msgid "A fuzzy translation" -msgstr "" diff --git a/node_modules/po2json/test/fixtures/en-mf-fallback-to-msgid.json b/node_modules/po2json/test/fixtures/en-mf-fallback-to-msgid.json deleted file mode 100644 index 8f4d790ba..000000000 --- a/node_modules/po2json/test/fixtures/en-mf-fallback-to-msgid.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "Hello, world!\n": "Hello, world!\n", - "this is the first line\nthis is the next one\nbut this is the last\n": - "this is the first line\nthis is the next one\nbut this is the last\n", - "A sentence with \"quotation\" marks.": "A sentence with \"quotation\" marks.", - "one product": "one product", - "string context\u0004the contextual phrase": "the contextual phrase", - "A fuzzy translation": "A fuzzy translation" -}
\ No newline at end of file diff --git a/node_modules/po2json/test/fixtures/en-no-header.json b/node_modules/po2json/test/fixtures/en-no-header.json deleted file mode 100644 index f933eb8eb..000000000 --- a/node_modules/po2json/test/fixtures/en-no-header.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "Hello World": [ - null, - "Hello World" - ] -}
\ No newline at end of file diff --git a/node_modules/po2json/test/fixtures/en-no-header.po b/node_modules/po2json/test/fixtures/en-no-header.po deleted file mode 100644 index 7b57ae104..000000000 --- a/node_modules/po2json/test/fixtures/en-no-header.po +++ /dev/null @@ -1,4 +0,0 @@ -# Very minimal .po - -msgid "Hello World" -msgstr "Hello World" diff --git a/node_modules/po2json/test/fixtures/ja-jed1.x.json b/node_modules/po2json/test/fixtures/ja-jed1.x.json deleted file mode 100644 index 880341632..000000000 --- a/node_modules/po2json/test/fixtures/ja-jed1.x.json +++ /dev/null @@ -1 +0,0 @@ -{"domain":"messages","locale_data":{"messages":{"":{"domain":"messages","plural_forms":"nplurals=1; plural=0;","lang":"ja"},"♂ Male":["男性"],"partner application":["パートナーアプリ"],"result":["検索結果"],"For %s person starting at %s":["For %1$s people starting at %2$s"]}}} diff --git a/node_modules/po2json/test/fixtures/ja.json b/node_modules/po2json/test/fixtures/ja.json deleted file mode 100644 index a562b0646..000000000 --- a/node_modules/po2json/test/fixtures/ja.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "": { - "project-id-version": "VERSION", - "po-revision-date": "2016-08-08 14:08+0000", - "last-translator": "FULL NAME <EMAIL@ADDRESS>", - "language-team": "LANGUAGE TEAM <EMAIL@ADDRESS>", - "language": "ja", - "mime-version": "1.0", - "content-type": "text/plain; charset=UTF-8", - "content-transfer-encoding": "8bit", - "plural-forms": "nplurals=1; plural=0;" - }, - "♂ Male": [ null, "男性" ], - "partner application": [ "partner applications", [ "パートナーアプリ" ] ], - "result": [ "results", [ "検索結果" ] ], - "For %s person starting at %s": [ "For %s people starting at %s", ["For %1$s people starting at %2$s"] ] -} diff --git a/node_modules/po2json/test/fixtures/ja.po b/node_modules/po2json/test/fixtures/ja.po deleted file mode 100755 index e590422a5..000000000 --- a/node_modules/po2json/test/fixtures/ja.po +++ /dev/null @@ -1,27 +0,0 @@ -msgid "" -msgstr "" -"Project-Id-Version: VERSION\n" -"PO-Revision-Date: 2016-08-08 14:08+0000\n" -"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" -"Language-Team: LANGUAGE TEAM <EMAIL@ADDRESS>\n" -"Language: ja\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=1; plural=0;\n" - -msgid "♂ Male" -msgstr "男性" - -msgid "partner application" -msgid_plural "partner applications" -msgstr[0] "パートナーアプリ" - -msgid "result" -msgid_plural "results" -msgstr[0] "検索結果" - -msgid "For %s person starting at %s" -msgid_plural "For %s people starting at %s" -msgstr[0] "For %1$s people starting at %2$s" - diff --git a/node_modules/po2json/test/fixtures/pl-jed.json b/node_modules/po2json/test/fixtures/pl-jed.json deleted file mode 100644 index 43f8c4133..000000000 --- a/node_modules/po2json/test/fixtures/pl-jed.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "domain": "messages", - "locale_data": { - "messages": { - "": { - "domain": "messages", - "plural_forms": "nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);", - "lang": "pl" - }, - "Hello, world!\n": [ - null, - "Witaj, świecie!\n" - ], - "this is the first line\nthis is the next one\nbut this is the last\n": [ - null, - "to jest pierwsza linia\nto jest następny\nale to jest ostatnia\n" - ], - "one product": [ - "%d products", - "jeden produkt", - "%d produkty", - "%d produktów" - ], - "A sentence with \"quotation\" marks.": [ - null, - "Zdanie w \"cudzysłowie\"." - ], - "string context\u0004the contextual phrase": [ - null, - "zwrot kontekstowe" - ], - "a product": [ - "%d products", - "", - "", - "" - ] - } - } -} diff --git a/node_modules/po2json/test/fixtures/pl-jed1.x.json b/node_modules/po2json/test/fixtures/pl-jed1.x.json deleted file mode 100644 index 630ac3a77..000000000 --- a/node_modules/po2json/test/fixtures/pl-jed1.x.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "domain": "messages", - "locale_data": { - "messages": { - "": { - "domain": "messages", - "plural_forms": "nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);", - "lang": "pl" - }, - "Hello, world!\n": [ - "Witaj, świecie!\n" - ], - "this is the first line\nthis is the next one\nbut this is the last\n": [ - "to jest pierwsza linia\nto jest następny\nale to jest ostatnia\n" - ], - "one product": [ - "jeden produkt", - "%d produkty", - "%d produktów" - ], - "A sentence with \"quotation\" marks.": [ - "Zdanie w \"cudzysłowie\"." - ], - "string context\u0004the contextual phrase": [ - "zwrot kontekstowe" - ], - "a product": [ - "", - "%d products", - "%d products" - ] - } - } -} diff --git a/node_modules/po2json/test/fixtures/pl-mf.json b/node_modules/po2json/test/fixtures/pl-mf.json deleted file mode 100644 index 19a3550f4..000000000 --- a/node_modules/po2json/test/fixtures/pl-mf.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "Hello, world!\n": "Witaj, świecie!\n", - "this is the first line\nthis is the next one\nbut this is the last\n": - "to jest pierwsza linia\nto jest następny\nale to jest ostatnia\n", - "A sentence with \"quotation\" marks.": "Zdanie w \"cudzysłowie\".", - "string context\u0004the contextual phrase": "zwrot kontekstowe" -}
\ No newline at end of file diff --git a/node_modules/po2json/test/fixtures/pl-mf.po b/node_modules/po2json/test/fixtures/pl-mf.po deleted file mode 100644 index f954710a8..000000000 --- a/node_modules/po2json/test/fixtures/pl-mf.po +++ /dev/null @@ -1,44 +0,0 @@ -# Polish translation for po2json text fixture. -# -msgid "" -msgstr "" -"Project-Id-Version: po2json\n" -"POT-Creation-Date: 2012-10-26 12:00+0000\n" -"PO-Revision-Date: 2013-11-08 09:09+0200\n" -"Last-Translator: Illimar Tambek <illimar.tambek@gmail.com>\n" -"Language-Team: po2json\n" -"MIME-Version: 1.0\n" -"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 " -"|| n%100>=20) ? 1 : 2);\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 1.5.7\n" -"Language: pl\n" - -#: test.js:1 -msgid "Hello, world!\n" -msgstr "Witaj, świecie!\n" - -#: test.js:2 -msgctxt "string context" -msgid "the contextual phrase" -msgstr "zwrot kontekstowe" - -#: test.js:3 -msgid "" -"this is the first line\n" -"this is the next one\n" -"but this is the last\n" -msgstr "" -"to jest pierwsza linia\n" -"to jest następny\n" -"ale to jest ostatnia\n" - -#: test.js:5 -msgid "A sentence with \"quotation\" marks." -msgstr "Zdanie w \"cudzysłowie\"." - -#: test.js:6 -#, fuzzy -msgid "A fuzzy translation" -msgstr "Tłumaczenie rozmyta" diff --git a/node_modules/po2json/test/fixtures/pl.json b/node_modules/po2json/test/fixtures/pl.json deleted file mode 100644 index 8530ad456..000000000 --- a/node_modules/po2json/test/fixtures/pl.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "": { - "project-id-version": "po2json", - "pot-creation-date": "2012-10-26 12:00+0000", - "po-revision-date": "2013-11-08 09:09+0200", - "last-translator": "Illimar Tambek <illimar.tambek@gmail.com>", - "language-team": "po2json", - "mime-version": "1.0", - "plural-forms": "nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);", - "content-type": "text/plain; charset=UTF-8", - "content-transfer-encoding": "8bit", - "x-generator": "Poedit 1.5.7", - "language": "pl" - }, - "Hello, world!\n": [ - null, - "Witaj, świecie!\n" - ], - "this is the first line\nthis is the next one\nbut this is the last\n": [ - null, - "to jest pierwsza linia\nto jest następny\nale to jest ostatnia\n" - ], - "one product": [ - "%d products", - "jeden produkt", - "%d produkty", - "%d produktów" - ], - "A sentence with \"quotation\" marks.": [ - null, - "Zdanie w \"cudzysłowie\"." - ], - "string context\u0004the contextual phrase": [ - null, - "zwrot kontekstowe" - ], - "a product": [ - "%d products", - "", - "", - "" - ] -} diff --git a/node_modules/po2json/test/fixtures/pl.po b/node_modules/po2json/test/fixtures/pl.po deleted file mode 100644 index 4fda5f7a6..000000000 --- a/node_modules/po2json/test/fixtures/pl.po +++ /dev/null @@ -1,58 +0,0 @@ -# Polish translation for po2json text fixture. -# -msgid "" -msgstr "" -"Project-Id-Version: po2json\n" -"POT-Creation-Date: 2012-10-26 12:00+0000\n" -"PO-Revision-Date: 2013-11-08 09:09+0200\n" -"Last-Translator: Illimar Tambek <illimar.tambek@gmail.com>\n" -"Language-Team: po2json\n" -"MIME-Version: 1.0\n" -"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 " -"|| n%100>=20) ? 1 : 2);\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 1.5.7\n" -"Language: pl\n" - -#: test.js:1 -msgid "Hello, world!\n" -msgstr "Witaj, świecie!\n" - -#: test.js:2 -msgctxt "string context" -msgid "the contextual phrase" -msgstr "zwrot kontekstowe" - -#: test.js:3 -msgid "" -"this is the first line\n" -"this is the next one\n" -"but this is the last\n" -msgstr "" -"to jest pierwsza linia\n" -"to jest następny\n" -"ale to jest ostatnia\n" - -#: test.js:4 -msgid "one product" -msgid_plural "%d products" -msgstr[0] "jeden produkt" -msgstr[1] "%d produkty" -msgstr[2] "%d produktów" - -#: test.js:5 -msgid "A sentence with \"quotation\" marks." -msgstr "Zdanie w \"cudzysłowie\"." - -#: test.js:6 -#, fuzzy -msgid "A fuzzy translation" -msgstr "Tłumaczenie rozmyta" - -#: test.js:7 -msgid "a product" -msgid_plural "%d products" -msgstr[0] "" -msgstr[1] "" -msgstr[2] "" diff --git a/node_modules/po2json/test/po2json_test.js b/node_modules/po2json/test/po2json_test.js deleted file mode 100644 index 4239749b1..000000000 --- a/node_modules/po2json/test/po2json_test.js +++ /dev/null @@ -1,158 +0,0 @@ -var po2json = require(".."), - fs = require("fs"), - Jed = require("jed"); - -module.exports["parse"] = { - setUp: function(callback){ - this.po = fs.readFileSync(__dirname + "/fixtures/pl.po"); - this.json = JSON.parse(fs.readFileSync(__dirname + "/fixtures/pl.json", "utf-8")); - callback(); - }, - - parse: function(test){ - var parsed = po2json.parse(this.po); - test.deepEqual(parsed, this.json); - test.done(); - } -} - -module.exports["parse with Jed format"] = { - setUp: function(callback){ - this.po = fs.readFileSync(__dirname + "/fixtures/pl.po"); - this.json = JSON.parse(fs.readFileSync(__dirname + "/fixtures/pl-jed.json", "utf-8")); - callback(); - }, - - parse: function(test){ - var parsed = po2json.parse(this.po, { format: 'jed' }); - test.deepEqual(parsed, this.json); - test.doesNotThrow(function() { new Jed(parsed) }, Error) - test.done(); - } -}; - -module.exports["parse with Jed1.x format"] = { - setUp: function(callback){ - this.po = fs.readFileSync(__dirname + "/fixtures/pl.po"); - this.json = JSON.parse(fs.readFileSync(__dirname + "/fixtures/pl-jed1.x.json", "utf-8")); - callback(); - }, - - parse: function(test){ - var parsed = po2json.parse(this.po, { format: 'jed1.x' }); - test.deepEqual(parsed, this.json); - test.doesNotThrow(function() { new Jed(parsed) }, Error) - test.done(); - } -}; - -module.exports["parse with MessageFormatter format"] = { - setUp: function(callback){ - this.po = fs.readFileSync(__dirname + "/fixtures/pl-mf.po"); - this.json = JSON.parse(fs.readFileSync(__dirname + "/fixtures/pl-mf.json", "utf-8")); - callback(); - }, - - parse: function(test){ - var parsed = po2json.parse(this.po, { format: 'mf' }); - test.deepEqual(parsed, this.json); - test.done(); - } -} - -module.exports["parse with MessageFormatter format + fallback-to-msgid"] = { - setUp: function(callback){ - this.po = fs.readFileSync(__dirname + "/fixtures/en-empty.po"); - this.json = JSON.parse(fs.readFileSync(__dirname + "/fixtures/en-mf-fallback-to-msgid.json", "utf-8")); - callback(); - }, - - parse: function(test){ - var parsed = po2json.parse(this.po, { format: 'mf', 'fallback-to-msgid': true }); - test.deepEqual(parsed, this.json); - test.done(); - } -} - -module.exports["parse with fallback-to-msgid"] = { - setUp: function(callback){ - this.po = fs.readFileSync(__dirname + "/fixtures/en-empty.po"); - this.json = JSON.parse(fs.readFileSync(__dirname + "/fixtures/en-empty.json", "utf-8")); - callback(); - }, - - parse: function(test){ - var parsed = po2json.parse(this.po, { 'fallback-to-msgid': true }); - test.deepEqual(parsed, this.json); - test.done(); - } -} -module.exports["parseFile"] = { - setUp: function(callback){ - this.json = JSON.parse(fs.readFileSync(__dirname + "/fixtures/pl.json", "utf-8")); - callback(); - }, - - parseFile: function(test){ - var self = this; - po2json.parseFile(__dirname + "/fixtures/pl.po", null, function (err, parsed) { - test.deepEqual(parsed, self.json); - test.done(); - }); - } -} - -module.exports["parseFileSync"] = { - setUp: function(callback){ - this.json = JSON.parse(fs.readFileSync(__dirname + "/fixtures/pl.json", "utf-8")); - callback(); - }, - - parseFileSync: function(test){ - var parsed = po2json.parseFileSync(__dirname + "/fixtures/pl.po"); - test.deepEqual(parsed, this.json); - test.done(); - } -} - -module.exports["parse with Plural-Forms == nplurals=1; plural=0;"] = { - setUp: function(callback){ - this.po = fs.readFileSync(__dirname + "/fixtures/ja.po"); - this.json = JSON.parse(fs.readFileSync(__dirname + "/fixtures/ja.json", "utf-8")); - callback(); - }, - - parse: function(test){ - var parsed = po2json.parse(this.po); - test.deepEqual(parsed, this.json); - test.done(); - } -} - -module.exports["parse with Plural-Forms == nplurals=1; plural=0; and with Jed1.x format"] = { - setUp: function(callback){ - this.po = fs.readFileSync(__dirname + "/fixtures/ja.po"); - this.json = JSON.parse(fs.readFileSync(__dirname + "/fixtures/ja-jed1.x.json", "utf-8")); - callback(); - }, - - parse: function(test){ - var parsed = po2json.parse(this.po, { format: 'jed1.x' }); - test.deepEqual(parsed, this.json); - test.done(); - } -} - -module.exports["parse with no headers"] ={ - setUp: function(callback){ - this.po = fs.readFileSync(__dirname + "/fixtures/en-no-header.po"); - this.json = JSON.parse(fs.readFileSync(__dirname + "/fixtures/en-no-header.json", "utf-8")); - callback(); - }, - - parse: function(test){ - var parsed = po2json.parse(this.po); - test.deepEqual(parsed, this.json); - test.done(); - } -} |
