tgalopin / symfony-translations-checker
Checks the coherence of the translations of a Symfony application across locales.
Installs: 15
Dependents: 0
Suggesters: 0
Security: 0
Stars: 16
Watchers: 3
Forks: 1
Open Issues: 0
Type:project
Requires
- php: >=7.2.5
- ext-json: *
- symfony/console: ^5.2
- symfony/finder: ^5.2
- symfony/yaml: ^5.2
Requires (Dev)
- symfony/phpunit-bridge: ^5.2
- symfony/var-dumper: ^5.2
This package is auto-updated.
Last update: 2024-12-03 14:35:32 UTC
README
Symfony Translations Checker is a small PHP tool that checks the coherence of the translations of a Symfony application across locales. It is designed to be used as a Continuous Integration tool.
It warns about issues for:
- domains that do not have the same locales as other domains
- keys that exists in the reference locale but not in another locale
- keys that exists in another locale but do not exist in the reference locale
It understands translations domains. For the moment, it only supports the YAML format.
Note: This tool isn't an official Symfony tool. I developed it for my own needs and thought it could be useful to others, thus I open-sourced it. I plan to maintain it in the long term, so feel free to use it whever you wish.
Usage
Symfony Translations Checker is a PHAR file that you can download (on the releases page) and execute, pointing it to your translations directory:
php symfony-translation-checker.phar check /path/to/your/project/translations
By default, the locale acting as reference is "en". You can change this setting by passing a reference option:
php symfony-translation-checker.phar check /path/to/your/project/translations --reference=fr