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

Any plans updating this repo? #92

Open
gercheq opened this issue Feb 14, 2018 · 3 comments
Open

Any plans updating this repo? #92

gercheq opened this issue Feb 14, 2018 · 3 comments

Comments

@gercheq
Copy link

gercheq commented Feb 14, 2018

It's really useful to automate the process of extracting strings from the templates and scripts however this repo has been sitting with issues and open PRs for a long time.

I found out this repo https://github.com/Boulangerie/angular-translate-extract
It seems to be more recent but I couldn't be sure since it was not referenced in angular-translate account.

Please advise and let me know if I can help bringing this one up-to-date.

Thanks!

@gercheq
Copy link
Author

gercheq commented Feb 19, 2018

@firehist @manuelmazzuola @phw @knalli @jtheoof @SKoschnicke @jdahlbom first of all, sorry for mentioning y'all. However, it's getting really tricky to use this grunt task with keys coming from the API. Let's say we have a select list from the API with countries. How can we make sure the translation keys will be extracted? Is it a good idea to setup a test server? is there any better alternative?

@jtheoof
Copy link
Contributor

jtheoof commented Feb 19, 2018

I suggest that you you force the extracter to grab the keys returned by the server. If the server is in node you could enforce this way:

res.send({
   message: /* i18nextract */'my.key.returned.from.server',
   ...
});

Otherwise do something similar to the component displaying that string. If you're doing it client side, I suggest to do this /* i18nextract */ extraction as close to the consumption of that string as possible. This way removal of the component will indeed remove it from your i18n.json file containing the actual translations.

Hope this helps.

@cbeiter
Copy link

cbeiter commented Aug 13, 2018

Echoing @gercheq, grunt-angular-translate is very useful and has some functionality like the custom regex that other variations of angular-translate extraction tools do not support. However, it depends on such an old version of grunt and grunt-cli that it is using deprecated modules.

In particular:
"+ grunt-cli@1.2.0

npm WARN deprecated coffee-script@1.3.3: CoffeeScript on NPM has moved to "coffeescript" (no hyphen)

npm WARN deprecated minimatch@0.2.14: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue

npm WARN deprecated graceful-fs@1.2.3: please upgrade to graceful-fs 4 for compatibility with current and future versions of Node.js

npm WARN deprecated minimatch@0.3.0: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue"

Moving to a newer grunt version means grunt-angular-translate can't find it's required dependency on an older grunt:

"npm WARN EPEERINVALID grunt-angular-translate@0.3.0 requires a peer of grunt@~0.4.0 but none was installed."

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

3 participants