@@ -1126,22 +1126,20 @@ async function syncLocale(
11261126 fallbackKeys . push ( item . key ) ;
11271127 }
11281128
1129- if ( ! allowTranslate ) {
1130- fallbackKeys . length = 0 ;
1131- for ( const [ key , sourceText ] of sourceFlat . entries ( ) ) {
1132- if ( ( nextFlat . get ( key ) ?? sourceText ) === sourceText ) {
1133- fallbackKeys . push ( key ) ;
1134- }
1135- }
1136- }
1129+ // Do not infer fallback state from source-text equality alone.
1130+ // Product names, config keys, and other intentional carry-through strings may
1131+ // legitimately stay identical to English. Track fallback keys from actual
1132+ // fallback decisions and previous fallback metadata instead.
11371133
11381134 const nextMap : TranslationMap = { } ;
11391135 for ( const [ key , value ] of sourceFlat . entries ( ) ) {
11401136 setNestedValue ( nextMap , key , nextFlat . get ( key ) ?? value ) ;
11411137 }
11421138
1143- const nextProvider = allowTranslate ? resolveConfiguredProvider ( ) : "" ;
1144- const nextModel = allowTranslate ? resolveConfiguredModel ( ) : "" ;
1139+ const nextProvider = allowTranslate
1140+ ? resolveConfiguredProvider ( )
1141+ : ( previousMeta ?. provider ?? "" ) ;
1142+ const nextModel = allowTranslate ? resolveConfiguredModel ( ) : ( previousMeta ?. model ?? "" ) ;
11451143 const sortedFallbackKeys = [ ...new Set ( fallbackKeys ) ] . toSorted ( ( left , right ) =>
11461144 left . localeCompare ( right ) ,
11471145 ) ;
0 commit comments