Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support multi-line strings #80

Merged
merged 1 commit into from
Apr 5, 2018

Conversation

tuyakhov
Copy link
Contributor

@tuyakhov tuyakhov commented Apr 4, 2018

Thank you for creating this library and saving us a lot of time. I really appreciate your effort.
There is a problem that we experienced while implementing continuous deployment on one of our projects.
One of our .po files contained a multi-line string which led to creating an invalid translations.js file. Here is an example of the content in that file:

msgid "Apply"
msgstr "Siguiente\n"
"Aplicar"

This is a correct string and supported by [PO file format].(https://www.gnu.org/software/gettext/manual/html_node/PO-Files.html)
Since the newline character is not escaped when running 'i18n_import' script the produced result is an invalid Javascript code and it will look like this:

export const translations = {
  'es': {
     'Apply': 'Siguiente
Aplicar'
  }
}

@francescarpi francescarpi merged commit 40ded25 into APSL:master Apr 5, 2018
@francescarpi
Copy link
Member

Thanks! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants