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

Add solution to check consistency of translations #72

Open
benoit74 opened this issue Sep 17, 2024 · 5 comments
Open

Add solution to check consistency of translations #72

benoit74 opened this issue Sep 17, 2024 · 5 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@benoit74
Copy link
Collaborator

With #69, we have introduced i18n.

However, currently there is no tooling to ensure consistency:

  • identify unused strings (strings present in JSON files but not used - anymore - in JS or Python codebase)
  • identify missing strings (strings present in JS or Python codebase but not present in JSON files - must be present in at least en for proper operation and in qqq for proper TranslateWiki operation)
@benoit74 benoit74 added enhancement New feature or request good first issue Good for newcomers labels Sep 17, 2024
@advait-zx
Copy link

Flag any keys that are present in the JSON files but not used in the code
how can i contribute to this issue

@benoit74
Copy link
Collaborator Author

I think we first need to check if such a tool does not already exist. Be aware that while all translated strings are stored in JSON files, they are used both in .vue and Jinja2 templates. They could theoretically soon be used in .py files.

If it does not exist, then I would suggest to develop a small Python script doing the job. Be aware that we need both directions, i.e. flag any keys present in the JSON but not used in the code AND flag any keys used in the code but not present in at least en and qqq JSON files.

This Python script should exit with non-zero exit code when problem(s) are detected, and we can add this script to invoke tasks.py and the the QA CI.

I will soon merge #69, so this will be easier to work on.

@benoit74
Copy link
Collaborator Author

@advait-zx do you confirm you will work on it, shall I assign you the issue?

@advait-zx
Copy link

yeah but i will need help for this issue

@benoit74
Copy link
Collaborator Author

Isn't what I've described a sufficient start point to make progress and if needed prepare a PR? If not unfortunately I can't help more than that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants