✅ Added Unicode tests
This commit is contained in:
parent
de39303b65
commit
a254d89311
@ -1,2 +1,2 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
xgettext -o test.pot -k_ -k"_LC:1c,2" -s -c --package-name=moFileReader test.cpp
|
xgettext -o test.pot -k"_L" -k"_LC:1c,2" -s -c --package-name=moFileReader --from-code=UTF-8 test.cpp
|
Binary file not shown.
@ -7,8 +7,8 @@ msgid ""
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: moFileReader\n"
|
"Project-Id-Version: moFileReader\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2018-12-13 14:39+0100\n"
|
"POT-Creation-Date: 2021-10-16 11:52+0200\n"
|
||||||
"PO-Revision-Date: 2021-08-25 09:01+0000\n"
|
"PO-Revision-Date: 2021-10-16 11:53+0200\n"
|
||||||
"Last-Translator: Edgar <Edgar@AnotherFoxGuy.com>\n"
|
"Last-Translator: Edgar <Edgar@AnotherFoxGuy.com>\n"
|
||||||
"Language-Team: Dutch <https://weblate.anotherfoxguy.com/projects/"
|
"Language-Team: Dutch <https://weblate.anotherfoxguy.com/projects/"
|
||||||
"mofilereader/mofilereader/nl/>\n"
|
"mofilereader/mofilereader/nl/>\n"
|
||||||
@ -17,53 +17,61 @@ msgstr ""
|
|||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
||||||
"X-Generator: Weblate 4.8\n"
|
"X-Generator: Poedit 3.0\n"
|
||||||
|
|
||||||
|
#: test.cpp:60
|
||||||
|
msgid ""
|
||||||
|
"De naam 'Omrop Fryslân' houdt in: Regionaal herkenbaar, actueel, "
|
||||||
|
"onafhankelijk, betrouwbaar, toegankelijk, vermakelijk en divers"
|
||||||
|
msgstr ""
|
||||||
|
"De namme ‘Omrop Fryslân’ hâldt yn: regionaal werkenber, aktueel, "
|
||||||
|
"ûnôfhinklik, betrouber, tagonklik, ûnderhâldend en divers"
|
||||||
|
|
||||||
|
#: test.cpp:63
|
||||||
|
msgid "I 💚 Fryslân"
|
||||||
|
msgstr "Ik 💚 Friesland"
|
||||||
|
|
||||||
|
#: test.cpp:58
|
||||||
|
msgid ""
|
||||||
|
"Omrop Fryslân makket radio en telefyzje yn it Frysk, dêrmei is de omrop de "
|
||||||
|
"ienige stjoerder fan Nederlân dy’t net yn it Nederlânsk útstjoert"
|
||||||
|
msgstr ""
|
||||||
|
"Omrop Fryslân maakt radio en televisie in het Fries, daarmee is de omroep de "
|
||||||
|
"enige zender van Nederland die niet in het Nederlanders uitzendt"
|
||||||
|
|
||||||
#. This is the first comment.
|
#. This is the first comment.
|
||||||
#: test.cpp:31
|
#: test.cpp:71
|
||||||
msgctxt "TEST|String|1"
|
msgctxt "TEST|String|1"
|
||||||
msgid "String English"
|
msgid "String English"
|
||||||
msgstr "Text Nederlands Een"
|
msgstr "Text Nederlands Een"
|
||||||
|
|
||||||
#. This is the second comment.
|
#. This is the second comment.
|
||||||
#: test.cpp:33
|
#: test.cpp:73
|
||||||
msgctxt "TEST|String|2"
|
msgctxt "TEST|String|2"
|
||||||
msgid "String English"
|
msgid "String English"
|
||||||
msgstr "Text Nederlands Twee"
|
msgstr "Text Nederlands Twee"
|
||||||
|
|
||||||
#. This is the third comment.
|
#. This is the third comment.
|
||||||
#: test.cpp:35
|
#: test.cpp:75
|
||||||
msgctxt "TEST|String|3"
|
msgctxt "TEST|String|3"
|
||||||
msgid "String English"
|
msgid "String English"
|
||||||
msgstr "Text Nederlands Drie"
|
msgstr "Text Nederlands Drie"
|
||||||
|
|
||||||
#. This is the first comment.
|
#. This is the first comment.
|
||||||
#: test.cpp:19
|
#: test.cpp:46
|
||||||
msgid "String English One"
|
msgid "String English One"
|
||||||
msgstr "Text Nederlands Een"
|
msgstr "Text Nederlands Een"
|
||||||
|
|
||||||
#. This is the third comment.
|
#. This is the third comment.
|
||||||
#: test.cpp:23
|
#: test.cpp:50
|
||||||
msgid "String English Three"
|
msgid "String English Three"
|
||||||
msgstr "Text Nederlands Drie"
|
msgstr "Text Nederlands Drie"
|
||||||
|
|
||||||
#. This is the second comment.
|
#. This is the second comment.
|
||||||
#: test.cpp:21
|
#: test.cpp:48
|
||||||
msgid "String English Two"
|
msgid "String English Two"
|
||||||
msgstr "Text Nederlands Twee"
|
msgstr "Text Nederlands Twee"
|
||||||
|
|
||||||
#~ msgctxt "TEST|String|1"
|
#: test.cpp:62
|
||||||
#~ msgid "String English One"
|
msgid "geändert ß"
|
||||||
#~ msgstr "Text Nederlands Een"
|
msgstr "veranderd ß"
|
||||||
|
|
||||||
#~ msgctxt "TEST|String|3"
|
|
||||||
#~ msgid "String English Three"
|
|
||||||
#~ msgstr "Text Nederlands Drie"
|
|
||||||
|
|
||||||
#~ msgctxt "TEST|String|2"
|
|
||||||
#~ msgid "String English Two"
|
|
||||||
#~ msgstr "Text Nederlands Twee"
|
|
||||||
|
|
||||||
#~ msgctxt "Menu|"
|
|
||||||
#~ msgid "File"
|
|
||||||
#~ msgstr "Bestand"
|
|
||||||
|
@ -24,7 +24,7 @@ TEST_CASE("Count number of strings", "[Count]")
|
|||||||
{
|
{
|
||||||
moFileReader moFR;
|
moFileReader moFR;
|
||||||
moFR.ReadFile(MO_TEST_FILE);
|
moFR.ReadFile(MO_TEST_FILE);
|
||||||
CHECK(7 == moFR.GetNumStrings());
|
CHECK(11 == moFR.GetNumStrings());
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_CASE("Empties the Lookup-Table", "[Count]")
|
TEST_CASE("Empties the Lookup-Table", "[Count]")
|
||||||
@ -32,7 +32,7 @@ TEST_CASE("Empties the Lookup-Table", "[Count]")
|
|||||||
moFileReader moFR;
|
moFileReader moFR;
|
||||||
moFR.ReadFile(MO_TEST_FILE);
|
moFR.ReadFile(MO_TEST_FILE);
|
||||||
CHECK("Text Nederlands Een" == moFR.Lookup("String English One"));
|
CHECK("Text Nederlands Een" == moFR.Lookup("String English One"));
|
||||||
CHECK(7 == moFR.GetNumStrings());
|
CHECK(11 == moFR.GetNumStrings());
|
||||||
moFR.ClearTable();
|
moFR.ClearTable();
|
||||||
CHECK("String English One" == moFR.Lookup("String English One"));
|
CHECK("String English One" == moFR.Lookup("String English One"));
|
||||||
CHECK(0 == moFR.GetNumStrings());
|
CHECK(0 == moFR.GetNumStrings());
|
||||||
@ -50,6 +50,19 @@ TEST_CASE("Lookup string", "[Lookup]")
|
|||||||
CHECK("Text Nederlands Drie" == _L("String English Three"));
|
CHECK("Text Nederlands Drie" == _L("String English Three"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TEST_CASE("Lookup string with unicode", "[LookupUnicode]")
|
||||||
|
{
|
||||||
|
moFileReader moFR;
|
||||||
|
moFR.ReadFile(MO_TEST_FILE);
|
||||||
|
CHECK("Omrop Fryslân maakt radio en televisie in het Fries, daarmee is de omroep de enige zender van Nederland die niet in het Nederlanders uitzendt"
|
||||||
|
== _L("Omrop Fryslân makket radio en telefyzje yn it Frysk, dêrmei is de omrop de ienige stjoerder fan Nederlân dy’t net yn it Nederlânsk útstjoert"));
|
||||||
|
CHECK("De namme ‘Omrop Fryslân’ hâldt yn: regionaal werkenber, aktueel, ûnôfhinklik, betrouber, tagonklik, ûnderhâldend en divers"
|
||||||
|
== _L("De naam 'Omrop Fryslân' houdt in: Regionaal herkenbaar, actueel, onafhankelijk, betrouwbaar, toegankelijk, vermakelijk en divers"));
|
||||||
|
CHECK("Bûter, brea en brûne sûker" == moFR.Lookup("Bûter, brea en brûne sûker"));
|
||||||
|
CHECK("veranderd ß" == _L("geändert ß"));
|
||||||
|
CHECK("Ik 💚 Friesland" == _L("I 💚 Fryslân"));
|
||||||
|
}
|
||||||
|
|
||||||
TEST_CASE("Lookup string with context", "[LookupWithContext]")
|
TEST_CASE("Lookup string with context", "[LookupWithContext]")
|
||||||
{
|
{
|
||||||
moFileReader moFR;
|
moFileReader moFR;
|
||||||
@ -74,6 +87,6 @@ TEST_CASE("Lookup not existing strings with context", "[LookupWithContext-fail]"
|
|||||||
{
|
{
|
||||||
moFileReader moFR;
|
moFileReader moFR;
|
||||||
moFR.ReadFile(MO_TEST_FILE);
|
moFR.ReadFile(MO_TEST_FILE);
|
||||||
CHECK("String English" == _LC("Nope", "String English"));
|
CHECK("String English" == moFR.LookupWithContext("Nope", "String English"));
|
||||||
CHECK("Not this one" == _LC("TEST|String|1", "Not this one"));
|
CHECK("Not this one" == moFR.LookupWithContext("TEST|String|1", "Not this one"));
|
||||||
}
|
}
|
@ -8,44 +8,64 @@ msgid ""
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: moFileReader\n"
|
"Project-Id-Version: moFileReader\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2018-12-13 14:39+0100\n"
|
"POT-Creation-Date: 2021-10-16 11:52+0200\n"
|
||||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||||
"Language: \n"
|
"Language: \n"
|
||||||
"MIME-Version: 1.0\n"
|
"MIME-Version: 1.0\n"
|
||||||
"Content-Type: text/plain; charset=CHARSET\n"
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
|
|
||||||
|
#: test.cpp:60
|
||||||
|
msgid ""
|
||||||
|
"De naam 'Omrop Fryslân' houdt in: Regionaal herkenbaar, actueel, "
|
||||||
|
"onafhankelijk, betrouwbaar, toegankelijk, vermakelijk en divers"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: test.cpp:63
|
||||||
|
msgid "I 💚 Fryslân"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: test.cpp:58
|
||||||
|
msgid ""
|
||||||
|
"Omrop Fryslân makket radio en telefyzje yn it Frysk, dêrmei is de omrop de "
|
||||||
|
"ienige stjoerder fan Nederlân dy’t net yn it Nederlânsk útstjoert"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#. This is the first comment.
|
#. This is the first comment.
|
||||||
#: test.cpp:31
|
#: test.cpp:71
|
||||||
msgctxt "TEST|String|1"
|
msgctxt "TEST|String|1"
|
||||||
msgid "String English"
|
msgid "String English"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#. This is the second comment.
|
#. This is the second comment.
|
||||||
#: test.cpp:33
|
#: test.cpp:73
|
||||||
msgctxt "TEST|String|2"
|
msgctxt "TEST|String|2"
|
||||||
msgid "String English"
|
msgid "String English"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#. This is the third comment.
|
#. This is the third comment.
|
||||||
#: test.cpp:35
|
#: test.cpp:75
|
||||||
msgctxt "TEST|String|3"
|
msgctxt "TEST|String|3"
|
||||||
msgid "String English"
|
msgid "String English"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#. This is the first comment.
|
#. This is the first comment.
|
||||||
#: test.cpp:19
|
#: test.cpp:46
|
||||||
msgid "String English One"
|
msgid "String English One"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#. This is the third comment.
|
#. This is the third comment.
|
||||||
#: test.cpp:23
|
#: test.cpp:50
|
||||||
msgid "String English Three"
|
msgid "String English Three"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#. This is the second comment.
|
#. This is the second comment.
|
||||||
#: test.cpp:21
|
#: test.cpp:48
|
||||||
msgid "String English Two"
|
msgid "String English Two"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#: test.cpp:62
|
||||||
|
msgid "geändert ß"
|
||||||
|
msgstr ""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user