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

Closed
aurelienbobenrieth opened this issue Jun 12, 2023 · 1 comment
Closed

TranslationKeyExists issue with section scoped locales #736

aurelienbobenrieth opened this issue Jun 12, 2023 · 1 comment
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
@lukeh-shopify
Copy link

👋🏻 Hi @aurelienbobenrieth! Thanks for reporting this. Unfortunately the Ruby version of theme check has been deprecated for some time. Would you be able to confirm you are still having issues when using our maintained version of theme check? This is done using either the latest version of the Shopify CLI, or via the Shopify Liquid Visual Studio Code extension.

If you are still having issues, please raise an issue over in the CLI or theme tools repositories. Thanks!

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

2 participants