You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It looks like you set${details.name} API key but it is not valid. Please check your API key and try again.
466
456
467
-
👉 You can set the API key in one of the following ways:
468
-
1. User-wide: Run npx lingo.dev@latest config set ${details.apiKeyConfigKey} <your-api-key>
469
-
2. Project-wide: Add ${details.apiKeyEnvVar}=<your-api-key> to .env file in every project that uses Lingo.dev Localization Compiler
470
-
3 Session-wide: Run export ${details.apiKeyEnvVar}=<your-api-key> in your terminal before running the compiler to set the API key for the current session
457
+
Error details from ${details.name} API: ${errorMessage}
471
458
472
-
⭐️ Also:
473
-
1. If you don't yet have a${details.name} API key, get one for free at ${details.getKeyLink}
474
-
2. If you want to use a different LLM, raise an issue in our open-source repo: https://lingo.dev/go/gh
475
-
3. If you have questions, feature requests, or would like to contribute, join our Discord: https://lingo.dev/go/discord
459
+
👉 You can set the API key in one of the following ways:
460
+
1. User-wide: Run npx lingo.dev@latest config set${details.apiKeyConfigKey} <your-api-key>
461
+
2. Project-wide: Add ${details.apiKeyEnvVar}=<your-api-key> to .env file in every project that uses Lingo.dev Localization Compiler
462
+
3 Session-wide: Run export ${details.apiKeyEnvVar}=<your-api-key> in your terminal before running the compiler to set the API key for the current session
476
463
477
-
✨
478
-
`);
464
+
⭐️ Also:
465
+
1. If you don't yet have a ${details.name} API key, get one for free at ${details.getKeyLink}
466
+
2. If you want to use a different LLM, raise an issue in our open-source repo: https://lingo.dev/go/gh
467
+
3. If you have questions, feature requests, or would like to contribute, join our Discord: https://lingo.dev/go/discord
468
+
`;
469
+
console.log(message);
470
+
thrownewError(`Invalid ${details.name} API key.`);
479
471
}else{
480
-
console.log(
481
-
dedent`
482
-
\n
472
+
constmessage=dedent`
483
473
⚠️ Lingo.dev Compiler tried to translate your application to "${targetLocale}" locale via ${
484
474
details.name
485
475
} but it failed.
@@ -502,11 +492,11 @@ export class LCPAPI {
502
492
}?
503
493
2. Did you reach any limits of your ${details.name} account?
504
494
3. If you have questions, feature requests, or would like to contribute, join our Discord: https://lingo.dev/go/discord
505
-
506
-
✨
507
-
`,
495
+
`;
496
+
console.log(message);
497
+
thrownewError(
498
+
`Translation failed for locale "${targetLocale}" using ${details.name}: ${errorMessage}`,
0 commit comments