Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/utilities/locales.ts
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,13 @@ function extractStorefrontTranslationKeys(content: string): Set<string> {
}
}

// 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)])
}
Expand Down