diff --git a/src/utilities/locales.ts b/src/utilities/locales.ts index eabb1cf..b5f42bc 100644 --- a/src/utilities/locales.ts +++ b/src/utilities/locales.ts @@ -148,6 +148,13 @@ function extractStorefrontTranslationKeys(content: string): Set { } } + // Find all locale: parameters in any render call + const localePattern = /render\s+["'][^"']+["'][\S\s]*?locale:\s*["']([^"']+)["']/g + const localeMatches = [...content.matchAll(localePattern)] + for (const match of localeMatches) { + keys.add(match[1]) + } + // Combine with utility.translate translations return new Set([...keys, ...extractUtilityTranslateKeys(content)]) }