validate_localization_coverage
Generate a coverage report for all localization files using the project's check-i18n tool. Use when auditing translation completeness or identifying languages needing attention.
Security Assessment
About validate_localization_coverage
The 'validate_localization_coverage' skill generates a comprehensive coverage report for all localization files within a project by utilizing the 'check-i18n' script. This skill is particularly useful when auditing translation completeness or identifying languages that require attention in terms of missing or extra translation keys. It compares translation files in various languages against a master file (typically 'en-US.json') and identifies discrepancies such as missing keys, extra keys, and coverage percentages for each language, helping developers ensure that all translations are aligned and complete.
The skill features an automated process that runs the 'pnpm run check-i18n' script to compare the localization files. It parses the output of the script to identify missing and extra keys, and computes coverage percentages for each language. Additionally, it summarizes the coverage, calculates average coverage, and lists languages that need attention based on a predefined threshold. The output includes a detailed report of each language’s file path, missing keys, extra keys, coverage percentage, and a summary of missing translations. This automation helps save time during localization audits and provides insights into where resources may need to be focused.
This skill is designed for developers and teams working on projects that require multi-language support. It is particularly beneficial for projects with large localization files and those looking to streamline the process of tracking and improving translation coverage. Whether working on a website, mobile app, or other localized software products, this skill ensures that all languages are properly covered and ready for deployment, preventing any overlooked translations from affecting the user experience.
FAQ
How do I use the 'validate_localization_coverage' skill?
Simply run the 'pnpm run check-i18n' script as part of the skill’s process. The skill will automatically parse the output and generate a detailed coverage report.
What are the system requirements for using this skill?
The skill requires the 'pnpm' package manager and the 'check-i18n' script to be set up in the project. Additionally, the project should have localization files that are compatible with the skill's parsing logic.
What types of files does the skill work with?
The skill works with JSON localization files, specifically comparing them against the 'en-US.json' master file. All language files in the 'src/assets/i18n/' directory are supported.
Can this skill handle extra keys in the language files?
Yes, the skill detects extra keys in the target language files that are not present in the master 'en-US.json' file and reports them in the generated coverage report.
What happens if a language file has missing translations?
The skill will report the missing keys and calculate the coverage percentage for that language. If the coverage is below 95%, the language will be flagged as needing attention.
Install validate_localization_coverage
Quick Setup:
- Copy the skill folder to
.claude/skills/ - Claude will automatically detect and use the skill
Repository
ericfitz/tmi-ux