Skip to main content

MatchingSchemaTranslations

Identifies missing or additional translations in schema locale files.


The following examples contain code snippets that either fail or pass this check.

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"
}

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!"
}
}

The following example contains the default configuration for this check:

MatchingSchemaTranslations:
enabled: true
severity: error
ParameterDescription
enabledWhether the check is enabled.
severityThe 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?