TranslationKeyExists
Identifies references to translations that don't exist.
Anchor to ExamplesExamples
The following examples contain code snippets that either fail or pass this check.
Anchor to ✗ Fail✗ Fail
locales/en.default.json
{
"greetings": "Hello, world!",
"general": {
"close": "Close"
}
}
templates/index.liquid
{{ 'notfound' | t }}
Anchor to ✓ Pass✓ Pass
locales/en.default.json
{
"greetings": "Hello, world!",
"general": {
"close": "Close"
}
}
templates/index.liquid
{{ 'greetings' | t }}
{{ 'general.close' | t }}
Anchor to OptionsOptions
The following example contains the default configuration for this check:
TranslationKeyExists
enabledtrue
severity error
Parameter | Description |
---|---|
enabled | Whether this check is enabled. |
severity | The severity of the check. |
Anchor to Disabling this checkDisabling this check
Disabling this check isn't recommended.
Was this page helpful?