File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -264,14 +264,14 @@ export class CodeIndexManager {
264264 if ( ! validationResult . valid ) {
265265 const errorMessage = validationResult . error || "Embedder configuration validation failed"
266266 // Always attempt translation, use original as fallback
267- let translatedMessage = t ( errorMessage )
268- // If translation returns a different value (stripped namespace), use original
269- if ( translatedMessage !== errorMessage && ! translatedMessage . includes ( ":" ) ) {
270- translatedMessage = errorMessage
271- }
267+ const translatedMessage = t ( errorMessage )
268+
269+ // If i18next returns the key, it means no translation was found.
270+ // In that case, we should use the original, untranslated error message.
271+ const finalMessage = translatedMessage === errorMessage ? errorMessage : translatedMessage
272272
273- this . _stateManager . setSystemState ( "Error" , translatedMessage )
274- throw new Error ( translatedMessage )
273+ this . _stateManager . setSystemState ( "Error" , finalMessage )
274+ throw new Error ( finalMessage )
275275 }
276276
277277 // (Re)Initialize orchestrator
You can’t perform that action at this time.
0 commit comments