@adminforth/i18n 1.0.18-next.7 → 1.0.18-next.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +2 -2
- package/index.ts +2 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -375,8 +375,8 @@ ${JSON.stringify(strings.reduce((acc, s) => {
|
|
|
375
375
|
res = resp.content.split("```json")[1].split("```")[0];
|
|
376
376
|
}
|
|
377
377
|
catch (e) {
|
|
378
|
-
console.error(
|
|
379
|
-
|
|
378
|
+
console.error(`Error in parsing OpenAI: ${resp}\n Prompt was: ${prompt}\n Resp was: ${resp}`);
|
|
379
|
+
return [];
|
|
380
380
|
}
|
|
381
381
|
res = JSON.parse(res);
|
|
382
382
|
for (const [enStr, translatedStr] of Object.entries(res)) {
|
package/index.ts
CHANGED
|
@@ -437,8 +437,8 @@ JSON.stringify(strings.reduce((acc: object, s: { en_string: string }): object =>
|
|
|
437
437
|
try {
|
|
438
438
|
res = resp.content.split("```json")[1].split("```")[0];
|
|
439
439
|
} catch (e) {
|
|
440
|
-
console.error(
|
|
441
|
-
|
|
440
|
+
console.error(`Error in parsing OpenAI: ${resp}\n Prompt was: ${prompt}\n Resp was: ${resp}`, );
|
|
441
|
+
return [];
|
|
442
442
|
}
|
|
443
443
|
res = JSON.parse(res);
|
|
444
444
|
|