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

Annotated strings #177

Open
matthieusieben opened this issue Dec 13, 2017 · 1 comment
Open

Annotated strings #177

matthieusieben opened this issue Dec 13, 2017 · 1 comment

Comments

@matthieusieben
Copy link

It would be nice to be able to detect strings to translate base on a special comment placed before instead of requiring to wrap into a gettext() function call.

e.g.

const myTranslatagleString = /* @ngTranslate */ "My String"
return gettextCatalog.getString(myTranslatagleString)
@matthieusieben
Copy link
Author

Having to wrap the strings into a gettext function call has two problems:

  • It causes a useless function call in production code, reducing the code's efficiency.
  • It the function sometimes gets renamed by bundlers (e.g. into gettext$1 by RollupJs), preventing proper detection.

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