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

Generating app.js with \n #47

Open
filipeperdigaosousa opened this issue Oct 30, 2019 · 0 comments
Open

Generating app.js with \n #47

filipeperdigaosousa opened this issue Oct 30, 2019 · 0 comments

Comments

@filipeperdigaosousa
Copy link

Hello.

I'm with a problem when moving my .po files into app.js files using gettext:po_to_json method.

For example:

I have the following string in a JS file

__("E.g. I've been working as a social entrepreneur  for the past 5 years. \nBased in Portugal, I’m a Co-Founder of two Social…  ")

When I run gettext:find it generates something like:

msgid ""
"E.g. I've been working as a social entrepreneur  for the past 5 years. \n"
"Based in Portugal, I’m a Co-Founder of two Social…  "
msgstr ""

But when I move into the app.js file, the new line is being escaped producing this:

"E.g. I've been working as a social entrepreneur  for the past 5 years. \\nBased in Portugal, I’m a Co-Founder of two Social…  ":[" translation text "]

which has 2 backslashes, and the translation is not found because the key used in JS file is different from the key in JS file

Someone can help me with this issue?

Thanks in advance

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

No branches or pull requests

1 participant