Skip to content

Ignore \n (After minificatio text is not translated) #183

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

Closed
azachar opened this issue Apr 18, 2015 · 1 comment
Closed

Ignore \n (After minificatio text is not translated) #183

azachar opened this issue Apr 18, 2015 · 1 comment

Comments

@azachar
Copy link

azachar commented Apr 18, 2015

Hello,
when I use project from https://github.com/DaftMonk/generator-angular-fullstack, I find difficulties to match text based on Jade that is compilted into js.

In jade i have this text:

 p.text-justify(translate) Also we are looking for a
                     |   
                     strong volunteer - a native English speaker
                     |  who could help us to review the portal's user interface messages and texts.

Without minification this code is generated into HTML like

Also we are looking for a \n  <strong>volunteer - a native English speaker</strong> who could help us to review the portal's user interface messages and texts.

After minification the text is compiled into a production js like

Also we are looking for a <strong>volunteer - a native English speaker</strong> who could help us to review the portal\'s user interface messages and texts.

So the portal works in dev mode, when it is not minified but a minute I do a deploy procedure where compilation and minification is involved, the /n is removed and thus key is different and not matched.

Is there a possible solution for this?

Thanks a lot for a great job,
Andrej

@azachar azachar changed the title Ignore \n (After minification text is not translated) Ignore \n (After minification a text is not translated) Apr 18, 2015
@azachar azachar changed the title Ignore \n (After minification a text is not translated) Ignore \n (After minificatio text is not translated) Apr 18, 2015
@gabegorelick
Copy link
Collaborator

Looks like you need to pre-process the HTML to remove \n before feeding it to angular-gettext. Unless Jade supports something to do this for you, it might require some glue code. There's nothing we can do if your strings don't match; it's dangerous for us to start stripping out special chars.

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

2 participants