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

github action to track missing translation #11

Open
rperon opened this issue Mar 8, 2024 · 1 comment
Open

github action to track missing translation #11

rperon opened this issue Mar 8, 2024 · 1 comment

Comments

@rperon
Copy link
Owner

rperon commented Mar 8, 2024

Feedback from @fredericrous:

Nice to have final feature: a github action that checks there are no missing translation (some in the code but not in the translation json file)

This might be done by using i18n-parser, need some investigation to find the right solution.

@rperon rperon mentioned this issue Mar 8, 2024
@fredericrous
Copy link

fredericrous commented Mar 8, 2024

yup, I was thinking of comparing the output of i18n-parser with the version file.
a very basic implem could be:

  • load the output with something like Object.keys(result)
  • if there are more keys in the code than in the translation files
  • loop over to find which are the missing keys with something like output.filter(x => translation['en].includes(x));
  • do the opposite to know if there are keys in the translation files that are not in the code

Update: also the action should fail if there is a duplicated key in the same file!

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

2 participants