This check exists to prevent missing and superfluous translations in locale files.
This check warns against missing translations in locale files.
👎 Examples of incorrect code for this check:
// en.default.json
{
"greeting": "Hello, world",
"goodbye": "Bye, world"
}
// fr.json - missing `greeting` and `goodbye`
{
}
// fr.json - missing `greeting` and superfluous `goodby`
{
"greeting": "Bonjour, monde"
"goodby": "Au revoir, monde"
}
👍 Example of correct code for this check:
// en.default.json
{
"greeting": "Hello, world",
"goodbye": "Bye, world"
"pluralized_greeting": {
"one": "Hello, you",
"other": "Hello, y'all",
}
}
// fr.json
{
"greeting": "Bonjour, monde"
"goodbye": "Au revoir, monde"
"pluralized_greeting": {
"zero": "Je suis seul :(",
"few": "Salut, groupe!"
}
}
The default configuration for this check is the following:
MatchingTranslations:
enabled: true
This check has been introduced in Theme Check 0.1.0.