Skip to content

Recognize section-scoped translation keys in TranslationKeyExists - #1326

Open
VincentBorgers wants to merge 1 commit into
Shopify:mainfrom
VincentBorgers:fix/translation-key-exists-section-locales
Open

VincentBorgers wants to merge 1 commit into
Shopify:mainfrom
VincentBorgers:fix/translation-key-exists-section-locales

Conversation

@VincentBorgers

Copy link
Copy Markdown

What are you adding in this PR?

Fixes #721

TranslationKeyExists reported translations from a section's schema locales as missing when they were referenced the way the docs describe, {{ 'sections.<section-name>.<key>' | t }}. Only the bare key was looked up in the schema.

In section files the check now also strips the sections.<section-name>. prefix and looks the rest up in the schema locales. Bare keys work as before.

What's next? Any followup issues?

#720: completions don't suggest these keys yet.

Tophatting

Ran the section from #721 through check(): 3 offenses on 3.30.1, 0 with this change. Dawn reports the same offenses before and after.

  • I added screenshots of the changes (before and after the changes if applicable)

Before you deploy

  • I included a patch bump changeset

@VincentBorgers
VincentBorgers requested a review from a team as a code owner October 4, 2026 15:11

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TranslationKeyExists check not detecting translations in section schema

1 participant