-
Notifications
You must be signed in to change notification settings - Fork 129
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
Added translate="no" logic #200
Conversation
Excluding strings from extraction won't stop them from being handled by the runtime code. I recommend that you use the I'm hesitant to include this as it might break existing code. Please also include a unit test with pull requests. |
But still, this attribute is very common. The current implementation makes impossible correct behaviour of applications already marked with such a tag. I will create tests and fix for runtime code and ping you then |
Yes you can: replace every |
But notranslate won't be recognized with plugins for a browser or automated translation from google. But translate="no" does. That's a thing |
It's right there in the link you gave (https://cloud.google.com/translate/faq#technical_questions):
|
Oh, sorry, my bad, didn't see that notranslate there. So there is no way to support both attribute and class? |
Well, I'd rather not introduce any (potentially breaking) changes if there's an alternative solution. As per rubenv/angular-gettext#365, this project is in maintenance mode. Whatever changes land now cannot break any existing applications, even if the risk is small. |
@rubenv, thank you then. Will close PR and proceed with current implementation |
Good luck! Feel free to follow-up if things don't work out. |
What?
Logic to exclude translate="no" tags from extract command scope
Why?
So far google chrome supports translate="no" attribute for the content which is not going to be translated by automatic google translate plugin or any other translation. In this PR you can find a logic to do such a thing. Proof:
https://cloud.google.com/translate/faq#technical_questions
Testing / Proof
Run gulp gettext:extract on the template with the translate="no" attribute
ping @rubenv