Skip to content

TranslationKeyExists check not detecting translations in section schema #721

Open
@david-w-shopify

Description

@david-w-shopify

Describe the bug
When using the locales object in a section schema, Theme Check incorrectly flags them as missing

Image

Source

// section/test-section.liquid

<p>{{ 'sections.test-section.title' | t }}</p>
<p>{{ 'sections.test-section.description.desktop' | t }}</p>
<p>{{ 'sections.test-section.description.mobile' | t }}</p>

{% schema %}
{
  "name": "Section",
  "locales": {
    "en": {
      "title": "Title",
      "description": {
        "desktop": "Lorem ipsum dolor sit amet consectetur, adipisicing elit.",
        "mobile": "Lorem ipsum dolor sit amet"
      }
    }
  }
}
{% endschema %}

Expected behaviour
No errors

Actual behaviour
The first three lines all have TranslationKeyExists errors

Debugging information

  • OS: Mac
  • OS Version: Sequoia 15.2
  • Theme Check Version: 3.73.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugSomething isn't workingSEV-3Normal Severity

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions