@@ -148,17 +148,17 @@ function extractStorefrontTranslationKeys(content: string): Set<string> {
148148 }
149149 }
150150
151- // Combine with t_with_fallback translations
152- return new Set ( [ ...keys , ...extractTWithFallbackTranslationKeys ( content ) ] )
151+ // Combine with utility.translate translations
152+ return new Set ( [ ...keys , ...extractUtilityTranslateKeys ( content ) ] )
153153}
154154
155- function extractTWithFallbackTranslationKeys ( content : string ) : Set < string > {
155+ function extractUtilityTranslateKeys ( content : string ) : Set < string > {
156156 // Find translations assigned to variables first
157157 const assignedTranslations = findTranslationVariables ( content )
158158
159159 // Find both direct keys and variable-based keys
160- const directKeys = extractDirectTWithFallbackTranslationKeys ( content )
161- const variableKeys = extractVariableTWithFallbackTranslationKeys ( content , assignedTranslations )
160+ const directKeys = extractDirectUtilityTranslateKeys ( content )
161+ const variableKeys = extractVariableUtilityTranslateKeys ( content , assignedTranslations )
162162
163163 return new Set ( [ ...directKeys , ...variableKeys ] )
164164}
@@ -176,9 +176,9 @@ function findTranslationVariables(content: string): Map<string, string> {
176176 return assignments
177177}
178178
179- function extractDirectTWithFallbackTranslationKeys ( content : string ) : Set < string > {
179+ function extractDirectUtilityTranslateKeys ( content : string ) : Set < string > {
180180 const keys = new Set < string > ( )
181- const pattern = / r e n d e r \s + [ " ' ] t _ w i t h _ f a l l b a c k [ " ' ] [ ^ % ] * k e y : \s * [ " ' ] ( [ ^ " ' ] + ) [ " ' ] / g
181+ const pattern = / r e n d e r \s + [ " ' ] u t i l i t y . t r a n s l a t e [ " ' ] [ ^ % ] * k e y : \s * [ " ' ] ( [ ^ " ' ] + ) [ " ' ] / g
182182
183183 const matches = [ ...content . matchAll ( pattern ) ]
184184 for ( const match of matches ) {
@@ -188,9 +188,9 @@ function extractDirectTWithFallbackTranslationKeys(content: string): Set<string>
188188 return keys
189189}
190190
191- function extractVariableTWithFallbackTranslationKeys ( content : string , assignedTranslations : Map < string , string > ) : Set < string > {
191+ function extractVariableUtilityTranslateKeys ( content : string , assignedTranslations : Map < string , string > ) : Set < string > {
192192 const keys = new Set < string > ( )
193- const pattern = / r e n d e r \s + [ " ' ] t _ w i t h _ f a l l b a c k [ " ' ] [ ^ % ] * t : \s * ( [ ^ \s , } ] + ) / g
193+ const pattern = / r e n d e r \s + [ " ' ] u t i l i t y . t r a n s l a t e [ " ' ] [ ^ % ] * t : \s * ( [ ^ \s , } ] + ) / g
194194
195195 const matches = [ ...content . matchAll ( pattern ) ]
196196 for ( const match of matches ) {
0 commit comments