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 a warning for JSON files that are nested #5

Open
2 tasks done
andrewtavis opened this issue Jan 7, 2025 · 2 comments
Open
2 tasks done

Add a warning for JSON files that are nested #5

andrewtavis opened this issue Jan 7, 2025 · 2 comments
Assignees
Labels
feature New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@andrewtavis
Copy link
Member

Terms

Description

One useful functionality for i18n-check would be a warning for users who have their JSON files structured using a nested structure. This is common practice, but then prevents i18n keys from being changed together with their usage via find and replace. All i18n JSON files can be checked and the following message can be shown to the user:

Nested JSON structure for i18n files detected. i18n-check would suggest that flat files are used for all i18n JSON files as this allows for i18n keys to be found and replaced in the JSON file and in all the files in which they're used. This warning can be disabled in i18n_check_config.yaml with the disable-nested-json-warning argument being set to true.

The functionality for this can go in a check_nested_json.py file, with this being the last file for the run_i18n_checks.py process such that this warning is the last thing that's printed to the user if there are warnings.

Contribution

Happy to support on this and review a PR once it's opened! 🚀

@andrewtavis andrewtavis added good first issue Good for newcomers help wanted Extra attention is needed feature New feature or request labels Jan 7, 2025
@OmarAI2003
Copy link
Contributor

Ready to be assigned! 👍

@andrewtavis
Copy link
Member Author

Thanks for the willingness to help out here, @OmarAI2003! Looking forward to the next steps :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
Status: Todo
Development

No branches or pull requests

2 participants