angular-l10n icon indicating copy to clipboard operation
angular-l10n copied to clipboard

Statistics mode to find unused translation

Open johaven opened this issue 8 years ago • 2 comments

I'm submitting a...

[ ] bug report
[x] feature request
[ ] support request

It might be useful to determine if some translations was never used. I regularly forget to delete some translations from the JSON file when I change or modify them in my code. In many translators (babel etc ...) if the expression to translate no longer exists in the code, it is automatically deleted from the translation file. Here it is not possible to do this (and it makes sense) but I think it's possible to find another way.

A statistics mode (enabled on demand) that counts the number of times the word has been translated could very well help!

johaven avatar Nov 02 '17 12:11 johaven

Hi @johaven,

a coverage of the translations is interesting, but I think it requires an additional library, to work only on dev environment. Also, I think it requires that you build a parser (of .ts & template files): so I think you could also create an extractor to build the basic json file.

If you want work on it, then I can support you and share it in this project.

robisim74 avatar Nov 02 '17 17:11 robisim74

Unfortunately I'm working on a project that is already taking all my time :( I thought it would be easy to add a watcher to the translate function of the Translation service to increment results service. Too bad ... :(

johaven avatar Nov 02 '17 17:11 johaven

Closed due to inactivity

robisim74 avatar May 14 '23 07:05 robisim74