Validates translations in schema tags ({% schema %}
).
Add checks for eliminating translations mistakes in schema tags.
👎 Examples of incorrect code for this check:
{% comment %}
- fr.missing is missing
- fr.extra is not in the default locale
{% endcomment %}
{% schema %}
{
"locales": {
"en": {
"title": "Welcome",
"missing": "Product"
},
"fr": {
"title": "Bienvenue",
"extra": "Extra"
}
}
}
{% endschema %}
{% comment %}
- The French product label is missing.
{% endcomment %}
{% schema %}
{
"name": {
"en": "Hello",
"fr": "Bonjour"
},
"settings": [
{
"id": "product",
"label": {
"en": "Product"
}
}
]
}
{% endschema %}
👍 Examples of correct code for this check:
{% schema %}
{
"name": {
"en": "Hello",
"fr": "Bonjour"
},
"settings": [
{
"id": "product",
"label": {
"en": "Product",
"fr": "Produit"
}
}
]
}
{% endschema %}
The default configuration for this check is the following:
MatchingSchemaTranslations:
enabled: true
This check has been introduced in Theme Check 0.1.0.