@lokalise/polyglot-sdk 10.1.0 → 10.2.0
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/sdk/schemas/common/translationContextSchemas.d.ts +3 -0
- package/dist/sdk/schemas/common/translationContextSchemas.js +8 -1
- package/dist/sdk/schemas/common/translationContextSchemas.js.map +1 -1
- package/dist/sdk/schemas/lqa/lqaAsyncV1Schemas.d.ts +5 -0
- package/dist/sdk/schemas/lqa/lqaSyncV2Schemas.d.ts +5 -0
- package/dist/sdk/schemas/translation/generateVariantsV1.d.ts +7 -0
- package/dist/sdk/schemas/translation/translateAsyncV2Schemas.d.ts +9 -0
- package/dist/sdk/schemas/translation/translateSyncV2Schemas.d.ts +7 -0
- package/package.json +7 -7
|
@@ -230,6 +230,7 @@ export declare const TRANSLATION_CONTEXT_SCHEMA: z.ZodObject<{
|
|
|
230
230
|
description?: string | undefined;
|
|
231
231
|
}[] | undefined;
|
|
232
232
|
}>, "many">>;
|
|
233
|
+
targetPluralForms: z.ZodEffects<z.ZodEffects<z.ZodOptional<z.ZodArray<z.ZodEnum<["zero", "one", "two", "few", "many", "other"]>, "atleastone">>, ["many" | "zero" | "one" | "two" | "few" | "other", ...("many" | "zero" | "one" | "two" | "few" | "other")[]] | undefined, ["many" | "zero" | "one" | "two" | "few" | "other", ...("many" | "zero" | "one" | "two" | "few" | "other")[]] | undefined>, ["many" | "zero" | "one" | "two" | "few" | "other", ...("many" | "zero" | "one" | "two" | "few" | "other")[]] | undefined, ["many" | "zero" | "one" | "two" | "few" | "other", ...("many" | "zero" | "one" | "two" | "few" | "other")[]] | undefined>;
|
|
233
234
|
}, "strip", z.ZodTypeAny, {
|
|
234
235
|
description?: string | undefined;
|
|
235
236
|
styleGuide?: {
|
|
@@ -252,6 +253,7 @@ export declare const TRANSLATION_CONTEXT_SCHEMA: z.ZodObject<{
|
|
|
252
253
|
description?: string | undefined;
|
|
253
254
|
}[] | undefined;
|
|
254
255
|
}[] | undefined;
|
|
256
|
+
targetPluralForms?: ["many" | "zero" | "one" | "two" | "few" | "other", ...("many" | "zero" | "one" | "two" | "few" | "other")[]] | undefined;
|
|
255
257
|
}, {
|
|
256
258
|
description?: string | undefined;
|
|
257
259
|
styleGuide?: {
|
|
@@ -274,6 +276,7 @@ export declare const TRANSLATION_CONTEXT_SCHEMA: z.ZodObject<{
|
|
|
274
276
|
description?: string | undefined;
|
|
275
277
|
}[] | undefined;
|
|
276
278
|
}[] | undefined;
|
|
279
|
+
targetPluralForms?: ["many" | "zero" | "one" | "two" | "few" | "other", ...("many" | "zero" | "one" | "two" | "few" | "other")[]] | undefined;
|
|
277
280
|
}>;
|
|
278
281
|
export type TranslationContext = z.infer<typeof TRANSLATION_CONTEXT_SCHEMA>;
|
|
279
282
|
export {};
|
|
@@ -76,10 +76,17 @@ exports.TRANSLATION_CONTEXT_SCHEMA = zod_1.default
|
|
|
76
76
|
description: zod_1.default
|
|
77
77
|
.string()
|
|
78
78
|
.min(1)
|
|
79
|
-
.describe('
|
|
79
|
+
.describe('Any helpful description that applies to the whole request. E.g. project description')
|
|
80
80
|
.optional(),
|
|
81
81
|
styleGuide: STYLE_GUIDE_SCHEMA.optional(),
|
|
82
82
|
glossary: zod_1.default.array(exports.GLOSSARY_TERM_SCHEMA).describe('List of glossary terms').optional(),
|
|
83
|
+
targetPluralForms: zod_1.default
|
|
84
|
+
.array(zod_1.default.enum(['zero', 'one', 'two', 'few', 'many', 'other']))
|
|
85
|
+
.nonempty()
|
|
86
|
+
.optional()
|
|
87
|
+
.refine((forms) => !forms || forms.length === new Set(forms).size, 'Plural forms must be unique')
|
|
88
|
+
.refine((forms) => !forms || forms.includes('other'), 'The `other` form must be included')
|
|
89
|
+
.describe('A set of plural forms to be used in the target language. Make sure to always include `other` form'),
|
|
83
90
|
})
|
|
84
91
|
.describe('Helpful translation context');
|
|
85
92
|
//# sourceMappingURL=translationContextSchemas.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"translationContextSchemas.js","sourceRoot":"","sources":["../../../../src/sdk/schemas/common/translationContextSchemas.ts"],"names":[],"mappings":";;;AAwCA,wDASC;;AAjDD,sDAAmB;AAEnB,mDAA+C;AAE/C,6CAA6C;AAC7C,cAAc;AACd,6CAA6C;AAE7C,MAAM,6BAA6B,GAAG,aAAC;KACpC,MAAM,CAAC;IACN,cAAc,EAAE,aAAC,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,WAAW,EAAE,eAAe,CAAC,CAAC,CAAC,QAAQ,EAAE;IAC5E,WAAW,EAAE,aAAC;SACX,IAAI,CAAC,CAAC,UAAU,EAAE,YAAY,EAAE,aAAa,EAAE,YAAY,EAAE,SAAS,CAAC,CAAC;SACxE,QAAQ,EAAE;IACb,gBAAgB,EAAE,aAAC,CAAC,IAAI,CAAC,CAAC,UAAU,EAAE,QAAQ,EAAE,SAAS,CAAC,CAAC,CAAC,QAAQ,EAAE;IACtE,WAAW,EAAE,aAAC,CAAC,IAAI,CAAC,CAAC,cAAc,EAAE,eAAe,CAAC,CAAC,CAAC,QAAQ,EAAE;CAClE,CAAC;KACD,QAAQ,CAAC,gDAAgD,CAAC;KAC1D,MAAM,CAAC,CAAC,UAAU,EAAE,EAAE,CAAC,sBAAsB,CAAC,UAAU,CAAC,EAAE;IAC1D,OAAO,EAAE,4CAA4C;CACtD,CAAC,CAAA;AAIJ,MAAM,2BAA2B,GAAG,aAAC;KAClC,MAAM,CAAC;IACN,IAAI,EAAE,aAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,iEAAiE,CAAC;CAC7F,CAAC;KACD,QAAQ,CAAC,2BAA2B,CAAC,CAAA;AAIxC,MAAM,kBAAkB,GAAG,aAAC;KACzB,KAAK,CAAC,CAAC,2BAA2B,EAAE,6BAA6B,CAAC,CAAC;KACnE,QAAQ,CACP,4GAA4G,CAC7G,CAAA;AAIH,SAAgB,sBAAsB,CACpC,KAA8B;IAE9B,OAAO,CACL,KAAK,CA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EAAE,SAAS,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC,YAAY,IAAI,CAAC,YAAY,IAAI,SAAS,EAC3F;IACE,OAAO,EACL,kHAAkH;CACrH,CACF,CAAA;AAEU,QAAA,0BAA0B,GAAG,aAAC;KACxC,MAAM,CAAC;IACN,WAAW,EAAE,aAAC;SACX,MAAM,EAAE;SACR,GAAG,CAAC,CAAC,CAAC;SACN,QAAQ,CACP,qFAAqF,CACtF;SACA,QAAQ,EAAE;IACb,UAAU,EAAE,kBAAkB,CAAC,QAAQ,EAAE;IACzC,QAAQ,EAAE,aAAC,CAAC,KAAK,CAAC,4BAAoB,CAAC,CAAC,QAAQ,CAAC,wBAAwB,CAAC,CAAC,QAAQ,EAAE;
|
|
1
|
+
{"version":3,"file":"translationContextSchemas.js","sourceRoot":"","sources":["../../../../src/sdk/schemas/common/translationContextSchemas.ts"],"names":[],"mappings":";;;AAwCA,wDASC;;AAjDD,sDAAmB;AAEnB,mDAA+C;AAE/C,6CAA6C;AAC7C,cAAc;AACd,6CAA6C;AAE7C,MAAM,6BAA6B,GAAG,aAAC;KACpC,MAAM,CAAC;IACN,cAAc,EAAE,aAAC,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,WAAW,EAAE,eAAe,CAAC,CAAC,CAAC,QAAQ,EAAE;IAC5E,WAAW,EAAE,aAAC;SACX,IAAI,CAAC,CAAC,UAAU,EAAE,YAAY,EAAE,aAAa,EAAE,YAAY,EAAE,SAAS,CAAC,CAAC;SACxE,QAAQ,EAAE;IACb,gBAAgB,EAAE,aAAC,CAAC,IAAI,CAAC,CAAC,UAAU,EAAE,QAAQ,EAAE,SAAS,CAAC,CAAC,CAAC,QAAQ,EAAE;IACtE,WAAW,EAAE,aAAC,CAAC,IAAI,CAAC,CAAC,cAAc,EAAE,eAAe,CAAC,CAAC,CAAC,QAAQ,EAAE;CAClE,CAAC;KACD,QAAQ,CAAC,gDAAgD,CAAC;KAC1D,MAAM,CAAC,CAAC,UAAU,EAAE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C,CAAC,IAAI,EACzD,6BAA6B,CAC9B;SACA,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,KAAK,IAAI,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,mCAAmC,CAAC;SACzF,QAAQ,CACP,mGAAmG,CACpG;CACJ,CAAC;KACD,QAAQ,CAAC,6BAA6B,CAAC,CAAA"}
|
|
@@ -307,6 +307,7 @@ export declare const LQA_ASYNC_V1_BODY_SCHEMA: z.ZodObject<z.objectUtil.extendSh
|
|
|
307
307
|
description?: string | undefined;
|
|
308
308
|
}[] | undefined;
|
|
309
309
|
}>, "many">>;
|
|
310
|
+
targetPluralForms: z.ZodEffects<z.ZodEffects<z.ZodOptional<z.ZodArray<z.ZodEnum<["zero", "one", "two", "few", "many", "other"]>, "atleastone">>, ["many" | "zero" | "one" | "two" | "few" | "other", ...("many" | "zero" | "one" | "two" | "few" | "other")[]] | undefined, ["many" | "zero" | "one" | "two" | "few" | "other", ...("many" | "zero" | "one" | "two" | "few" | "other")[]] | undefined>, ["many" | "zero" | "one" | "two" | "few" | "other", ...("many" | "zero" | "one" | "two" | "few" | "other")[]] | undefined, ["many" | "zero" | "one" | "two" | "few" | "other", ...("many" | "zero" | "one" | "two" | "few" | "other")[]] | undefined>;
|
|
310
311
|
}, "strip", z.ZodTypeAny, {
|
|
311
312
|
description?: string | undefined;
|
|
312
313
|
styleGuide?: {
|
|
@@ -329,6 +330,7 @@ export declare const LQA_ASYNC_V1_BODY_SCHEMA: z.ZodObject<z.objectUtil.extendSh
|
|
|
329
330
|
description?: string | undefined;
|
|
330
331
|
}[] | undefined;
|
|
331
332
|
}[] | undefined;
|
|
333
|
+
targetPluralForms?: ["many" | "zero" | "one" | "two" | "few" | "other", ...("many" | "zero" | "one" | "two" | "few" | "other")[]] | undefined;
|
|
332
334
|
}, {
|
|
333
335
|
description?: string | undefined;
|
|
334
336
|
styleGuide?: {
|
|
@@ -351,6 +353,7 @@ export declare const LQA_ASYNC_V1_BODY_SCHEMA: z.ZodObject<z.objectUtil.extendSh
|
|
|
351
353
|
description?: string | undefined;
|
|
352
354
|
}[] | undefined;
|
|
353
355
|
}[] | undefined;
|
|
356
|
+
targetPluralForms?: ["many" | "zero" | "one" | "two" | "few" | "other", ...("many" | "zero" | "one" | "two" | "few" | "other")[]] | undefined;
|
|
354
357
|
}>>;
|
|
355
358
|
contentUnits: z.ZodArray<z.ZodObject<{
|
|
356
359
|
id: z.ZodString;
|
|
@@ -597,6 +600,7 @@ export declare const LQA_ASYNC_V1_BODY_SCHEMA: z.ZodObject<z.objectUtil.extendSh
|
|
|
597
600
|
description?: string | undefined;
|
|
598
601
|
}[] | undefined;
|
|
599
602
|
}[] | undefined;
|
|
603
|
+
targetPluralForms?: ["many" | "zero" | "one" | "two" | "few" | "other", ...("many" | "zero" | "one" | "two" | "few" | "other")[]] | undefined;
|
|
600
604
|
} | undefined;
|
|
601
605
|
integration?: "Claude" | "ChatGPT-4" | "Gemini" | undefined;
|
|
602
606
|
}, {
|
|
@@ -703,6 +707,7 @@ export declare const LQA_ASYNC_V1_BODY_SCHEMA: z.ZodObject<z.objectUtil.extendSh
|
|
|
703
707
|
description?: string | undefined;
|
|
704
708
|
}[] | undefined;
|
|
705
709
|
}[] | undefined;
|
|
710
|
+
targetPluralForms?: ["many" | "zero" | "one" | "two" | "few" | "other", ...("many" | "zero" | "one" | "two" | "few" | "other")[]] | undefined;
|
|
706
711
|
} | undefined;
|
|
707
712
|
integration?: "Claude" | "ChatGPT-4" | "Gemini" | undefined;
|
|
708
713
|
}>;
|
|
@@ -296,6 +296,7 @@ export declare const LQA_SYNC_V2_BODY_SCHEMA: z.ZodObject<{
|
|
|
296
296
|
description?: string | undefined;
|
|
297
297
|
}[] | undefined;
|
|
298
298
|
}>, "many">>;
|
|
299
|
+
targetPluralForms: z.ZodEffects<z.ZodEffects<z.ZodOptional<z.ZodArray<z.ZodEnum<["zero", "one", "two", "few", "many", "other"]>, "atleastone">>, ["many" | "zero" | "one" | "two" | "few" | "other", ...("many" | "zero" | "one" | "two" | "few" | "other")[]] | undefined, ["many" | "zero" | "one" | "two" | "few" | "other", ...("many" | "zero" | "one" | "two" | "few" | "other")[]] | undefined>, ["many" | "zero" | "one" | "two" | "few" | "other", ...("many" | "zero" | "one" | "two" | "few" | "other")[]] | undefined, ["many" | "zero" | "one" | "two" | "few" | "other", ...("many" | "zero" | "one" | "two" | "few" | "other")[]] | undefined>;
|
|
299
300
|
}, "strip", z.ZodTypeAny, {
|
|
300
301
|
description?: string | undefined;
|
|
301
302
|
styleGuide?: {
|
|
@@ -318,6 +319,7 @@ export declare const LQA_SYNC_V2_BODY_SCHEMA: z.ZodObject<{
|
|
|
318
319
|
description?: string | undefined;
|
|
319
320
|
}[] | undefined;
|
|
320
321
|
}[] | undefined;
|
|
322
|
+
targetPluralForms?: ["many" | "zero" | "one" | "two" | "few" | "other", ...("many" | "zero" | "one" | "two" | "few" | "other")[]] | undefined;
|
|
321
323
|
}, {
|
|
322
324
|
description?: string | undefined;
|
|
323
325
|
styleGuide?: {
|
|
@@ -340,6 +342,7 @@ export declare const LQA_SYNC_V2_BODY_SCHEMA: z.ZodObject<{
|
|
|
340
342
|
description?: string | undefined;
|
|
341
343
|
}[] | undefined;
|
|
342
344
|
}[] | undefined;
|
|
345
|
+
targetPluralForms?: ["many" | "zero" | "one" | "two" | "few" | "other", ...("many" | "zero" | "one" | "two" | "few" | "other")[]] | undefined;
|
|
343
346
|
}>>;
|
|
344
347
|
integration: z.ZodOptional<z.ZodNativeEnum<{
|
|
345
348
|
readonly CLAUDE: "Claude";
|
|
@@ -586,6 +589,7 @@ export declare const LQA_SYNC_V2_BODY_SCHEMA: z.ZodObject<{
|
|
|
586
589
|
description?: string | undefined;
|
|
587
590
|
}[] | undefined;
|
|
588
591
|
}[] | undefined;
|
|
592
|
+
targetPluralForms?: ["many" | "zero" | "one" | "two" | "few" | "other", ...("many" | "zero" | "one" | "two" | "few" | "other")[]] | undefined;
|
|
589
593
|
} | undefined;
|
|
590
594
|
integration?: "Claude" | "ChatGPT-4" | "Gemini" | undefined;
|
|
591
595
|
}, {
|
|
@@ -687,6 +691,7 @@ export declare const LQA_SYNC_V2_BODY_SCHEMA: z.ZodObject<{
|
|
|
687
691
|
description?: string | undefined;
|
|
688
692
|
}[] | undefined;
|
|
689
693
|
}[] | undefined;
|
|
694
|
+
targetPluralForms?: ["many" | "zero" | "one" | "two" | "few" | "other", ...("many" | "zero" | "one" | "two" | "few" | "other")[]] | undefined;
|
|
690
695
|
} | undefined;
|
|
691
696
|
integration?: "Claude" | "ChatGPT-4" | "Gemini" | undefined;
|
|
692
697
|
}>;
|
|
@@ -118,6 +118,7 @@ export declare const GENERATE_VARIANTS_V1_BODY_SCHEMA: z.ZodEffects<z.ZodObject<
|
|
|
118
118
|
description?: string | undefined;
|
|
119
119
|
}[] | undefined;
|
|
120
120
|
}>, "many">>;
|
|
121
|
+
targetPluralForms: z.ZodEffects<z.ZodEffects<z.ZodOptional<z.ZodArray<z.ZodEnum<["zero", "one", "two", "few", "many", "other"]>, "atleastone">>, ["many" | "zero" | "one" | "two" | "few" | "other", ...("many" | "zero" | "one" | "two" | "few" | "other")[]] | undefined, ["many" | "zero" | "one" | "two" | "few" | "other", ...("many" | "zero" | "one" | "two" | "few" | "other")[]] | undefined>, ["many" | "zero" | "one" | "two" | "few" | "other", ...("many" | "zero" | "one" | "two" | "few" | "other")[]] | undefined, ["many" | "zero" | "one" | "two" | "few" | "other", ...("many" | "zero" | "one" | "two" | "few" | "other")[]] | undefined>;
|
|
121
122
|
}, "strip", z.ZodTypeAny, {
|
|
122
123
|
description?: string | undefined;
|
|
123
124
|
styleGuide?: {
|
|
@@ -140,6 +141,7 @@ export declare const GENERATE_VARIANTS_V1_BODY_SCHEMA: z.ZodEffects<z.ZodObject<
|
|
|
140
141
|
description?: string | undefined;
|
|
141
142
|
}[] | undefined;
|
|
142
143
|
}[] | undefined;
|
|
144
|
+
targetPluralForms?: ["many" | "zero" | "one" | "two" | "few" | "other", ...("many" | "zero" | "one" | "two" | "few" | "other")[]] | undefined;
|
|
143
145
|
}, {
|
|
144
146
|
description?: string | undefined;
|
|
145
147
|
styleGuide?: {
|
|
@@ -162,6 +164,7 @@ export declare const GENERATE_VARIANTS_V1_BODY_SCHEMA: z.ZodEffects<z.ZodObject<
|
|
|
162
164
|
description?: string | undefined;
|
|
163
165
|
}[] | undefined;
|
|
164
166
|
}[] | undefined;
|
|
167
|
+
targetPluralForms?: ["many" | "zero" | "one" | "two" | "few" | "other", ...("many" | "zero" | "one" | "two" | "few" | "other")[]] | undefined;
|
|
165
168
|
}>>;
|
|
166
169
|
sourceLocale: z.ZodEffects<z.ZodString, string, string>;
|
|
167
170
|
sourceValue: z.ZodString;
|
|
@@ -218,6 +221,7 @@ export declare const GENERATE_VARIANTS_V1_BODY_SCHEMA: z.ZodEffects<z.ZodObject<
|
|
|
218
221
|
description?: string | undefined;
|
|
219
222
|
}[] | undefined;
|
|
220
223
|
}[] | undefined;
|
|
224
|
+
targetPluralForms?: ["many" | "zero" | "one" | "two" | "few" | "other", ...("many" | "zero" | "one" | "two" | "few" | "other")[]] | undefined;
|
|
221
225
|
} | undefined;
|
|
222
226
|
history?: {
|
|
223
227
|
values: [string, ...string[]];
|
|
@@ -252,6 +256,7 @@ export declare const GENERATE_VARIANTS_V1_BODY_SCHEMA: z.ZodEffects<z.ZodObject<
|
|
|
252
256
|
description?: string | undefined;
|
|
253
257
|
}[] | undefined;
|
|
254
258
|
}[] | undefined;
|
|
259
|
+
targetPluralForms?: ["many" | "zero" | "one" | "two" | "few" | "other", ...("many" | "zero" | "one" | "two" | "few" | "other")[]] | undefined;
|
|
255
260
|
} | undefined;
|
|
256
261
|
history?: {
|
|
257
262
|
values: [string, ...string[]];
|
|
@@ -286,6 +291,7 @@ export declare const GENERATE_VARIANTS_V1_BODY_SCHEMA: z.ZodEffects<z.ZodObject<
|
|
|
286
291
|
description?: string | undefined;
|
|
287
292
|
}[] | undefined;
|
|
288
293
|
}[] | undefined;
|
|
294
|
+
targetPluralForms?: ["many" | "zero" | "one" | "two" | "few" | "other", ...("many" | "zero" | "one" | "two" | "few" | "other")[]] | undefined;
|
|
289
295
|
} | undefined;
|
|
290
296
|
history?: {
|
|
291
297
|
values: [string, ...string[]];
|
|
@@ -320,6 +326,7 @@ export declare const GENERATE_VARIANTS_V1_BODY_SCHEMA: z.ZodEffects<z.ZodObject<
|
|
|
320
326
|
description?: string | undefined;
|
|
321
327
|
}[] | undefined;
|
|
322
328
|
}[] | undefined;
|
|
329
|
+
targetPluralForms?: ["many" | "zero" | "one" | "two" | "few" | "other", ...("many" | "zero" | "one" | "two" | "few" | "other")[]] | undefined;
|
|
323
330
|
} | undefined;
|
|
324
331
|
history?: {
|
|
325
332
|
values: [string, ...string[]];
|
|
@@ -252,6 +252,7 @@ export declare const TRANSLATE_ASYNC_V2_BODY_SCHEMA: z.ZodEffects<z.ZodEffects<z
|
|
|
252
252
|
description?: string | undefined;
|
|
253
253
|
}[] | undefined;
|
|
254
254
|
}>, "many">>;
|
|
255
|
+
targetPluralForms: z.ZodEffects<z.ZodEffects<z.ZodOptional<z.ZodArray<z.ZodEnum<["zero", "one", "two", "few", "many", "other"]>, "atleastone">>, ["many" | "zero" | "one" | "two" | "few" | "other", ...("many" | "zero" | "one" | "two" | "few" | "other")[]] | undefined, ["many" | "zero" | "one" | "two" | "few" | "other", ...("many" | "zero" | "one" | "two" | "few" | "other")[]] | undefined>, ["many" | "zero" | "one" | "two" | "few" | "other", ...("many" | "zero" | "one" | "two" | "few" | "other")[]] | undefined, ["many" | "zero" | "one" | "two" | "few" | "other", ...("many" | "zero" | "one" | "two" | "few" | "other")[]] | undefined>;
|
|
255
256
|
}, "strip", z.ZodTypeAny, {
|
|
256
257
|
description?: string | undefined;
|
|
257
258
|
styleGuide?: {
|
|
@@ -274,6 +275,7 @@ export declare const TRANSLATE_ASYNC_V2_BODY_SCHEMA: z.ZodEffects<z.ZodEffects<z
|
|
|
274
275
|
description?: string | undefined;
|
|
275
276
|
}[] | undefined;
|
|
276
277
|
}[] | undefined;
|
|
278
|
+
targetPluralForms?: ["many" | "zero" | "one" | "two" | "few" | "other", ...("many" | "zero" | "one" | "two" | "few" | "other")[]] | undefined;
|
|
277
279
|
}, {
|
|
278
280
|
description?: string | undefined;
|
|
279
281
|
styleGuide?: {
|
|
@@ -296,6 +298,7 @@ export declare const TRANSLATE_ASYNC_V2_BODY_SCHEMA: z.ZodEffects<z.ZodEffects<z
|
|
|
296
298
|
description?: string | undefined;
|
|
297
299
|
}[] | undefined;
|
|
298
300
|
}[] | undefined;
|
|
301
|
+
targetPluralForms?: ["many" | "zero" | "one" | "two" | "few" | "other", ...("many" | "zero" | "one" | "two" | "few" | "other")[]] | undefined;
|
|
299
302
|
}>>;
|
|
300
303
|
contentUnits: z.ZodEffects<z.ZodArray<z.ZodObject<{
|
|
301
304
|
id: z.ZodString;
|
|
@@ -564,6 +567,7 @@ export declare const TRANSLATE_ASYNC_V2_BODY_SCHEMA: z.ZodEffects<z.ZodEffects<z
|
|
|
564
567
|
description?: string | undefined;
|
|
565
568
|
}[] | undefined;
|
|
566
569
|
}[] | undefined;
|
|
570
|
+
targetPluralForms?: ["many" | "zero" | "one" | "two" | "few" | "other", ...("many" | "zero" | "one" | "two" | "few" | "other")[]] | undefined;
|
|
567
571
|
} | undefined;
|
|
568
572
|
integration?: "Claude" | "ChatGPT-4" | "Gemini" | "DeepL" | "GoogleTranslate" | "MicrosoftTranslator" | undefined;
|
|
569
573
|
}, {
|
|
@@ -639,6 +643,7 @@ export declare const TRANSLATE_ASYNC_V2_BODY_SCHEMA: z.ZodEffects<z.ZodEffects<z
|
|
|
639
643
|
description?: string | undefined;
|
|
640
644
|
}[] | undefined;
|
|
641
645
|
}[] | undefined;
|
|
646
|
+
targetPluralForms?: ["many" | "zero" | "one" | "two" | "few" | "other", ...("many" | "zero" | "one" | "two" | "few" | "other")[]] | undefined;
|
|
642
647
|
} | undefined;
|
|
643
648
|
integration?: "Claude" | "ChatGPT-4" | "Gemini" | "DeepL" | "GoogleTranslate" | "MicrosoftTranslator" | undefined;
|
|
644
649
|
pickIntegrationByScore?: boolean | undefined;
|
|
@@ -716,6 +721,7 @@ export declare const TRANSLATE_ASYNC_V2_BODY_SCHEMA: z.ZodEffects<z.ZodEffects<z
|
|
|
716
721
|
description?: string | undefined;
|
|
717
722
|
}[] | undefined;
|
|
718
723
|
}[] | undefined;
|
|
724
|
+
targetPluralForms?: ["many" | "zero" | "one" | "two" | "few" | "other", ...("many" | "zero" | "one" | "two" | "few" | "other")[]] | undefined;
|
|
719
725
|
} | undefined;
|
|
720
726
|
integration?: "Claude" | "ChatGPT-4" | "Gemini" | "DeepL" | "GoogleTranslate" | "MicrosoftTranslator" | undefined;
|
|
721
727
|
}, {
|
|
@@ -791,6 +797,7 @@ export declare const TRANSLATE_ASYNC_V2_BODY_SCHEMA: z.ZodEffects<z.ZodEffects<z
|
|
|
791
797
|
description?: string | undefined;
|
|
792
798
|
}[] | undefined;
|
|
793
799
|
}[] | undefined;
|
|
800
|
+
targetPluralForms?: ["many" | "zero" | "one" | "two" | "few" | "other", ...("many" | "zero" | "one" | "two" | "few" | "other")[]] | undefined;
|
|
794
801
|
} | undefined;
|
|
795
802
|
integration?: "Claude" | "ChatGPT-4" | "Gemini" | "DeepL" | "GoogleTranslate" | "MicrosoftTranslator" | undefined;
|
|
796
803
|
pickIntegrationByScore?: boolean | undefined;
|
|
@@ -868,6 +875,7 @@ export declare const TRANSLATE_ASYNC_V2_BODY_SCHEMA: z.ZodEffects<z.ZodEffects<z
|
|
|
868
875
|
description?: string | undefined;
|
|
869
876
|
}[] | undefined;
|
|
870
877
|
}[] | undefined;
|
|
878
|
+
targetPluralForms?: ["many" | "zero" | "one" | "two" | "few" | "other", ...("many" | "zero" | "one" | "two" | "few" | "other")[]] | undefined;
|
|
871
879
|
} | undefined;
|
|
872
880
|
integration?: "Claude" | "ChatGPT-4" | "Gemini" | "DeepL" | "GoogleTranslate" | "MicrosoftTranslator" | undefined;
|
|
873
881
|
}, {
|
|
@@ -943,6 +951,7 @@ export declare const TRANSLATE_ASYNC_V2_BODY_SCHEMA: z.ZodEffects<z.ZodEffects<z
|
|
|
943
951
|
description?: string | undefined;
|
|
944
952
|
}[] | undefined;
|
|
945
953
|
}[] | undefined;
|
|
954
|
+
targetPluralForms?: ["many" | "zero" | "one" | "two" | "few" | "other", ...("many" | "zero" | "one" | "two" | "few" | "other")[]] | undefined;
|
|
946
955
|
} | undefined;
|
|
947
956
|
integration?: "Claude" | "ChatGPT-4" | "Gemini" | "DeepL" | "GoogleTranslate" | "MicrosoftTranslator" | undefined;
|
|
948
957
|
pickIntegrationByScore?: boolean | undefined;
|
|
@@ -217,6 +217,7 @@ export declare const TRANSLATE_SYNC_V2_BODY_SCHEMA: z.ZodEffects<z.ZodObject<{
|
|
|
217
217
|
description?: string | undefined;
|
|
218
218
|
}[] | undefined;
|
|
219
219
|
}>, "many">>;
|
|
220
|
+
targetPluralForms: z.ZodEffects<z.ZodEffects<z.ZodOptional<z.ZodArray<z.ZodEnum<["zero", "one", "two", "few", "many", "other"]>, "atleastone">>, ["many" | "zero" | "one" | "two" | "few" | "other", ...("many" | "zero" | "one" | "two" | "few" | "other")[]] | undefined, ["many" | "zero" | "one" | "two" | "few" | "other", ...("many" | "zero" | "one" | "two" | "few" | "other")[]] | undefined>, ["many" | "zero" | "one" | "two" | "few" | "other", ...("many" | "zero" | "one" | "two" | "few" | "other")[]] | undefined, ["many" | "zero" | "one" | "two" | "few" | "other", ...("many" | "zero" | "one" | "two" | "few" | "other")[]] | undefined>;
|
|
220
221
|
}, "strip", z.ZodTypeAny, {
|
|
221
222
|
description?: string | undefined;
|
|
222
223
|
styleGuide?: {
|
|
@@ -239,6 +240,7 @@ export declare const TRANSLATE_SYNC_V2_BODY_SCHEMA: z.ZodEffects<z.ZodObject<{
|
|
|
239
240
|
description?: string | undefined;
|
|
240
241
|
}[] | undefined;
|
|
241
242
|
}[] | undefined;
|
|
243
|
+
targetPluralForms?: ["many" | "zero" | "one" | "two" | "few" | "other", ...("many" | "zero" | "one" | "two" | "few" | "other")[]] | undefined;
|
|
242
244
|
}, {
|
|
243
245
|
description?: string | undefined;
|
|
244
246
|
styleGuide?: {
|
|
@@ -261,6 +263,7 @@ export declare const TRANSLATE_SYNC_V2_BODY_SCHEMA: z.ZodEffects<z.ZodObject<{
|
|
|
261
263
|
description?: string | undefined;
|
|
262
264
|
}[] | undefined;
|
|
263
265
|
}[] | undefined;
|
|
266
|
+
targetPluralForms?: ["many" | "zero" | "one" | "two" | "few" | "other", ...("many" | "zero" | "one" | "two" | "few" | "other")[]] | undefined;
|
|
264
267
|
}>>;
|
|
265
268
|
contentUnits: z.ZodArray<z.ZodObject<{
|
|
266
269
|
id: z.ZodString;
|
|
@@ -411,6 +414,7 @@ export declare const TRANSLATE_SYNC_V2_BODY_SCHEMA: z.ZodEffects<z.ZodObject<{
|
|
|
411
414
|
description?: string | undefined;
|
|
412
415
|
}[] | undefined;
|
|
413
416
|
}[] | undefined;
|
|
417
|
+
targetPluralForms?: ["many" | "zero" | "one" | "two" | "few" | "other", ...("many" | "zero" | "one" | "two" | "few" | "other")[]] | undefined;
|
|
414
418
|
} | undefined;
|
|
415
419
|
integration?: "Claude" | "ChatGPT-4" | "Gemini" | "DeepL" | "GoogleTranslate" | "MicrosoftTranslator" | undefined;
|
|
416
420
|
}, {
|
|
@@ -481,6 +485,7 @@ export declare const TRANSLATE_SYNC_V2_BODY_SCHEMA: z.ZodEffects<z.ZodObject<{
|
|
|
481
485
|
description?: string | undefined;
|
|
482
486
|
}[] | undefined;
|
|
483
487
|
}[] | undefined;
|
|
488
|
+
targetPluralForms?: ["many" | "zero" | "one" | "two" | "few" | "other", ...("many" | "zero" | "one" | "two" | "few" | "other")[]] | undefined;
|
|
484
489
|
} | undefined;
|
|
485
490
|
integration?: "Claude" | "ChatGPT-4" | "Gemini" | "DeepL" | "GoogleTranslate" | "MicrosoftTranslator" | undefined;
|
|
486
491
|
}>, {
|
|
@@ -551,6 +556,7 @@ export declare const TRANSLATE_SYNC_V2_BODY_SCHEMA: z.ZodEffects<z.ZodObject<{
|
|
|
551
556
|
description?: string | undefined;
|
|
552
557
|
}[] | undefined;
|
|
553
558
|
}[] | undefined;
|
|
559
|
+
targetPluralForms?: ["many" | "zero" | "one" | "two" | "few" | "other", ...("many" | "zero" | "one" | "two" | "few" | "other")[]] | undefined;
|
|
554
560
|
} | undefined;
|
|
555
561
|
integration?: "Claude" | "ChatGPT-4" | "Gemini" | "DeepL" | "GoogleTranslate" | "MicrosoftTranslator" | undefined;
|
|
556
562
|
}, {
|
|
@@ -621,6 +627,7 @@ export declare const TRANSLATE_SYNC_V2_BODY_SCHEMA: z.ZodEffects<z.ZodObject<{
|
|
|
621
627
|
description?: string | undefined;
|
|
622
628
|
}[] | undefined;
|
|
623
629
|
}[] | undefined;
|
|
630
|
+
targetPluralForms?: ["many" | "zero" | "one" | "two" | "few" | "other", ...("many" | "zero" | "one" | "two" | "few" | "other")[]] | undefined;
|
|
624
631
|
} | undefined;
|
|
625
632
|
integration?: "Claude" | "ChatGPT-4" | "Gemini" | "DeepL" | "GoogleTranslate" | "MicrosoftTranslator" | undefined;
|
|
626
633
|
}>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lokalise/polyglot-sdk",
|
|
3
|
-
"version": "10.
|
|
3
|
+
"version": "10.2.0",
|
|
4
4
|
"author": {
|
|
5
5
|
"name": "Lokalise",
|
|
6
6
|
"url": "https://lokalise.com/"
|
|
@@ -32,22 +32,22 @@
|
|
|
32
32
|
"prepublishOnly": "npm run build:publish"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@amplitude/analytics-types": "^2.
|
|
35
|
+
"@amplitude/analytics-types": "^2.7.0",
|
|
36
36
|
"@lokalise/backend-http-client": "^2.0.1",
|
|
37
37
|
"@lokalise/fastify-extras": "^21.4.1",
|
|
38
38
|
"@lokalise/id-utils": "^2.1.0",
|
|
39
39
|
"@lokalise/node-core": "^11.2.0",
|
|
40
40
|
"@lokalise/supported-languages": "^2.0.0",
|
|
41
41
|
"@lokalise/zod-extras": "^2.1.0",
|
|
42
|
-
"undici": "^6.19.
|
|
42
|
+
"undici": "^6.19.5",
|
|
43
43
|
"undici-retry": "^5.0.3",
|
|
44
44
|
"zod": "^3.23.8"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
|
-
"@types/node": "^
|
|
47
|
+
"@types/node": "^22.1.0",
|
|
48
48
|
"@typescript-eslint/eslint-plugin": "^7.17.0",
|
|
49
49
|
"@typescript-eslint/parser": "^7.17.0",
|
|
50
|
-
"@vitest/coverage-v8": "^2.0.
|
|
50
|
+
"@vitest/coverage-v8": "^2.0.5",
|
|
51
51
|
"auto-changelog": "^2.4.0",
|
|
52
52
|
"eslint": "^8.57.0",
|
|
53
53
|
"eslint-plugin-import": "^2.29.1",
|
|
@@ -55,8 +55,8 @@
|
|
|
55
55
|
"mockttp": "^3.13.0",
|
|
56
56
|
"prettier": "^3.2.5",
|
|
57
57
|
"shx": "^0.3.4",
|
|
58
|
-
"ts-deepmerge": "^7.0.
|
|
59
|
-
"typescript": "5.5.
|
|
58
|
+
"ts-deepmerge": "^7.0.1",
|
|
59
|
+
"typescript": "5.5.4",
|
|
60
60
|
"vitest": "^2.0.4"
|
|
61
61
|
}
|
|
62
62
|
}
|