You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is this a bug, an improvement, a proposal or something else? Describe it.
When exporting from a po and extracting text from files, there are multiple issues for multi-line and backquotes usage. This is fine until we use standard gettext tooling for compiling them to mo files.
multilines are printed as is, instead of follow the gettext spec ( )
strings with backquotes as printed as “msgid this is my string”, which then can’t be compiled to mo files.
multilines strings with backquotes are formatted as multi-lines to, without closing quotes on each lines.
The loading is correct though, this only impact the generation file. Those generated files are thus then invalid and can’t be compile to mo file.
What's the expected behaviour, the current behaviour and the steps to reproduce it?
From:
fmt.Println(gotext.Get("Hello World, end line\n"))
fmt.Println(gotext.Get(`A single line text`))
fmt.Println(gotext.Get("A single line text"))
fmt.Println(gotext.Get("\nService already exists and will be reconfigured\n"))
fmt.Println(gotext.Get(`Service already exists and will be reconfigured 2`))
fmt.Println(gotext.Get("\nService already exists and will be reconfigured 2\n"))
fmt.Println(gotext.Get("\nService already exists and will be reconfigured without EOL))
Example of currently exported string:
#: main.go:22
msgid "\nService already exists and will be reconfigured\n"
msgstr ""
#: main.go:23
msgid `
Service already exists and will be reconfigured 2
`
msgstr ""
#: main.go:21
msgid `A single line text`
msgstr ""
#: main.go:22
msgid "Hello World, end line\n"
msgstr ""
#: main.go:30
msgid "\nService already exists and will be reconfigured without EOL"
msgstr ""
Expectation from the spec:
#: main.go:22
msgid ""
"\n"
"Service already exists and will be reconfigured\n"
msgstr ""
#: main.go:26
#: main.go:29
msgid ""
"\n"
"Service already exists and will be reconfigured 2\n"
msgstr ""
#: main.go:23
#: main.go:24
msgid "A single line text"
msgstr ""
#: main.go:22
msgid "Hello World, end line\n"
msgstr ""
#: main.go:30
msgid ""
"\n"
"Service already exists and will be reconfigured without EOL"
msgstr ""
The text was updated successfully, but these errors were encountered:
Please describe your issue
Is this a bug, an improvement, a proposal or something else? Describe it.
When exporting from a po and extracting text from files, there are multiple issues for multi-line and backquotes usage. This is fine until we use standard gettext tooling for compiling them to mo files.
this is my string
”, which then can’t be compiled to mo files.The loading is correct though, this only impact the generation file. Those generated files are thus then invalid and can’t be compile to mo file.
The gettext specification can be found at https://www.gnu.org/software/gettext/manual/html_node/Normalizing.html.
What's the expected behaviour, the current behaviour and the steps to reproduce it?
From:
Example of currently exported string:
Expectation from the spec:
The text was updated successfully, but these errors were encountered: