Add support for multi-line msgid

This commit is contained in:
Mattias Lundell
2017-05-29 11:36:18 +02:00
parent 2c51ed2000
commit 4a52c7709d
4 changed files with 94 additions and 44 deletions

View File

@@ -9,8 +9,8 @@ import (
func TestLocale(t *testing.T) {
// Set PO content
str := `
msgid ""
msgstr ""
# msgid ""
# msgstr ""
# Initial comment
# Headers below
"Language: en\n"
@@ -56,7 +56,7 @@ msgstr "Some random translation in a context"
msgid "More"
msgstr "More translation"
`
`
// Create Locales directory with simplified language code
dirname := path.Join("/tmp", "en", "LC_MESSAGES")
@@ -176,7 +176,7 @@ msgstr "Some random translation in a context"
msgid "More"
msgstr "More translation"
`
`
// Create Locales directory with simplified language code
dirname := path.Join("/tmp", "en", "LC_MESSAGES")
@@ -259,7 +259,7 @@ msgstr[0] "This one is the singular: %s"
msgstr[1] "This one is the plural: %s"
msgstr[2] "And this is the second plural form: %s"
`
`
// Create Locales directory with simplified language code
dirname := path.Join("/tmp", "es")