Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TranslationKeyExists issue with section scoped locales #736

Open
aurelienbobenrieth opened this issue Jun 12, 2023 · 0 comments
Open

TranslationKeyExists issue with section scoped locales #736

aurelienbobenrieth opened this issue Jun 12, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@aurelienbobenrieth
Copy link

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 aurelienbobenrieth added the bug Something isn't working label Jun 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant