MatchingSchemaTranslations
Identifies missing or additional translations in schema locale files.
Anchor to ExamplesExamples
The following examples contain code snippets that either fail or pass this check.
Anchor to ✗ Fail✗ Fail
The following locale files aren't consistent:
en.default.schema.json
{
"greeting": "Hello, world",
"goodbye": "Bye, world"
}
es.schema.json
is missing greeting
and goodbye
translations:
es.schema.json
{
}
fr.schema.json
is missing greeting
and has a goodby
tag that isn't present in the default locale:
fr.json
{
"goodby": "Au revoir, monde"
}
Anchor to ✓ Pass✓ Pass
The following locale files are consistent:
en.default.schema.json
{
"greeting": "Hello, world",
"goodbye": "Bye, world",
"pluralized_greeting": {
"one": "Hello, you",
"other": "Hello, y'all",
}
}
fr.schema.json
{
"greeting": "Bonjour, monde",
"goodbye": "Au revoir, monde",
"pluralized_greeting": {
"zero": "Je suis seul :(",
"few": "Salut, groupe!"
}
}
Anchor to OptionsOptions
The following example contains the default configuration for this check:
MatchingSchemaTranslations
enabledtrue
severity error
Parameter | Description |
---|---|
enabled | Whether the check is enabled. |
severity | The severity of the check. |
Anchor to Disabling this checkDisabling this check
Disabling this check isn't recommended because it might result in an inconsistent translation experience for some users.
Was this page helpful?