@lingo.dev/_spec 0.40.0 → 0.40.2
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/build/i18n.schema.json +40 -20
- package/build/index.cjs +62 -31
- package/build/index.d.cts +3 -3
- package/build/index.d.ts +3 -3
- package/build/index.mjs +62 -31
- package/package.json +1 -1
package/build/i18n.schema.json
CHANGED
@@ -3,29 +3,34 @@
|
|
3
3
|
"properties": {
|
4
4
|
"version": {
|
5
5
|
"type": "number",
|
6
|
-
"default": 0
|
6
|
+
"default": 0,
|
7
|
+
"description": "The version number of the schema."
|
7
8
|
},
|
8
9
|
"locale": {
|
9
10
|
"type": "object",
|
10
11
|
"properties": {
|
11
12
|
"source": {
|
12
|
-
"type": "string"
|
13
|
+
"type": "string",
|
14
|
+
"description": "Primary source locale code of your content (e.g. 'en', 'en-US', 'pt_BR', or 'pt-rBR'). Must be one of the supported locale codes – either a short ISO-639 language code or a full locale identifier using '-', '_' or Android '-r' notation."
|
13
15
|
},
|
14
16
|
"targets": {
|
15
17
|
"type": "array",
|
16
18
|
"items": {
|
17
19
|
"$ref": "#/properties/locale/properties/source"
|
18
|
-
}
|
20
|
+
},
|
21
|
+
"description": "List of target locale codes to translate to."
|
19
22
|
},
|
20
23
|
"extraSource": {
|
21
|
-
"$ref": "#/properties/locale/properties/
|
24
|
+
"$ref": "#/properties/locale/properties/targets/items",
|
25
|
+
"description": "Optional extra source locale code used as fallback during translation."
|
22
26
|
}
|
23
27
|
},
|
24
28
|
"required": [
|
25
29
|
"source",
|
26
30
|
"targets"
|
27
31
|
],
|
28
|
-
"additionalProperties": false
|
32
|
+
"additionalProperties": false,
|
33
|
+
"description": "Locale configuration block."
|
29
34
|
},
|
30
35
|
"buckets": {
|
31
36
|
"type": "object",
|
@@ -43,7 +48,8 @@
|
|
43
48
|
"type": "object",
|
44
49
|
"properties": {
|
45
50
|
"path": {
|
46
|
-
"type": "string"
|
51
|
+
"type": "string",
|
52
|
+
"description": "Path pattern containing a [locale] placeholder."
|
47
53
|
},
|
48
54
|
"delimiter": {
|
49
55
|
"type": [
|
@@ -54,17 +60,20 @@
|
|
54
60
|
"-",
|
55
61
|
"_",
|
56
62
|
null
|
57
|
-
]
|
63
|
+
],
|
64
|
+
"description": "Delimiter that replaces the [locale] placeholder in the path (default: no delimiter)."
|
58
65
|
}
|
59
66
|
},
|
60
67
|
"required": [
|
61
68
|
"path"
|
62
69
|
],
|
63
|
-
"additionalProperties": false
|
70
|
+
"additionalProperties": false,
|
71
|
+
"description": "Bucket path item. Either a string path or an object specifying path and delimiter."
|
64
72
|
}
|
65
73
|
]
|
66
74
|
},
|
67
|
-
"default": []
|
75
|
+
"default": [],
|
76
|
+
"description": "Glob patterns or bucket items to include for this bucket."
|
68
77
|
},
|
69
78
|
"exclude": {
|
70
79
|
"type": "array",
|
@@ -78,37 +87,43 @@
|
|
78
87
|
}
|
79
88
|
]
|
80
89
|
},
|
81
|
-
"default": []
|
90
|
+
"default": [],
|
91
|
+
"description": "Glob patterns or bucket items to exclude from this bucket."
|
82
92
|
},
|
83
93
|
"injectLocale": {
|
84
94
|
"type": "array",
|
85
95
|
"items": {
|
86
96
|
"type": "string"
|
87
|
-
}
|
97
|
+
},
|
98
|
+
"description": "Keys within files where the current locale should be injected or removed."
|
88
99
|
},
|
89
100
|
"lockedKeys": {
|
90
101
|
"type": "array",
|
91
102
|
"items": {
|
92
103
|
"type": "string"
|
93
104
|
},
|
94
|
-
"default": []
|
105
|
+
"default": [],
|
106
|
+
"description": "Keys that must remain unchanged and should never be overwritten by translations."
|
95
107
|
},
|
96
108
|
"lockedPatterns": {
|
97
109
|
"type": "array",
|
98
110
|
"items": {
|
99
111
|
"type": "string"
|
100
112
|
},
|
101
|
-
"default": []
|
113
|
+
"default": [],
|
114
|
+
"description": "Regular expression patterns whose matched content should remain locked during translation."
|
102
115
|
},
|
103
116
|
"ignoredKeys": {
|
104
117
|
"type": "array",
|
105
118
|
"items": {
|
106
119
|
"type": "string"
|
107
120
|
},
|
108
|
-
"default": []
|
121
|
+
"default": [],
|
122
|
+
"description": "Keys that should be completely ignored by translation processes."
|
109
123
|
}
|
110
124
|
},
|
111
|
-
"additionalProperties": false
|
125
|
+
"additionalProperties": false,
|
126
|
+
"description": "Configuration options for a translation bucket."
|
112
127
|
},
|
113
128
|
"propertyNames": {
|
114
129
|
"enum": [
|
@@ -161,16 +176,20 @@
|
|
161
176
|
"ollama",
|
162
177
|
"openrouter",
|
163
178
|
"mistral"
|
164
|
-
]
|
179
|
+
],
|
180
|
+
"description": "Identifier of the translation provider service."
|
165
181
|
},
|
166
182
|
"model": {
|
167
|
-
"type": "string"
|
183
|
+
"type": "string",
|
184
|
+
"description": "Model name to use for translations."
|
168
185
|
},
|
169
186
|
"prompt": {
|
170
|
-
"type": "string"
|
187
|
+
"type": "string",
|
188
|
+
"description": "Prompt template used when requesting translations."
|
171
189
|
},
|
172
190
|
"baseUrl": {
|
173
|
-
"type": "string"
|
191
|
+
"type": "string",
|
192
|
+
"description": "Custom base URL for the provider API (optional)."
|
174
193
|
}
|
175
194
|
},
|
176
195
|
"required": [
|
@@ -178,7 +197,8 @@
|
|
178
197
|
"model",
|
179
198
|
"prompt"
|
180
199
|
],
|
181
|
-
"additionalProperties": false
|
200
|
+
"additionalProperties": false,
|
201
|
+
"description": "Configuration for the machine-translation provider."
|
182
202
|
}
|
183
203
|
},
|
184
204
|
"required": [
|
package/build/index.cjs
CHANGED
@@ -29,8 +29,13 @@ var localeMap = {
|
|
29
29
|
he: ["he-IL"],
|
30
30
|
// Estonian (Estonia)
|
31
31
|
et: ["et-EE"],
|
32
|
-
// Greek
|
33
|
-
el: [
|
32
|
+
// Greek
|
33
|
+
el: [
|
34
|
+
"el-GR",
|
35
|
+
// Greece
|
36
|
+
"el-CY"
|
37
|
+
// Cyprus
|
38
|
+
],
|
34
39
|
// Danish (Denmark)
|
35
40
|
da: ["da-DK"],
|
36
41
|
// Azerbaijani (Azerbaijan)
|
@@ -49,8 +54,10 @@ var localeMap = {
|
|
49
54
|
// Australia
|
50
55
|
"en-CA",
|
51
56
|
// Canada
|
52
|
-
"en-SG"
|
57
|
+
"en-SG",
|
53
58
|
// Singapore
|
59
|
+
"en-IE"
|
60
|
+
// Ireland
|
54
61
|
],
|
55
62
|
// Spanish
|
56
63
|
es: [
|
@@ -69,8 +76,10 @@ var localeMap = {
|
|
69
76
|
// France
|
70
77
|
"fr-CA",
|
71
78
|
// Canada
|
72
|
-
"fr-BE"
|
79
|
+
"fr-BE",
|
73
80
|
// Belgium
|
81
|
+
"fr-LU"
|
82
|
+
// Luxembourg
|
74
83
|
],
|
75
84
|
// Catalan (Spain)
|
76
85
|
ca: ["ca-ES"],
|
@@ -363,9 +372,13 @@ var bucketTypeSchema = _zod2.default.enum(bucketTypes);
|
|
363
372
|
// src/config.ts
|
364
373
|
|
365
374
|
var localeSchema = _zod2.default.object({
|
366
|
-
source: localeCodeSchema
|
367
|
-
|
368
|
-
|
375
|
+
source: localeCodeSchema.describe(
|
376
|
+
"Primary source locale code of your content (e.g. 'en', 'en-US', 'pt_BR', or 'pt-rBR'). Must be one of the supported locale codes \u2013 either a short ISO-639 language code or a full locale identifier using '-', '_' or Android '-r' notation."
|
377
|
+
),
|
378
|
+
targets: _zod2.default.array(localeCodeSchema).describe(
|
379
|
+
"List of target locale codes to translate to."
|
380
|
+
)
|
381
|
+
}).describe("Locale configuration block.");
|
369
382
|
var createConfigDefinition = (definition) => definition;
|
370
383
|
var extendConfigDefinition = (definition, params) => {
|
371
384
|
const schema = params.createSchema(definition.schema);
|
@@ -404,7 +417,7 @@ ${localeErrors.join("\n")}`);
|
|
404
417
|
});
|
405
418
|
};
|
406
419
|
var configV0Schema = _zod2.default.object({
|
407
|
-
version: _zod2.default.number().default(0)
|
420
|
+
version: _zod2.default.number().default(0).describe("The version number of the schema.")
|
408
421
|
});
|
409
422
|
var configV0Definition = createConfigDefinition({
|
410
423
|
schema: configV0Schema,
|
@@ -416,7 +429,9 @@ var configV0Definition = createConfigDefinition({
|
|
416
429
|
var configV1Definition = extendConfigDefinition(configV0Definition, {
|
417
430
|
createSchema: (baseSchema) => baseSchema.extend({
|
418
431
|
locale: localeSchema,
|
419
|
-
buckets: _zod2.default.record(_zod2.default.string(), bucketTypeSchema).default({}).
|
432
|
+
buckets: _zod2.default.record(_zod2.default.string(), bucketTypeSchema).default({}).describe(
|
433
|
+
"Mapping of source file paths (glob patterns) to bucket types."
|
434
|
+
).optional()
|
420
435
|
}),
|
421
436
|
createDefaultValue: () => ({
|
422
437
|
version: 1,
|
@@ -440,8 +455,12 @@ var configV1_1Definition = extendConfigDefinition(configV1Definition, {
|
|
440
455
|
buckets: _zod2.default.record(
|
441
456
|
bucketTypeSchema,
|
442
457
|
_zod2.default.object({
|
443
|
-
include: _zod2.default.array(_zod2.default.string()).default([])
|
444
|
-
|
458
|
+
include: _zod2.default.array(_zod2.default.string()).default([]).describe(
|
459
|
+
"File paths or glob patterns to include for this bucket."
|
460
|
+
),
|
461
|
+
exclude: _zod2.default.array(_zod2.default.string()).default([]).optional().describe(
|
462
|
+
"File paths or glob patterns to exclude from this bucket."
|
463
|
+
)
|
445
464
|
})
|
446
465
|
).default({})
|
447
466
|
}),
|
@@ -476,7 +495,9 @@ var configV1_2Definition = extendConfigDefinition(
|
|
476
495
|
{
|
477
496
|
createSchema: (baseSchema) => baseSchema.extend({
|
478
497
|
locale: localeSchema.extend({
|
479
|
-
extraSource: localeCodeSchema.optional()
|
498
|
+
extraSource: localeCodeSchema.optional().describe(
|
499
|
+
"Optional extra source locale code used as fallback during translation."
|
500
|
+
)
|
480
501
|
})
|
481
502
|
}),
|
482
503
|
createDefaultValue: (baseDefaultValue) => ({
|
@@ -490,18 +511,20 @@ var configV1_2Definition = extendConfigDefinition(
|
|
490
511
|
}
|
491
512
|
);
|
492
513
|
var bucketItemSchema = _zod2.default.object({
|
493
|
-
path: _zod2.default.string(),
|
494
|
-
delimiter: _zod2.default.union([
|
495
|
-
|
496
|
-
|
497
|
-
|
498
|
-
|
499
|
-
|
514
|
+
path: _zod2.default.string().describe("Path pattern containing a [locale] placeholder."),
|
515
|
+
delimiter: _zod2.default.union([_zod2.default.literal("-"), _zod2.default.literal("_"), _zod2.default.literal(null)]).optional().describe(
|
516
|
+
"Delimiter that replaces the [locale] placeholder in the path (default: no delimiter)."
|
517
|
+
)
|
518
|
+
}).describe(
|
519
|
+
"Bucket path item. Either a string path or an object specifying path and delimiter."
|
520
|
+
);
|
500
521
|
var bucketValueSchemaV1_3 = _zod2.default.object({
|
501
|
-
include: _zod2.default.array(_zod2.default.union([_zod2.default.string(), bucketItemSchema])).default([]),
|
502
|
-
exclude: _zod2.default.array(_zod2.default.union([_zod2.default.string(), bucketItemSchema])).default([]).optional(),
|
503
|
-
injectLocale: _zod2.default.array(_zod2.default.string()).optional()
|
504
|
-
|
522
|
+
include: _zod2.default.array(_zod2.default.union([_zod2.default.string(), bucketItemSchema])).default([]).describe("Glob patterns or bucket items to include for this bucket."),
|
523
|
+
exclude: _zod2.default.array(_zod2.default.union([_zod2.default.string(), bucketItemSchema])).default([]).optional().describe("Glob patterns or bucket items to exclude from this bucket."),
|
524
|
+
injectLocale: _zod2.default.array(_zod2.default.string()).optional().describe(
|
525
|
+
"Keys within files where the current locale should be injected or removed."
|
526
|
+
)
|
527
|
+
}).describe("Configuration options for a translation bucket.");
|
505
528
|
var configV1_3Definition = extendConfigDefinition(
|
506
529
|
configV1_2Definition,
|
507
530
|
{
|
@@ -545,11 +568,13 @@ var providerSchema = _zod2.default.object({
|
|
545
568
|
"ollama",
|
546
569
|
"openrouter",
|
547
570
|
"mistral"
|
548
|
-
]),
|
549
|
-
model: _zod2.default.string(),
|
550
|
-
prompt: _zod2.default.string()
|
551
|
-
|
552
|
-
|
571
|
+
]).describe("Identifier of the translation provider service."),
|
572
|
+
model: _zod2.default.string().describe("Model name to use for translations."),
|
573
|
+
prompt: _zod2.default.string().describe(
|
574
|
+
"Prompt template used when requesting translations."
|
575
|
+
),
|
576
|
+
baseUrl: _zod2.default.string().optional().describe("Custom base URL for the provider API (optional).")
|
577
|
+
}).describe("Configuration for the machine-translation provider.");
|
553
578
|
var configV1_5Definition = extendConfigDefinition(
|
554
579
|
configV1_4Definition,
|
555
580
|
{
|
@@ -567,7 +592,9 @@ var configV1_5Definition = extendConfigDefinition(
|
|
567
592
|
}
|
568
593
|
);
|
569
594
|
var bucketValueSchemaV1_6 = bucketValueSchemaV1_3.extend({
|
570
|
-
lockedKeys: _zod2.default.array(_zod2.default.string()).default([]).optional()
|
595
|
+
lockedKeys: _zod2.default.array(_zod2.default.string()).default([]).optional().describe(
|
596
|
+
"Keys that must remain unchanged and should never be overwritten by translations."
|
597
|
+
)
|
571
598
|
});
|
572
599
|
var configV1_6Definition = extendConfigDefinition(
|
573
600
|
configV1_5Definition,
|
@@ -586,7 +613,9 @@ var configV1_6Definition = extendConfigDefinition(
|
|
586
613
|
}
|
587
614
|
);
|
588
615
|
var bucketValueSchemaV1_7 = bucketValueSchemaV1_6.extend({
|
589
|
-
lockedPatterns: _zod2.default.array(_zod2.default.string()).default([]).optional()
|
616
|
+
lockedPatterns: _zod2.default.array(_zod2.default.string()).default([]).optional().describe(
|
617
|
+
"Regular expression patterns whose matched content should remain locked during translation."
|
618
|
+
)
|
590
619
|
});
|
591
620
|
var configV1_7Definition = extendConfigDefinition(
|
592
621
|
configV1_6Definition,
|
@@ -605,7 +634,9 @@ var configV1_7Definition = extendConfigDefinition(
|
|
605
634
|
}
|
606
635
|
);
|
607
636
|
var bucketValueSchemaV1_8 = bucketValueSchemaV1_7.extend({
|
608
|
-
ignoredKeys: _zod2.default.array(_zod2.default.string()).default([]).optional()
|
637
|
+
ignoredKeys: _zod2.default.array(_zod2.default.string()).default([]).optional().describe(
|
638
|
+
"Keys that should be completely ignored by translation processes."
|
639
|
+
)
|
609
640
|
});
|
610
641
|
var configV1_8Definition = extendConfigDefinition(
|
611
642
|
configV1_7Definition,
|
package/build/index.d.cts
CHANGED
@@ -9,14 +9,14 @@ declare const localeMap: {
|
|
9
9
|
readonly hu: readonly ["hu-HU"];
|
10
10
|
readonly he: readonly ["he-IL"];
|
11
11
|
readonly et: readonly ["et-EE"];
|
12
|
-
readonly el: readonly ["el-GR"];
|
12
|
+
readonly el: readonly ["el-GR", "el-CY"];
|
13
13
|
readonly da: readonly ["da-DK"];
|
14
14
|
readonly az: readonly ["az-AZ"];
|
15
15
|
readonly th: readonly ["th-TH"];
|
16
16
|
readonly sv: readonly ["sv-SE"];
|
17
|
-
readonly en: readonly ["en-US", "en-GB", "en-AU", "en-CA", "en-SG"];
|
17
|
+
readonly en: readonly ["en-US", "en-GB", "en-AU", "en-CA", "en-SG", "en-IE"];
|
18
18
|
readonly es: readonly ["es-ES", "es-419", "es-MX", "es-AR"];
|
19
|
-
readonly fr: readonly ["fr-FR", "fr-CA", "fr-BE"];
|
19
|
+
readonly fr: readonly ["fr-FR", "fr-CA", "fr-BE", "fr-LU"];
|
20
20
|
readonly ca: readonly ["ca-ES"];
|
21
21
|
readonly ja: readonly ["ja-JP"];
|
22
22
|
readonly kk: readonly ["kk-KZ"];
|
package/build/index.d.ts
CHANGED
@@ -9,14 +9,14 @@ declare const localeMap: {
|
|
9
9
|
readonly hu: readonly ["hu-HU"];
|
10
10
|
readonly he: readonly ["he-IL"];
|
11
11
|
readonly et: readonly ["et-EE"];
|
12
|
-
readonly el: readonly ["el-GR"];
|
12
|
+
readonly el: readonly ["el-GR", "el-CY"];
|
13
13
|
readonly da: readonly ["da-DK"];
|
14
14
|
readonly az: readonly ["az-AZ"];
|
15
15
|
readonly th: readonly ["th-TH"];
|
16
16
|
readonly sv: readonly ["sv-SE"];
|
17
|
-
readonly en: readonly ["en-US", "en-GB", "en-AU", "en-CA", "en-SG"];
|
17
|
+
readonly en: readonly ["en-US", "en-GB", "en-AU", "en-CA", "en-SG", "en-IE"];
|
18
18
|
readonly es: readonly ["es-ES", "es-419", "es-MX", "es-AR"];
|
19
|
-
readonly fr: readonly ["fr-FR", "fr-CA", "fr-BE"];
|
19
|
+
readonly fr: readonly ["fr-FR", "fr-CA", "fr-BE", "fr-LU"];
|
20
20
|
readonly ca: readonly ["ca-ES"];
|
21
21
|
readonly ja: readonly ["ja-JP"];
|
22
22
|
readonly kk: readonly ["kk-KZ"];
|
package/build/index.mjs
CHANGED
@@ -29,8 +29,13 @@ var localeMap = {
|
|
29
29
|
he: ["he-IL"],
|
30
30
|
// Estonian (Estonia)
|
31
31
|
et: ["et-EE"],
|
32
|
-
// Greek
|
33
|
-
el: [
|
32
|
+
// Greek
|
33
|
+
el: [
|
34
|
+
"el-GR",
|
35
|
+
// Greece
|
36
|
+
"el-CY"
|
37
|
+
// Cyprus
|
38
|
+
],
|
34
39
|
// Danish (Denmark)
|
35
40
|
da: ["da-DK"],
|
36
41
|
// Azerbaijani (Azerbaijan)
|
@@ -49,8 +54,10 @@ var localeMap = {
|
|
49
54
|
// Australia
|
50
55
|
"en-CA",
|
51
56
|
// Canada
|
52
|
-
"en-SG"
|
57
|
+
"en-SG",
|
53
58
|
// Singapore
|
59
|
+
"en-IE"
|
60
|
+
// Ireland
|
54
61
|
],
|
55
62
|
// Spanish
|
56
63
|
es: [
|
@@ -69,8 +76,10 @@ var localeMap = {
|
|
69
76
|
// France
|
70
77
|
"fr-CA",
|
71
78
|
// Canada
|
72
|
-
"fr-BE"
|
79
|
+
"fr-BE",
|
73
80
|
// Belgium
|
81
|
+
"fr-LU"
|
82
|
+
// Luxembourg
|
74
83
|
],
|
75
84
|
// Catalan (Spain)
|
76
85
|
ca: ["ca-ES"],
|
@@ -363,9 +372,13 @@ var bucketTypeSchema = Z2.enum(bucketTypes);
|
|
363
372
|
// src/config.ts
|
364
373
|
import Z3 from "zod";
|
365
374
|
var localeSchema = Z3.object({
|
366
|
-
source: localeCodeSchema
|
367
|
-
|
368
|
-
|
375
|
+
source: localeCodeSchema.describe(
|
376
|
+
"Primary source locale code of your content (e.g. 'en', 'en-US', 'pt_BR', or 'pt-rBR'). Must be one of the supported locale codes \u2013 either a short ISO-639 language code or a full locale identifier using '-', '_' or Android '-r' notation."
|
377
|
+
),
|
378
|
+
targets: Z3.array(localeCodeSchema).describe(
|
379
|
+
"List of target locale codes to translate to."
|
380
|
+
)
|
381
|
+
}).describe("Locale configuration block.");
|
369
382
|
var createConfigDefinition = (definition) => definition;
|
370
383
|
var extendConfigDefinition = (definition, params) => {
|
371
384
|
const schema = params.createSchema(definition.schema);
|
@@ -404,7 +417,7 @@ ${localeErrors.join("\n")}`);
|
|
404
417
|
});
|
405
418
|
};
|
406
419
|
var configV0Schema = Z3.object({
|
407
|
-
version: Z3.number().default(0)
|
420
|
+
version: Z3.number().default(0).describe("The version number of the schema.")
|
408
421
|
});
|
409
422
|
var configV0Definition = createConfigDefinition({
|
410
423
|
schema: configV0Schema,
|
@@ -416,7 +429,9 @@ var configV0Definition = createConfigDefinition({
|
|
416
429
|
var configV1Definition = extendConfigDefinition(configV0Definition, {
|
417
430
|
createSchema: (baseSchema) => baseSchema.extend({
|
418
431
|
locale: localeSchema,
|
419
|
-
buckets: Z3.record(Z3.string(), bucketTypeSchema).default({}).
|
432
|
+
buckets: Z3.record(Z3.string(), bucketTypeSchema).default({}).describe(
|
433
|
+
"Mapping of source file paths (glob patterns) to bucket types."
|
434
|
+
).optional()
|
420
435
|
}),
|
421
436
|
createDefaultValue: () => ({
|
422
437
|
version: 1,
|
@@ -440,8 +455,12 @@ var configV1_1Definition = extendConfigDefinition(configV1Definition, {
|
|
440
455
|
buckets: Z3.record(
|
441
456
|
bucketTypeSchema,
|
442
457
|
Z3.object({
|
443
|
-
include: Z3.array(Z3.string()).default([])
|
444
|
-
|
458
|
+
include: Z3.array(Z3.string()).default([]).describe(
|
459
|
+
"File paths or glob patterns to include for this bucket."
|
460
|
+
),
|
461
|
+
exclude: Z3.array(Z3.string()).default([]).optional().describe(
|
462
|
+
"File paths or glob patterns to exclude from this bucket."
|
463
|
+
)
|
445
464
|
})
|
446
465
|
).default({})
|
447
466
|
}),
|
@@ -476,7 +495,9 @@ var configV1_2Definition = extendConfigDefinition(
|
|
476
495
|
{
|
477
496
|
createSchema: (baseSchema) => baseSchema.extend({
|
478
497
|
locale: localeSchema.extend({
|
479
|
-
extraSource: localeCodeSchema.optional()
|
498
|
+
extraSource: localeCodeSchema.optional().describe(
|
499
|
+
"Optional extra source locale code used as fallback during translation."
|
500
|
+
)
|
480
501
|
})
|
481
502
|
}),
|
482
503
|
createDefaultValue: (baseDefaultValue) => ({
|
@@ -490,18 +511,20 @@ var configV1_2Definition = extendConfigDefinition(
|
|
490
511
|
}
|
491
512
|
);
|
492
513
|
var bucketItemSchema = Z3.object({
|
493
|
-
path: Z3.string(),
|
494
|
-
delimiter: Z3.union([
|
495
|
-
|
496
|
-
|
497
|
-
|
498
|
-
|
499
|
-
|
514
|
+
path: Z3.string().describe("Path pattern containing a [locale] placeholder."),
|
515
|
+
delimiter: Z3.union([Z3.literal("-"), Z3.literal("_"), Z3.literal(null)]).optional().describe(
|
516
|
+
"Delimiter that replaces the [locale] placeholder in the path (default: no delimiter)."
|
517
|
+
)
|
518
|
+
}).describe(
|
519
|
+
"Bucket path item. Either a string path or an object specifying path and delimiter."
|
520
|
+
);
|
500
521
|
var bucketValueSchemaV1_3 = Z3.object({
|
501
|
-
include: Z3.array(Z3.union([Z3.string(), bucketItemSchema])).default([]),
|
502
|
-
exclude: Z3.array(Z3.union([Z3.string(), bucketItemSchema])).default([]).optional(),
|
503
|
-
injectLocale: Z3.array(Z3.string()).optional()
|
504
|
-
|
522
|
+
include: Z3.array(Z3.union([Z3.string(), bucketItemSchema])).default([]).describe("Glob patterns or bucket items to include for this bucket."),
|
523
|
+
exclude: Z3.array(Z3.union([Z3.string(), bucketItemSchema])).default([]).optional().describe("Glob patterns or bucket items to exclude from this bucket."),
|
524
|
+
injectLocale: Z3.array(Z3.string()).optional().describe(
|
525
|
+
"Keys within files where the current locale should be injected or removed."
|
526
|
+
)
|
527
|
+
}).describe("Configuration options for a translation bucket.");
|
505
528
|
var configV1_3Definition = extendConfigDefinition(
|
506
529
|
configV1_2Definition,
|
507
530
|
{
|
@@ -545,11 +568,13 @@ var providerSchema = Z3.object({
|
|
545
568
|
"ollama",
|
546
569
|
"openrouter",
|
547
570
|
"mistral"
|
548
|
-
]),
|
549
|
-
model: Z3.string(),
|
550
|
-
prompt: Z3.string()
|
551
|
-
|
552
|
-
|
571
|
+
]).describe("Identifier of the translation provider service."),
|
572
|
+
model: Z3.string().describe("Model name to use for translations."),
|
573
|
+
prompt: Z3.string().describe(
|
574
|
+
"Prompt template used when requesting translations."
|
575
|
+
),
|
576
|
+
baseUrl: Z3.string().optional().describe("Custom base URL for the provider API (optional).")
|
577
|
+
}).describe("Configuration for the machine-translation provider.");
|
553
578
|
var configV1_5Definition = extendConfigDefinition(
|
554
579
|
configV1_4Definition,
|
555
580
|
{
|
@@ -567,7 +592,9 @@ var configV1_5Definition = extendConfigDefinition(
|
|
567
592
|
}
|
568
593
|
);
|
569
594
|
var bucketValueSchemaV1_6 = bucketValueSchemaV1_3.extend({
|
570
|
-
lockedKeys: Z3.array(Z3.string()).default([]).optional()
|
595
|
+
lockedKeys: Z3.array(Z3.string()).default([]).optional().describe(
|
596
|
+
"Keys that must remain unchanged and should never be overwritten by translations."
|
597
|
+
)
|
571
598
|
});
|
572
599
|
var configV1_6Definition = extendConfigDefinition(
|
573
600
|
configV1_5Definition,
|
@@ -586,7 +613,9 @@ var configV1_6Definition = extendConfigDefinition(
|
|
586
613
|
}
|
587
614
|
);
|
588
615
|
var bucketValueSchemaV1_7 = bucketValueSchemaV1_6.extend({
|
589
|
-
lockedPatterns: Z3.array(Z3.string()).default([]).optional()
|
616
|
+
lockedPatterns: Z3.array(Z3.string()).default([]).optional().describe(
|
617
|
+
"Regular expression patterns whose matched content should remain locked during translation."
|
618
|
+
)
|
590
619
|
});
|
591
620
|
var configV1_7Definition = extendConfigDefinition(
|
592
621
|
configV1_6Definition,
|
@@ -605,7 +634,9 @@ var configV1_7Definition = extendConfigDefinition(
|
|
605
634
|
}
|
606
635
|
);
|
607
636
|
var bucketValueSchemaV1_8 = bucketValueSchemaV1_7.extend({
|
608
|
-
ignoredKeys: Z3.array(Z3.string()).default([]).optional()
|
637
|
+
ignoredKeys: Z3.array(Z3.string()).default([]).optional().describe(
|
638
|
+
"Keys that should be completely ignored by translation processes."
|
639
|
+
)
|
609
640
|
});
|
610
641
|
var configV1_8Definition = extendConfigDefinition(
|
611
642
|
configV1_7Definition,
|