Skip to main content

TranslationKeyExists

Identifies references to translations that don't exist.


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

locales/en.default.json

{
"greetings": "Hello, world!",
"general": {
"close": "Close"
}
}

templates/index.liquid

{{ 'notfound' | t }}

locales/en.default.json

{
"greetings": "Hello, world!",
"general": {
"close": "Close"
}
}

templates/index.liquid

{{ 'greetings' | t }}
{{ 'general.close' | t }}

The following example contains the default configuration for this check:

TranslationKeyExists:
enabled: true
severity: error
ParameterDescription
enabledWhether this check is enabled.
severityThe severity of the check.

Anchor to Disabling this checkDisabling this check

Disabling this check isn't recommended.


Was this page helpful?