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

Translation keys part of comment must not be valid and must be reported as an error/warning #110

Open
sebd71 opened this issue Aug 20, 2021 · 0 comments

Comments

@sebd71
Copy link
Contributor

sebd71 commented Aug 20, 2021

Bug report

Describe the bug

Translation keys part that are part of comment in typescript or in html are currently considered as used.

To Reproduce

Steps to reproduce the behavior:

  • Declare a key in en.json language file and add a reference of this key in comment either in ts or in html :
// this is my comment that refer the key STRING.KEY_COMMENT

or

<!--   STRING.KEY_COMMENT -->

Expected behavior

Translation keys part that are inside a comment section must be considered as not used and must raise an error (or warning).
It is maybe possible to update regexp of findKeysList function (file keys.ts) to detect typescript comment (line beginning with //) but comment detection in html is more tricky because comment may defined on several lines.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants