@lingo.dev/_spec 0.47.1 → 0.48.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/build/i18n.schema.json +7 -0
- package/build/index.cjs +28 -2
- package/build/index.d.cts +101 -1
- package/build/index.d.ts +101 -1
- package/build/index.mjs +27 -1
- package/package.json +1 -1
package/build/i18n.schema.json
CHANGED
|
@@ -203,6 +203,13 @@
|
|
|
203
203
|
"items": {
|
|
204
204
|
"type": "string"
|
|
205
205
|
}
|
|
206
|
+
},
|
|
207
|
+
"localizableKeys": {
|
|
208
|
+
"description": "Keys whose values should always be sent for translation, even if they would normally be skipped as untranslatable (e.g. pure numbers, URLs, dates). Use this to force-translate values that have custom glossary rules.",
|
|
209
|
+
"type": "array",
|
|
210
|
+
"items": {
|
|
211
|
+
"type": "string"
|
|
212
|
+
}
|
|
206
213
|
}
|
|
207
214
|
},
|
|
208
215
|
"required": [
|
package/build/index.cjs
CHANGED
|
@@ -777,7 +777,31 @@ var configV1_12Definition = extendConfigDefinition(
|
|
|
777
777
|
})
|
|
778
778
|
}
|
|
779
779
|
);
|
|
780
|
-
var
|
|
780
|
+
var bucketValueSchemaV1_13 = bucketValueSchemaV1_12.extend({
|
|
781
|
+
localizableKeys: _zod2.default.array(_zod2.default.string()).optional().describe(
|
|
782
|
+
"Keys whose values should always be sent for translation, even if they would normally be skipped as untranslatable (e.g. pure numbers, URLs, dates). Use this to force-translate values that have custom glossary rules."
|
|
783
|
+
)
|
|
784
|
+
});
|
|
785
|
+
var configV1_13Definition = extendConfigDefinition(
|
|
786
|
+
configV1_12Definition,
|
|
787
|
+
{
|
|
788
|
+
createSchema: (baseSchema) => baseSchema.extend({
|
|
789
|
+
buckets: _zod2.default.partialRecord(
|
|
790
|
+
bucketTypeSchema,
|
|
791
|
+
bucketValueSchemaV1_13
|
|
792
|
+
).default({})
|
|
793
|
+
}),
|
|
794
|
+
createDefaultValue: (baseDefaultValue) => ({
|
|
795
|
+
...baseDefaultValue,
|
|
796
|
+
version: "1.13"
|
|
797
|
+
}),
|
|
798
|
+
createUpgrader: (oldConfig) => ({
|
|
799
|
+
...oldConfig,
|
|
800
|
+
version: "1.13"
|
|
801
|
+
})
|
|
802
|
+
}
|
|
803
|
+
);
|
|
804
|
+
var LATEST_CONFIG_DEFINITION = configV1_13Definition;
|
|
781
805
|
function parseI18nConfig(rawConfig) {
|
|
782
806
|
try {
|
|
783
807
|
const result = LATEST_CONFIG_DEFINITION.parse(rawConfig);
|
|
@@ -824,4 +848,6 @@ var defaultConfig = LATEST_CONFIG_DEFINITION.defaultValue;
|
|
|
824
848
|
|
|
825
849
|
|
|
826
850
|
|
|
827
|
-
|
|
851
|
+
|
|
852
|
+
|
|
853
|
+
exports.LATEST_CONFIG_DEFINITION = LATEST_CONFIG_DEFINITION; exports.bucketItemSchema = bucketItemSchema; exports.bucketTypeSchema = bucketTypeSchema; exports.bucketTypes = bucketTypes; exports.bucketValueSchemaV1_12 = bucketValueSchemaV1_12; exports.bucketValueSchemaV1_13 = bucketValueSchemaV1_13; exports.bucketValueSchemaV1_3 = bucketValueSchemaV1_3; exports.bucketValueSchemaV1_6 = bucketValueSchemaV1_6; exports.bucketValueSchemaV1_7 = bucketValueSchemaV1_7; exports.bucketValueSchemaV1_8 = bucketValueSchemaV1_8; exports.configV0Definition = configV0Definition; exports.configV1Definition = configV1Definition; exports.configV1_10Definition = configV1_10Definition; exports.configV1_11Definition = configV1_11Definition; exports.configV1_12Definition = configV1_12Definition; exports.configV1_13Definition = configV1_13Definition; exports.configV1_1Definition = configV1_1Definition; exports.configV1_2Definition = configV1_2Definition; exports.configV1_3Definition = configV1_3Definition; exports.configV1_4Definition = configV1_4Definition; exports.configV1_5Definition = configV1_5Definition; exports.configV1_6Definition = configV1_6Definition; exports.configV1_7Definition = configV1_7Definition; exports.configV1_8Definition = configV1_8Definition; exports.configV1_9Definition = configV1_9Definition; exports.defaultConfig = defaultConfig; exports.getLocaleCodeDelimiter = getLocaleCodeDelimiter; exports.localeCodeSchema = localeCodeSchema; exports.localeCodes = localeCodes; exports.localeCodesFull = localeCodesFull; exports.localeCodesFullExplicitRegion = localeCodesFullExplicitRegion; exports.localeCodesFullUnderscore = localeCodesFullUnderscore; exports.localeCodesShort = localeCodesShort; exports.localeSchema = localeSchema; exports.normalizeLocale = normalizeLocale; exports.parseI18nConfig = parseI18nConfig; exports.resolveLocaleCode = resolveLocaleCode; exports.resolveOverriddenLocale = resolveOverriddenLocale;
|
package/build/index.d.cts
CHANGED
|
@@ -1074,6 +1074,103 @@ declare const configV1_12Definition: ConfigDefinition<{
|
|
|
1074
1074
|
preservedKeys: Z.ZodOptional<Z.ZodArray<Z.ZodString>>;
|
|
1075
1075
|
}, Z.core.$strip>>>;
|
|
1076
1076
|
}, any>;
|
|
1077
|
+
declare const bucketValueSchemaV1_13: Z.ZodObject<{
|
|
1078
|
+
include: Z.ZodDefault<Z.ZodArray<Z.ZodUnion<readonly [Z.ZodString, Z.ZodObject<{
|
|
1079
|
+
path: Z.ZodString;
|
|
1080
|
+
delimiter: Z.ZodOptional<Z.ZodUnion<readonly [Z.ZodLiteral<"-">, Z.ZodLiteral<"_">, Z.ZodLiteral<null>]>>;
|
|
1081
|
+
}, Z.core.$strip>]>>>;
|
|
1082
|
+
exclude: Z.ZodOptional<Z.ZodArray<Z.ZodUnion<readonly [Z.ZodString, Z.ZodObject<{
|
|
1083
|
+
path: Z.ZodString;
|
|
1084
|
+
delimiter: Z.ZodOptional<Z.ZodUnion<readonly [Z.ZodLiteral<"-">, Z.ZodLiteral<"_">, Z.ZodLiteral<null>]>>;
|
|
1085
|
+
}, Z.core.$strip>]>>>;
|
|
1086
|
+
injectLocale: Z.ZodOptional<Z.ZodArray<Z.ZodString>>;
|
|
1087
|
+
lockedKeys: Z.ZodOptional<Z.ZodArray<Z.ZodString>>;
|
|
1088
|
+
lockedPatterns: Z.ZodOptional<Z.ZodArray<Z.ZodString>>;
|
|
1089
|
+
ignoredKeys: Z.ZodOptional<Z.ZodArray<Z.ZodString>>;
|
|
1090
|
+
preservedKeys: Z.ZodOptional<Z.ZodArray<Z.ZodString>>;
|
|
1091
|
+
localizableKeys: Z.ZodOptional<Z.ZodArray<Z.ZodString>>;
|
|
1092
|
+
}, Z.core.$strip>;
|
|
1093
|
+
declare const configV1_13Definition: ConfigDefinition<{
|
|
1094
|
+
version: Z.ZodDefault<Z.ZodUnion<readonly [Z.ZodNumber, Z.ZodString]>>;
|
|
1095
|
+
locale: Z.ZodObject<{
|
|
1096
|
+
source: Z.ZodString;
|
|
1097
|
+
targets: Z.ZodArray<Z.ZodString>;
|
|
1098
|
+
extraSource: Z.ZodOptional<Z.ZodString>;
|
|
1099
|
+
}, Z.core.$strip>;
|
|
1100
|
+
$schema: Z.ZodDefault<Z.ZodString>;
|
|
1101
|
+
formatter: Z.ZodOptional<Z.ZodEnum<{
|
|
1102
|
+
prettier: "prettier";
|
|
1103
|
+
biome: "biome";
|
|
1104
|
+
}>>;
|
|
1105
|
+
provider: Z.ZodOptional<Z.ZodObject<{
|
|
1106
|
+
id: Z.ZodEnum<{
|
|
1107
|
+
openai: "openai";
|
|
1108
|
+
anthropic: "anthropic";
|
|
1109
|
+
google: "google";
|
|
1110
|
+
ollama: "ollama";
|
|
1111
|
+
openrouter: "openrouter";
|
|
1112
|
+
mistral: "mistral";
|
|
1113
|
+
}>;
|
|
1114
|
+
model: Z.ZodString;
|
|
1115
|
+
prompt: Z.ZodString;
|
|
1116
|
+
baseUrl: Z.ZodOptional<Z.ZodString>;
|
|
1117
|
+
settings: Z.ZodOptional<Z.ZodObject<{
|
|
1118
|
+
temperature: Z.ZodOptional<Z.ZodNumber>;
|
|
1119
|
+
}, Z.core.$strip>>;
|
|
1120
|
+
}, Z.core.$strip>>;
|
|
1121
|
+
vNext: Z.ZodOptional<Z.ZodString>;
|
|
1122
|
+
buckets: Z.ZodDefault<Z.ZodRecord<Z.ZodEnum<{
|
|
1123
|
+
ail: "ail";
|
|
1124
|
+
android: "android";
|
|
1125
|
+
csv: "csv";
|
|
1126
|
+
ejs: "ejs";
|
|
1127
|
+
flutter: "flutter";
|
|
1128
|
+
html: "html";
|
|
1129
|
+
json: "json";
|
|
1130
|
+
json5: "json5";
|
|
1131
|
+
jsonc: "jsonc";
|
|
1132
|
+
markdown: "markdown";
|
|
1133
|
+
markdoc: "markdoc";
|
|
1134
|
+
mdx: "mdx";
|
|
1135
|
+
mjml: "mjml";
|
|
1136
|
+
twig: "twig";
|
|
1137
|
+
"xcode-strings": "xcode-strings";
|
|
1138
|
+
"xcode-stringsdict": "xcode-stringsdict";
|
|
1139
|
+
"xcode-xcstrings": "xcode-xcstrings";
|
|
1140
|
+
"xcode-xcstrings-v2": "xcode-xcstrings-v2";
|
|
1141
|
+
yaml: "yaml";
|
|
1142
|
+
"yaml-root-key": "yaml-root-key";
|
|
1143
|
+
properties: "properties";
|
|
1144
|
+
po: "po";
|
|
1145
|
+
xliff: "xliff";
|
|
1146
|
+
xml: "xml";
|
|
1147
|
+
srt: "srt";
|
|
1148
|
+
dato: "dato";
|
|
1149
|
+
compiler: "compiler";
|
|
1150
|
+
vtt: "vtt";
|
|
1151
|
+
php: "php";
|
|
1152
|
+
"vue-json": "vue-json";
|
|
1153
|
+
typescript: "typescript";
|
|
1154
|
+
txt: "txt";
|
|
1155
|
+
"json-dictionary": "json-dictionary";
|
|
1156
|
+
"csv-per-locale": "csv-per-locale";
|
|
1157
|
+
}> & Z.core.$partial, Z.ZodObject<{
|
|
1158
|
+
include: Z.ZodDefault<Z.ZodArray<Z.ZodUnion<readonly [Z.ZodString, Z.ZodObject<{
|
|
1159
|
+
path: Z.ZodString;
|
|
1160
|
+
delimiter: Z.ZodOptional<Z.ZodUnion<readonly [Z.ZodLiteral<"-">, Z.ZodLiteral<"_">, Z.ZodLiteral<null>]>>;
|
|
1161
|
+
}, Z.core.$strip>]>>>;
|
|
1162
|
+
exclude: Z.ZodOptional<Z.ZodArray<Z.ZodUnion<readonly [Z.ZodString, Z.ZodObject<{
|
|
1163
|
+
path: Z.ZodString;
|
|
1164
|
+
delimiter: Z.ZodOptional<Z.ZodUnion<readonly [Z.ZodLiteral<"-">, Z.ZodLiteral<"_">, Z.ZodLiteral<null>]>>;
|
|
1165
|
+
}, Z.core.$strip>]>>>;
|
|
1166
|
+
injectLocale: Z.ZodOptional<Z.ZodArray<Z.ZodString>>;
|
|
1167
|
+
lockedKeys: Z.ZodOptional<Z.ZodArray<Z.ZodString>>;
|
|
1168
|
+
lockedPatterns: Z.ZodOptional<Z.ZodArray<Z.ZodString>>;
|
|
1169
|
+
ignoredKeys: Z.ZodOptional<Z.ZodArray<Z.ZodString>>;
|
|
1170
|
+
preservedKeys: Z.ZodOptional<Z.ZodArray<Z.ZodString>>;
|
|
1171
|
+
localizableKeys: Z.ZodOptional<Z.ZodArray<Z.ZodString>>;
|
|
1172
|
+
}, Z.core.$strip>>>;
|
|
1173
|
+
}, any>;
|
|
1077
1174
|
declare const LATEST_CONFIG_DEFINITION: ConfigDefinition<{
|
|
1078
1175
|
version: Z.ZodDefault<Z.ZodUnion<readonly [Z.ZodNumber, Z.ZodString]>>;
|
|
1079
1176
|
locale: Z.ZodObject<{
|
|
@@ -1152,6 +1249,7 @@ declare const LATEST_CONFIG_DEFINITION: ConfigDefinition<{
|
|
|
1152
1249
|
lockedPatterns: Z.ZodOptional<Z.ZodArray<Z.ZodString>>;
|
|
1153
1250
|
ignoredKeys: Z.ZodOptional<Z.ZodArray<Z.ZodString>>;
|
|
1154
1251
|
preservedKeys: Z.ZodOptional<Z.ZodArray<Z.ZodString>>;
|
|
1252
|
+
localizableKeys: Z.ZodOptional<Z.ZodArray<Z.ZodString>>;
|
|
1155
1253
|
}, Z.core.$strip>>>;
|
|
1156
1254
|
}, any>;
|
|
1157
1255
|
type I18nConfig = Z.infer<(typeof LATEST_CONFIG_DEFINITION)["schema"]>;
|
|
@@ -1177,6 +1275,7 @@ declare function parseI18nConfig(rawConfig: unknown): {
|
|
|
1177
1275
|
lockedPatterns?: string[] | undefined;
|
|
1178
1276
|
ignoredKeys?: string[] | undefined;
|
|
1179
1277
|
preservedKeys?: string[] | undefined;
|
|
1278
|
+
localizableKeys?: string[] | undefined;
|
|
1180
1279
|
}>>;
|
|
1181
1280
|
formatter?: "prettier" | "biome" | undefined;
|
|
1182
1281
|
provider?: {
|
|
@@ -1212,6 +1311,7 @@ declare const defaultConfig: {
|
|
|
1212
1311
|
lockedPatterns?: string[] | undefined;
|
|
1213
1312
|
ignoredKeys?: string[] | undefined;
|
|
1214
1313
|
preservedKeys?: string[] | undefined;
|
|
1314
|
+
localizableKeys?: string[] | undefined;
|
|
1215
1315
|
}>>;
|
|
1216
1316
|
formatter?: "prettier" | "biome" | undefined;
|
|
1217
1317
|
provider?: {
|
|
@@ -1226,4 +1326,4 @@ declare const defaultConfig: {
|
|
|
1226
1326
|
vNext?: string | undefined;
|
|
1227
1327
|
};
|
|
1228
1328
|
|
|
1229
|
-
export { type BucketItem, type I18nConfig, LATEST_CONFIG_DEFINITION, type LocaleCode, type LocaleCodeFull, type LocaleCodeShort, type LocaleDelimiter, bucketItemSchema, bucketTypeSchema, bucketTypes, bucketValueSchemaV1_12, bucketValueSchemaV1_3, bucketValueSchemaV1_6, bucketValueSchemaV1_7, bucketValueSchemaV1_8, configV0Definition, configV1Definition, configV1_10Definition, configV1_11Definition, configV1_12Definition, configV1_1Definition, configV1_2Definition, configV1_3Definition, configV1_4Definition, configV1_5Definition, configV1_6Definition, configV1_7Definition, configV1_8Definition, configV1_9Definition, defaultConfig, getLocaleCodeDelimiter, localeCodeSchema, localeCodes, localeCodesFull, localeCodesFullExplicitRegion, localeCodesFullUnderscore, localeCodesShort, localeSchema, normalizeLocale, parseI18nConfig, resolveLocaleCode, resolveOverriddenLocale };
|
|
1329
|
+
export { type BucketItem, type I18nConfig, LATEST_CONFIG_DEFINITION, type LocaleCode, type LocaleCodeFull, type LocaleCodeShort, type LocaleDelimiter, bucketItemSchema, bucketTypeSchema, bucketTypes, bucketValueSchemaV1_12, bucketValueSchemaV1_13, bucketValueSchemaV1_3, bucketValueSchemaV1_6, bucketValueSchemaV1_7, bucketValueSchemaV1_8, configV0Definition, configV1Definition, configV1_10Definition, configV1_11Definition, configV1_12Definition, configV1_13Definition, configV1_1Definition, configV1_2Definition, configV1_3Definition, configV1_4Definition, configV1_5Definition, configV1_6Definition, configV1_7Definition, configV1_8Definition, configV1_9Definition, defaultConfig, getLocaleCodeDelimiter, localeCodeSchema, localeCodes, localeCodesFull, localeCodesFullExplicitRegion, localeCodesFullUnderscore, localeCodesShort, localeSchema, normalizeLocale, parseI18nConfig, resolveLocaleCode, resolveOverriddenLocale };
|
package/build/index.d.ts
CHANGED
|
@@ -1074,6 +1074,103 @@ declare const configV1_12Definition: ConfigDefinition<{
|
|
|
1074
1074
|
preservedKeys: Z.ZodOptional<Z.ZodArray<Z.ZodString>>;
|
|
1075
1075
|
}, Z.core.$strip>>>;
|
|
1076
1076
|
}, any>;
|
|
1077
|
+
declare const bucketValueSchemaV1_13: Z.ZodObject<{
|
|
1078
|
+
include: Z.ZodDefault<Z.ZodArray<Z.ZodUnion<readonly [Z.ZodString, Z.ZodObject<{
|
|
1079
|
+
path: Z.ZodString;
|
|
1080
|
+
delimiter: Z.ZodOptional<Z.ZodUnion<readonly [Z.ZodLiteral<"-">, Z.ZodLiteral<"_">, Z.ZodLiteral<null>]>>;
|
|
1081
|
+
}, Z.core.$strip>]>>>;
|
|
1082
|
+
exclude: Z.ZodOptional<Z.ZodArray<Z.ZodUnion<readonly [Z.ZodString, Z.ZodObject<{
|
|
1083
|
+
path: Z.ZodString;
|
|
1084
|
+
delimiter: Z.ZodOptional<Z.ZodUnion<readonly [Z.ZodLiteral<"-">, Z.ZodLiteral<"_">, Z.ZodLiteral<null>]>>;
|
|
1085
|
+
}, Z.core.$strip>]>>>;
|
|
1086
|
+
injectLocale: Z.ZodOptional<Z.ZodArray<Z.ZodString>>;
|
|
1087
|
+
lockedKeys: Z.ZodOptional<Z.ZodArray<Z.ZodString>>;
|
|
1088
|
+
lockedPatterns: Z.ZodOptional<Z.ZodArray<Z.ZodString>>;
|
|
1089
|
+
ignoredKeys: Z.ZodOptional<Z.ZodArray<Z.ZodString>>;
|
|
1090
|
+
preservedKeys: Z.ZodOptional<Z.ZodArray<Z.ZodString>>;
|
|
1091
|
+
localizableKeys: Z.ZodOptional<Z.ZodArray<Z.ZodString>>;
|
|
1092
|
+
}, Z.core.$strip>;
|
|
1093
|
+
declare const configV1_13Definition: ConfigDefinition<{
|
|
1094
|
+
version: Z.ZodDefault<Z.ZodUnion<readonly [Z.ZodNumber, Z.ZodString]>>;
|
|
1095
|
+
locale: Z.ZodObject<{
|
|
1096
|
+
source: Z.ZodString;
|
|
1097
|
+
targets: Z.ZodArray<Z.ZodString>;
|
|
1098
|
+
extraSource: Z.ZodOptional<Z.ZodString>;
|
|
1099
|
+
}, Z.core.$strip>;
|
|
1100
|
+
$schema: Z.ZodDefault<Z.ZodString>;
|
|
1101
|
+
formatter: Z.ZodOptional<Z.ZodEnum<{
|
|
1102
|
+
prettier: "prettier";
|
|
1103
|
+
biome: "biome";
|
|
1104
|
+
}>>;
|
|
1105
|
+
provider: Z.ZodOptional<Z.ZodObject<{
|
|
1106
|
+
id: Z.ZodEnum<{
|
|
1107
|
+
openai: "openai";
|
|
1108
|
+
anthropic: "anthropic";
|
|
1109
|
+
google: "google";
|
|
1110
|
+
ollama: "ollama";
|
|
1111
|
+
openrouter: "openrouter";
|
|
1112
|
+
mistral: "mistral";
|
|
1113
|
+
}>;
|
|
1114
|
+
model: Z.ZodString;
|
|
1115
|
+
prompt: Z.ZodString;
|
|
1116
|
+
baseUrl: Z.ZodOptional<Z.ZodString>;
|
|
1117
|
+
settings: Z.ZodOptional<Z.ZodObject<{
|
|
1118
|
+
temperature: Z.ZodOptional<Z.ZodNumber>;
|
|
1119
|
+
}, Z.core.$strip>>;
|
|
1120
|
+
}, Z.core.$strip>>;
|
|
1121
|
+
vNext: Z.ZodOptional<Z.ZodString>;
|
|
1122
|
+
buckets: Z.ZodDefault<Z.ZodRecord<Z.ZodEnum<{
|
|
1123
|
+
ail: "ail";
|
|
1124
|
+
android: "android";
|
|
1125
|
+
csv: "csv";
|
|
1126
|
+
ejs: "ejs";
|
|
1127
|
+
flutter: "flutter";
|
|
1128
|
+
html: "html";
|
|
1129
|
+
json: "json";
|
|
1130
|
+
json5: "json5";
|
|
1131
|
+
jsonc: "jsonc";
|
|
1132
|
+
markdown: "markdown";
|
|
1133
|
+
markdoc: "markdoc";
|
|
1134
|
+
mdx: "mdx";
|
|
1135
|
+
mjml: "mjml";
|
|
1136
|
+
twig: "twig";
|
|
1137
|
+
"xcode-strings": "xcode-strings";
|
|
1138
|
+
"xcode-stringsdict": "xcode-stringsdict";
|
|
1139
|
+
"xcode-xcstrings": "xcode-xcstrings";
|
|
1140
|
+
"xcode-xcstrings-v2": "xcode-xcstrings-v2";
|
|
1141
|
+
yaml: "yaml";
|
|
1142
|
+
"yaml-root-key": "yaml-root-key";
|
|
1143
|
+
properties: "properties";
|
|
1144
|
+
po: "po";
|
|
1145
|
+
xliff: "xliff";
|
|
1146
|
+
xml: "xml";
|
|
1147
|
+
srt: "srt";
|
|
1148
|
+
dato: "dato";
|
|
1149
|
+
compiler: "compiler";
|
|
1150
|
+
vtt: "vtt";
|
|
1151
|
+
php: "php";
|
|
1152
|
+
"vue-json": "vue-json";
|
|
1153
|
+
typescript: "typescript";
|
|
1154
|
+
txt: "txt";
|
|
1155
|
+
"json-dictionary": "json-dictionary";
|
|
1156
|
+
"csv-per-locale": "csv-per-locale";
|
|
1157
|
+
}> & Z.core.$partial, Z.ZodObject<{
|
|
1158
|
+
include: Z.ZodDefault<Z.ZodArray<Z.ZodUnion<readonly [Z.ZodString, Z.ZodObject<{
|
|
1159
|
+
path: Z.ZodString;
|
|
1160
|
+
delimiter: Z.ZodOptional<Z.ZodUnion<readonly [Z.ZodLiteral<"-">, Z.ZodLiteral<"_">, Z.ZodLiteral<null>]>>;
|
|
1161
|
+
}, Z.core.$strip>]>>>;
|
|
1162
|
+
exclude: Z.ZodOptional<Z.ZodArray<Z.ZodUnion<readonly [Z.ZodString, Z.ZodObject<{
|
|
1163
|
+
path: Z.ZodString;
|
|
1164
|
+
delimiter: Z.ZodOptional<Z.ZodUnion<readonly [Z.ZodLiteral<"-">, Z.ZodLiteral<"_">, Z.ZodLiteral<null>]>>;
|
|
1165
|
+
}, Z.core.$strip>]>>>;
|
|
1166
|
+
injectLocale: Z.ZodOptional<Z.ZodArray<Z.ZodString>>;
|
|
1167
|
+
lockedKeys: Z.ZodOptional<Z.ZodArray<Z.ZodString>>;
|
|
1168
|
+
lockedPatterns: Z.ZodOptional<Z.ZodArray<Z.ZodString>>;
|
|
1169
|
+
ignoredKeys: Z.ZodOptional<Z.ZodArray<Z.ZodString>>;
|
|
1170
|
+
preservedKeys: Z.ZodOptional<Z.ZodArray<Z.ZodString>>;
|
|
1171
|
+
localizableKeys: Z.ZodOptional<Z.ZodArray<Z.ZodString>>;
|
|
1172
|
+
}, Z.core.$strip>>>;
|
|
1173
|
+
}, any>;
|
|
1077
1174
|
declare const LATEST_CONFIG_DEFINITION: ConfigDefinition<{
|
|
1078
1175
|
version: Z.ZodDefault<Z.ZodUnion<readonly [Z.ZodNumber, Z.ZodString]>>;
|
|
1079
1176
|
locale: Z.ZodObject<{
|
|
@@ -1152,6 +1249,7 @@ declare const LATEST_CONFIG_DEFINITION: ConfigDefinition<{
|
|
|
1152
1249
|
lockedPatterns: Z.ZodOptional<Z.ZodArray<Z.ZodString>>;
|
|
1153
1250
|
ignoredKeys: Z.ZodOptional<Z.ZodArray<Z.ZodString>>;
|
|
1154
1251
|
preservedKeys: Z.ZodOptional<Z.ZodArray<Z.ZodString>>;
|
|
1252
|
+
localizableKeys: Z.ZodOptional<Z.ZodArray<Z.ZodString>>;
|
|
1155
1253
|
}, Z.core.$strip>>>;
|
|
1156
1254
|
}, any>;
|
|
1157
1255
|
type I18nConfig = Z.infer<(typeof LATEST_CONFIG_DEFINITION)["schema"]>;
|
|
@@ -1177,6 +1275,7 @@ declare function parseI18nConfig(rawConfig: unknown): {
|
|
|
1177
1275
|
lockedPatterns?: string[] | undefined;
|
|
1178
1276
|
ignoredKeys?: string[] | undefined;
|
|
1179
1277
|
preservedKeys?: string[] | undefined;
|
|
1278
|
+
localizableKeys?: string[] | undefined;
|
|
1180
1279
|
}>>;
|
|
1181
1280
|
formatter?: "prettier" | "biome" | undefined;
|
|
1182
1281
|
provider?: {
|
|
@@ -1212,6 +1311,7 @@ declare const defaultConfig: {
|
|
|
1212
1311
|
lockedPatterns?: string[] | undefined;
|
|
1213
1312
|
ignoredKeys?: string[] | undefined;
|
|
1214
1313
|
preservedKeys?: string[] | undefined;
|
|
1314
|
+
localizableKeys?: string[] | undefined;
|
|
1215
1315
|
}>>;
|
|
1216
1316
|
formatter?: "prettier" | "biome" | undefined;
|
|
1217
1317
|
provider?: {
|
|
@@ -1226,4 +1326,4 @@ declare const defaultConfig: {
|
|
|
1226
1326
|
vNext?: string | undefined;
|
|
1227
1327
|
};
|
|
1228
1328
|
|
|
1229
|
-
export { type BucketItem, type I18nConfig, LATEST_CONFIG_DEFINITION, type LocaleCode, type LocaleCodeFull, type LocaleCodeShort, type LocaleDelimiter, bucketItemSchema, bucketTypeSchema, bucketTypes, bucketValueSchemaV1_12, bucketValueSchemaV1_3, bucketValueSchemaV1_6, bucketValueSchemaV1_7, bucketValueSchemaV1_8, configV0Definition, configV1Definition, configV1_10Definition, configV1_11Definition, configV1_12Definition, configV1_1Definition, configV1_2Definition, configV1_3Definition, configV1_4Definition, configV1_5Definition, configV1_6Definition, configV1_7Definition, configV1_8Definition, configV1_9Definition, defaultConfig, getLocaleCodeDelimiter, localeCodeSchema, localeCodes, localeCodesFull, localeCodesFullExplicitRegion, localeCodesFullUnderscore, localeCodesShort, localeSchema, normalizeLocale, parseI18nConfig, resolveLocaleCode, resolveOverriddenLocale };
|
|
1329
|
+
export { type BucketItem, type I18nConfig, LATEST_CONFIG_DEFINITION, type LocaleCode, type LocaleCodeFull, type LocaleCodeShort, type LocaleDelimiter, bucketItemSchema, bucketTypeSchema, bucketTypes, bucketValueSchemaV1_12, bucketValueSchemaV1_13, bucketValueSchemaV1_3, bucketValueSchemaV1_6, bucketValueSchemaV1_7, bucketValueSchemaV1_8, configV0Definition, configV1Definition, configV1_10Definition, configV1_11Definition, configV1_12Definition, configV1_13Definition, configV1_1Definition, configV1_2Definition, configV1_3Definition, configV1_4Definition, configV1_5Definition, configV1_6Definition, configV1_7Definition, configV1_8Definition, configV1_9Definition, defaultConfig, getLocaleCodeDelimiter, localeCodeSchema, localeCodes, localeCodesFull, localeCodesFullExplicitRegion, localeCodesFullUnderscore, localeCodesShort, localeSchema, normalizeLocale, parseI18nConfig, resolveLocaleCode, resolveOverriddenLocale };
|
package/build/index.mjs
CHANGED
|
@@ -777,7 +777,31 @@ var configV1_12Definition = extendConfigDefinition(
|
|
|
777
777
|
})
|
|
778
778
|
}
|
|
779
779
|
);
|
|
780
|
-
var
|
|
780
|
+
var bucketValueSchemaV1_13 = bucketValueSchemaV1_12.extend({
|
|
781
|
+
localizableKeys: Z3.array(Z3.string()).optional().describe(
|
|
782
|
+
"Keys whose values should always be sent for translation, even if they would normally be skipped as untranslatable (e.g. pure numbers, URLs, dates). Use this to force-translate values that have custom glossary rules."
|
|
783
|
+
)
|
|
784
|
+
});
|
|
785
|
+
var configV1_13Definition = extendConfigDefinition(
|
|
786
|
+
configV1_12Definition,
|
|
787
|
+
{
|
|
788
|
+
createSchema: (baseSchema) => baseSchema.extend({
|
|
789
|
+
buckets: Z3.partialRecord(
|
|
790
|
+
bucketTypeSchema,
|
|
791
|
+
bucketValueSchemaV1_13
|
|
792
|
+
).default({})
|
|
793
|
+
}),
|
|
794
|
+
createDefaultValue: (baseDefaultValue) => ({
|
|
795
|
+
...baseDefaultValue,
|
|
796
|
+
version: "1.13"
|
|
797
|
+
}),
|
|
798
|
+
createUpgrader: (oldConfig) => ({
|
|
799
|
+
...oldConfig,
|
|
800
|
+
version: "1.13"
|
|
801
|
+
})
|
|
802
|
+
}
|
|
803
|
+
);
|
|
804
|
+
var LATEST_CONFIG_DEFINITION = configV1_13Definition;
|
|
781
805
|
function parseI18nConfig(rawConfig) {
|
|
782
806
|
try {
|
|
783
807
|
const result = LATEST_CONFIG_DEFINITION.parse(rawConfig);
|
|
@@ -793,6 +817,7 @@ export {
|
|
|
793
817
|
bucketTypeSchema,
|
|
794
818
|
bucketTypes,
|
|
795
819
|
bucketValueSchemaV1_12,
|
|
820
|
+
bucketValueSchemaV1_13,
|
|
796
821
|
bucketValueSchemaV1_3,
|
|
797
822
|
bucketValueSchemaV1_6,
|
|
798
823
|
bucketValueSchemaV1_7,
|
|
@@ -802,6 +827,7 @@ export {
|
|
|
802
827
|
configV1_10Definition,
|
|
803
828
|
configV1_11Definition,
|
|
804
829
|
configV1_12Definition,
|
|
830
|
+
configV1_13Definition,
|
|
805
831
|
configV1_1Definition,
|
|
806
832
|
configV1_2Definition,
|
|
807
833
|
configV1_3Definition,
|