theme-check icon indicating copy to clipboard operation
theme-check copied to clipboard

TranslationKeyExists issue with section scoped locales

Open aurelienbobenrieth opened this issue 1 year ago • 0 comments

Describe the bug It seems there is an issue with ThemeCheck not looking into the section-scoped defined locales.

As official doc points out, it is possible to scope locales within the section schema see: https://shopify.dev/docs/themes/architecture/sections/section-schema#locales

Expected I expect the code below (which works just fine) not to generate a theme check error.

<span>{{ 'sections.example-section.back-to-top' | t }}</span>

// ...

{% schema %}
{
  "name": "Example section",
  // ...
  "locales": {
    "fr": {
      "back-to-top": "Retour en haut"
    },
    "en": {
      "back-to-top": "Back to top"
    }
  }
}
{% endschema %}

Actual

'sections.example-section.back-to-top' does not have a matching entry in 'locales/en.default.json'

Debugging information

  • OS: Windows 11
  • Version: 1.15.0

aurelienbobenrieth avatar Jun 12 '23 17:06 aurelienbobenrieth