Validator
Last updated
Was this helpful?
Last updated
Was this helpful?
The Transloco Validator package helps ensure the integrity of your translation files by validating their JSON structure and detecting duplicate keys. This tool is handy for maintaining consistent and error-free translation files throughout your project.
To ensure your translation files are always valid, configure Transloco Validator to run on specific paths during pre-commit checks. You can easily set this up in your lint-staged
configuration.
lint-staged
supports . All you need to do is add the following line to the configuration of your choice:
This ensures that any changes to your translation files are validated before they are committed.
JSON Validation: Verifies that all translation files have a valid JSON structure.
Duplicate Key Detection: Ensures no duplicate keys are present in your translation files.
By incorporating Transloco Validator into your workflow, you can maintain high-quality translation files and avoid runtime issues caused by invalid JSON or key conflicts.