@lingo.dev/_spec 0.47.1 → 0.48.1

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.
@@ -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": [
@@ -274,6 +281,17 @@
274
281
  },
275
282
  "vNext": {
276
283
  "type": "string"
284
+ },
285
+ "dev": {
286
+ "description": "Development-specific settings.",
287
+ "type": "object",
288
+ "properties": {
289
+ "usePseudotranslator": {
290
+ "description": "Use pseudotranslator instead of real translation provider. Useful for testing i18n without API calls.",
291
+ "type": "boolean"
292
+ }
293
+ },
294
+ "additionalProperties": false
277
295
  }
278
296
  },
279
297
  "required": [
package/build/index.cjs CHANGED
@@ -777,7 +777,52 @@ var configV1_12Definition = extendConfigDefinition(
777
777
  })
778
778
  }
779
779
  );
780
- var LATEST_CONFIG_DEFINITION = configV1_12Definition;
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 devSettingsSchema = _zod2.default.object({
805
+ usePseudotranslator: _zod2.default.boolean().optional().describe(
806
+ "Use pseudotranslator instead of real translation provider. Useful for testing i18n without API calls."
807
+ )
808
+ }).describe("Development-specific settings.");
809
+ var configV1_14Definition = extendConfigDefinition(
810
+ configV1_13Definition,
811
+ {
812
+ createSchema: (baseSchema) => baseSchema.extend({
813
+ dev: devSettingsSchema.optional()
814
+ }),
815
+ createDefaultValue: (baseDefaultValue) => ({
816
+ ...baseDefaultValue,
817
+ version: "1.14"
818
+ }),
819
+ createUpgrader: (oldConfig) => ({
820
+ ...oldConfig,
821
+ version: "1.14"
822
+ })
823
+ }
824
+ );
825
+ var LATEST_CONFIG_DEFINITION = configV1_14Definition;
781
826
  function parseI18nConfig(rawConfig) {
782
827
  try {
783
828
  const result = LATEST_CONFIG_DEFINITION.parse(rawConfig);
@@ -824,4 +869,7 @@ var defaultConfig = LATEST_CONFIG_DEFINITION.defaultValue;
824
869
 
825
870
 
826
871
 
827
- exports.LATEST_CONFIG_DEFINITION = LATEST_CONFIG_DEFINITION; exports.bucketItemSchema = bucketItemSchema; exports.bucketTypeSchema = bucketTypeSchema; exports.bucketTypes = bucketTypes; exports.bucketValueSchemaV1_12 = bucketValueSchemaV1_12; 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_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;
872
+
873
+
874
+
875
+ 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_14Definition = configV1_14Definition; 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,187 @@ 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>;
1174
+ declare const configV1_14Definition: ConfigDefinition<{
1175
+ version: Z.ZodDefault<Z.ZodUnion<readonly [Z.ZodNumber, Z.ZodString]>>;
1176
+ locale: Z.ZodObject<{
1177
+ source: Z.ZodString;
1178
+ targets: Z.ZodArray<Z.ZodString>;
1179
+ extraSource: Z.ZodOptional<Z.ZodString>;
1180
+ }, Z.core.$strip>;
1181
+ $schema: Z.ZodDefault<Z.ZodString>;
1182
+ formatter: Z.ZodOptional<Z.ZodEnum<{
1183
+ prettier: "prettier";
1184
+ biome: "biome";
1185
+ }>>;
1186
+ provider: Z.ZodOptional<Z.ZodObject<{
1187
+ id: Z.ZodEnum<{
1188
+ openai: "openai";
1189
+ anthropic: "anthropic";
1190
+ google: "google";
1191
+ ollama: "ollama";
1192
+ openrouter: "openrouter";
1193
+ mistral: "mistral";
1194
+ }>;
1195
+ model: Z.ZodString;
1196
+ prompt: Z.ZodString;
1197
+ baseUrl: Z.ZodOptional<Z.ZodString>;
1198
+ settings: Z.ZodOptional<Z.ZodObject<{
1199
+ temperature: Z.ZodOptional<Z.ZodNumber>;
1200
+ }, Z.core.$strip>>;
1201
+ }, Z.core.$strip>>;
1202
+ vNext: Z.ZodOptional<Z.ZodString>;
1203
+ buckets: Z.ZodDefault<Z.ZodRecord<Z.ZodEnum<{
1204
+ ail: "ail";
1205
+ android: "android";
1206
+ csv: "csv";
1207
+ ejs: "ejs";
1208
+ flutter: "flutter";
1209
+ html: "html";
1210
+ json: "json";
1211
+ json5: "json5";
1212
+ jsonc: "jsonc";
1213
+ markdown: "markdown";
1214
+ markdoc: "markdoc";
1215
+ mdx: "mdx";
1216
+ mjml: "mjml";
1217
+ twig: "twig";
1218
+ "xcode-strings": "xcode-strings";
1219
+ "xcode-stringsdict": "xcode-stringsdict";
1220
+ "xcode-xcstrings": "xcode-xcstrings";
1221
+ "xcode-xcstrings-v2": "xcode-xcstrings-v2";
1222
+ yaml: "yaml";
1223
+ "yaml-root-key": "yaml-root-key";
1224
+ properties: "properties";
1225
+ po: "po";
1226
+ xliff: "xliff";
1227
+ xml: "xml";
1228
+ srt: "srt";
1229
+ dato: "dato";
1230
+ compiler: "compiler";
1231
+ vtt: "vtt";
1232
+ php: "php";
1233
+ "vue-json": "vue-json";
1234
+ typescript: "typescript";
1235
+ txt: "txt";
1236
+ "json-dictionary": "json-dictionary";
1237
+ "csv-per-locale": "csv-per-locale";
1238
+ }> & Z.core.$partial, Z.ZodObject<{
1239
+ include: Z.ZodDefault<Z.ZodArray<Z.ZodUnion<readonly [Z.ZodString, Z.ZodObject<{
1240
+ path: Z.ZodString;
1241
+ delimiter: Z.ZodOptional<Z.ZodUnion<readonly [Z.ZodLiteral<"-">, Z.ZodLiteral<"_">, Z.ZodLiteral<null>]>>;
1242
+ }, Z.core.$strip>]>>>;
1243
+ exclude: Z.ZodOptional<Z.ZodArray<Z.ZodUnion<readonly [Z.ZodString, Z.ZodObject<{
1244
+ path: Z.ZodString;
1245
+ delimiter: Z.ZodOptional<Z.ZodUnion<readonly [Z.ZodLiteral<"-">, Z.ZodLiteral<"_">, Z.ZodLiteral<null>]>>;
1246
+ }, Z.core.$strip>]>>>;
1247
+ injectLocale: Z.ZodOptional<Z.ZodArray<Z.ZodString>>;
1248
+ lockedKeys: Z.ZodOptional<Z.ZodArray<Z.ZodString>>;
1249
+ lockedPatterns: Z.ZodOptional<Z.ZodArray<Z.ZodString>>;
1250
+ ignoredKeys: Z.ZodOptional<Z.ZodArray<Z.ZodString>>;
1251
+ preservedKeys: Z.ZodOptional<Z.ZodArray<Z.ZodString>>;
1252
+ localizableKeys: Z.ZodOptional<Z.ZodArray<Z.ZodString>>;
1253
+ }, Z.core.$strip>>>;
1254
+ dev: Z.ZodOptional<Z.ZodObject<{
1255
+ usePseudotranslator: Z.ZodOptional<Z.ZodBoolean>;
1256
+ }, Z.core.$strip>>;
1257
+ }, any>;
1077
1258
  declare const LATEST_CONFIG_DEFINITION: ConfigDefinition<{
1078
1259
  version: Z.ZodDefault<Z.ZodUnion<readonly [Z.ZodNumber, Z.ZodString]>>;
1079
1260
  locale: Z.ZodObject<{
@@ -1152,7 +1333,11 @@ declare const LATEST_CONFIG_DEFINITION: ConfigDefinition<{
1152
1333
  lockedPatterns: Z.ZodOptional<Z.ZodArray<Z.ZodString>>;
1153
1334
  ignoredKeys: Z.ZodOptional<Z.ZodArray<Z.ZodString>>;
1154
1335
  preservedKeys: Z.ZodOptional<Z.ZodArray<Z.ZodString>>;
1336
+ localizableKeys: Z.ZodOptional<Z.ZodArray<Z.ZodString>>;
1155
1337
  }, Z.core.$strip>>>;
1338
+ dev: Z.ZodOptional<Z.ZodObject<{
1339
+ usePseudotranslator: Z.ZodOptional<Z.ZodBoolean>;
1340
+ }, Z.core.$strip>>;
1156
1341
  }, any>;
1157
1342
  type I18nConfig = Z.infer<(typeof LATEST_CONFIG_DEFINITION)["schema"]>;
1158
1343
  declare function parseI18nConfig(rawConfig: unknown): {
@@ -1177,6 +1362,7 @@ declare function parseI18nConfig(rawConfig: unknown): {
1177
1362
  lockedPatterns?: string[] | undefined;
1178
1363
  ignoredKeys?: string[] | undefined;
1179
1364
  preservedKeys?: string[] | undefined;
1365
+ localizableKeys?: string[] | undefined;
1180
1366
  }>>;
1181
1367
  formatter?: "prettier" | "biome" | undefined;
1182
1368
  provider?: {
@@ -1189,6 +1375,9 @@ declare function parseI18nConfig(rawConfig: unknown): {
1189
1375
  } | undefined;
1190
1376
  } | undefined;
1191
1377
  vNext?: string | undefined;
1378
+ dev?: {
1379
+ usePseudotranslator?: boolean | undefined;
1380
+ } | undefined;
1192
1381
  };
1193
1382
  declare const defaultConfig: {
1194
1383
  version: string | number;
@@ -1212,6 +1401,7 @@ declare const defaultConfig: {
1212
1401
  lockedPatterns?: string[] | undefined;
1213
1402
  ignoredKeys?: string[] | undefined;
1214
1403
  preservedKeys?: string[] | undefined;
1404
+ localizableKeys?: string[] | undefined;
1215
1405
  }>>;
1216
1406
  formatter?: "prettier" | "biome" | undefined;
1217
1407
  provider?: {
@@ -1224,6 +1414,9 @@ declare const defaultConfig: {
1224
1414
  } | undefined;
1225
1415
  } | undefined;
1226
1416
  vNext?: string | undefined;
1417
+ dev?: {
1418
+ usePseudotranslator?: boolean | undefined;
1419
+ } | undefined;
1227
1420
  };
1228
1421
 
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 };
1422
+ 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_14Definition, 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,187 @@ 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>;
1174
+ declare const configV1_14Definition: ConfigDefinition<{
1175
+ version: Z.ZodDefault<Z.ZodUnion<readonly [Z.ZodNumber, Z.ZodString]>>;
1176
+ locale: Z.ZodObject<{
1177
+ source: Z.ZodString;
1178
+ targets: Z.ZodArray<Z.ZodString>;
1179
+ extraSource: Z.ZodOptional<Z.ZodString>;
1180
+ }, Z.core.$strip>;
1181
+ $schema: Z.ZodDefault<Z.ZodString>;
1182
+ formatter: Z.ZodOptional<Z.ZodEnum<{
1183
+ prettier: "prettier";
1184
+ biome: "biome";
1185
+ }>>;
1186
+ provider: Z.ZodOptional<Z.ZodObject<{
1187
+ id: Z.ZodEnum<{
1188
+ openai: "openai";
1189
+ anthropic: "anthropic";
1190
+ google: "google";
1191
+ ollama: "ollama";
1192
+ openrouter: "openrouter";
1193
+ mistral: "mistral";
1194
+ }>;
1195
+ model: Z.ZodString;
1196
+ prompt: Z.ZodString;
1197
+ baseUrl: Z.ZodOptional<Z.ZodString>;
1198
+ settings: Z.ZodOptional<Z.ZodObject<{
1199
+ temperature: Z.ZodOptional<Z.ZodNumber>;
1200
+ }, Z.core.$strip>>;
1201
+ }, Z.core.$strip>>;
1202
+ vNext: Z.ZodOptional<Z.ZodString>;
1203
+ buckets: Z.ZodDefault<Z.ZodRecord<Z.ZodEnum<{
1204
+ ail: "ail";
1205
+ android: "android";
1206
+ csv: "csv";
1207
+ ejs: "ejs";
1208
+ flutter: "flutter";
1209
+ html: "html";
1210
+ json: "json";
1211
+ json5: "json5";
1212
+ jsonc: "jsonc";
1213
+ markdown: "markdown";
1214
+ markdoc: "markdoc";
1215
+ mdx: "mdx";
1216
+ mjml: "mjml";
1217
+ twig: "twig";
1218
+ "xcode-strings": "xcode-strings";
1219
+ "xcode-stringsdict": "xcode-stringsdict";
1220
+ "xcode-xcstrings": "xcode-xcstrings";
1221
+ "xcode-xcstrings-v2": "xcode-xcstrings-v2";
1222
+ yaml: "yaml";
1223
+ "yaml-root-key": "yaml-root-key";
1224
+ properties: "properties";
1225
+ po: "po";
1226
+ xliff: "xliff";
1227
+ xml: "xml";
1228
+ srt: "srt";
1229
+ dato: "dato";
1230
+ compiler: "compiler";
1231
+ vtt: "vtt";
1232
+ php: "php";
1233
+ "vue-json": "vue-json";
1234
+ typescript: "typescript";
1235
+ txt: "txt";
1236
+ "json-dictionary": "json-dictionary";
1237
+ "csv-per-locale": "csv-per-locale";
1238
+ }> & Z.core.$partial, Z.ZodObject<{
1239
+ include: Z.ZodDefault<Z.ZodArray<Z.ZodUnion<readonly [Z.ZodString, Z.ZodObject<{
1240
+ path: Z.ZodString;
1241
+ delimiter: Z.ZodOptional<Z.ZodUnion<readonly [Z.ZodLiteral<"-">, Z.ZodLiteral<"_">, Z.ZodLiteral<null>]>>;
1242
+ }, Z.core.$strip>]>>>;
1243
+ exclude: Z.ZodOptional<Z.ZodArray<Z.ZodUnion<readonly [Z.ZodString, Z.ZodObject<{
1244
+ path: Z.ZodString;
1245
+ delimiter: Z.ZodOptional<Z.ZodUnion<readonly [Z.ZodLiteral<"-">, Z.ZodLiteral<"_">, Z.ZodLiteral<null>]>>;
1246
+ }, Z.core.$strip>]>>>;
1247
+ injectLocale: Z.ZodOptional<Z.ZodArray<Z.ZodString>>;
1248
+ lockedKeys: Z.ZodOptional<Z.ZodArray<Z.ZodString>>;
1249
+ lockedPatterns: Z.ZodOptional<Z.ZodArray<Z.ZodString>>;
1250
+ ignoredKeys: Z.ZodOptional<Z.ZodArray<Z.ZodString>>;
1251
+ preservedKeys: Z.ZodOptional<Z.ZodArray<Z.ZodString>>;
1252
+ localizableKeys: Z.ZodOptional<Z.ZodArray<Z.ZodString>>;
1253
+ }, Z.core.$strip>>>;
1254
+ dev: Z.ZodOptional<Z.ZodObject<{
1255
+ usePseudotranslator: Z.ZodOptional<Z.ZodBoolean>;
1256
+ }, Z.core.$strip>>;
1257
+ }, any>;
1077
1258
  declare const LATEST_CONFIG_DEFINITION: ConfigDefinition<{
1078
1259
  version: Z.ZodDefault<Z.ZodUnion<readonly [Z.ZodNumber, Z.ZodString]>>;
1079
1260
  locale: Z.ZodObject<{
@@ -1152,7 +1333,11 @@ declare const LATEST_CONFIG_DEFINITION: ConfigDefinition<{
1152
1333
  lockedPatterns: Z.ZodOptional<Z.ZodArray<Z.ZodString>>;
1153
1334
  ignoredKeys: Z.ZodOptional<Z.ZodArray<Z.ZodString>>;
1154
1335
  preservedKeys: Z.ZodOptional<Z.ZodArray<Z.ZodString>>;
1336
+ localizableKeys: Z.ZodOptional<Z.ZodArray<Z.ZodString>>;
1155
1337
  }, Z.core.$strip>>>;
1338
+ dev: Z.ZodOptional<Z.ZodObject<{
1339
+ usePseudotranslator: Z.ZodOptional<Z.ZodBoolean>;
1340
+ }, Z.core.$strip>>;
1156
1341
  }, any>;
1157
1342
  type I18nConfig = Z.infer<(typeof LATEST_CONFIG_DEFINITION)["schema"]>;
1158
1343
  declare function parseI18nConfig(rawConfig: unknown): {
@@ -1177,6 +1362,7 @@ declare function parseI18nConfig(rawConfig: unknown): {
1177
1362
  lockedPatterns?: string[] | undefined;
1178
1363
  ignoredKeys?: string[] | undefined;
1179
1364
  preservedKeys?: string[] | undefined;
1365
+ localizableKeys?: string[] | undefined;
1180
1366
  }>>;
1181
1367
  formatter?: "prettier" | "biome" | undefined;
1182
1368
  provider?: {
@@ -1189,6 +1375,9 @@ declare function parseI18nConfig(rawConfig: unknown): {
1189
1375
  } | undefined;
1190
1376
  } | undefined;
1191
1377
  vNext?: string | undefined;
1378
+ dev?: {
1379
+ usePseudotranslator?: boolean | undefined;
1380
+ } | undefined;
1192
1381
  };
1193
1382
  declare const defaultConfig: {
1194
1383
  version: string | number;
@@ -1212,6 +1401,7 @@ declare const defaultConfig: {
1212
1401
  lockedPatterns?: string[] | undefined;
1213
1402
  ignoredKeys?: string[] | undefined;
1214
1403
  preservedKeys?: string[] | undefined;
1404
+ localizableKeys?: string[] | undefined;
1215
1405
  }>>;
1216
1406
  formatter?: "prettier" | "biome" | undefined;
1217
1407
  provider?: {
@@ -1224,6 +1414,9 @@ declare const defaultConfig: {
1224
1414
  } | undefined;
1225
1415
  } | undefined;
1226
1416
  vNext?: string | undefined;
1417
+ dev?: {
1418
+ usePseudotranslator?: boolean | undefined;
1419
+ } | undefined;
1227
1420
  };
1228
1421
 
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 };
1422
+ 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_14Definition, 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,52 @@ var configV1_12Definition = extendConfigDefinition(
777
777
  })
778
778
  }
779
779
  );
780
- var LATEST_CONFIG_DEFINITION = configV1_12Definition;
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 devSettingsSchema = Z3.object({
805
+ usePseudotranslator: Z3.boolean().optional().describe(
806
+ "Use pseudotranslator instead of real translation provider. Useful for testing i18n without API calls."
807
+ )
808
+ }).describe("Development-specific settings.");
809
+ var configV1_14Definition = extendConfigDefinition(
810
+ configV1_13Definition,
811
+ {
812
+ createSchema: (baseSchema) => baseSchema.extend({
813
+ dev: devSettingsSchema.optional()
814
+ }),
815
+ createDefaultValue: (baseDefaultValue) => ({
816
+ ...baseDefaultValue,
817
+ version: "1.14"
818
+ }),
819
+ createUpgrader: (oldConfig) => ({
820
+ ...oldConfig,
821
+ version: "1.14"
822
+ })
823
+ }
824
+ );
825
+ var LATEST_CONFIG_DEFINITION = configV1_14Definition;
781
826
  function parseI18nConfig(rawConfig) {
782
827
  try {
783
828
  const result = LATEST_CONFIG_DEFINITION.parse(rawConfig);
@@ -793,6 +838,7 @@ export {
793
838
  bucketTypeSchema,
794
839
  bucketTypes,
795
840
  bucketValueSchemaV1_12,
841
+ bucketValueSchemaV1_13,
796
842
  bucketValueSchemaV1_3,
797
843
  bucketValueSchemaV1_6,
798
844
  bucketValueSchemaV1_7,
@@ -802,6 +848,8 @@ export {
802
848
  configV1_10Definition,
803
849
  configV1_11Definition,
804
850
  configV1_12Definition,
851
+ configV1_13Definition,
852
+ configV1_14Definition,
805
853
  configV1_1Definition,
806
854
  configV1_2Definition,
807
855
  configV1_3Definition,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lingo.dev/_spec",
3
- "version": "0.47.1",
3
+ "version": "0.48.1",
4
4
  "description": "Lingo.dev open specification",
5
5
  "private": false,
6
6
  "repository": {