lingo.dev 0.85.0 → 0.85.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/cli.mjs CHANGED
@@ -3088,10 +3088,7 @@ function createBucketLoader(bucketType, bucketPathPattern, options, lockedKeys)
3088
3088
  createAndroidLoader(),
3089
3089
  createFlatLoader(),
3090
3090
  createSyncLoader(),
3091
- createUnlocalizableLoader(
3092
- options.isCacheRestore,
3093
- options.returnUnlocalizedKeys
3094
- )
3091
+ createUnlocalizableLoader(options.isCacheRestore, options.returnUnlocalizedKeys)
3095
3092
  );
3096
3093
  case "csv":
3097
3094
  return composeLoaders(
@@ -3099,10 +3096,7 @@ function createBucketLoader(bucketType, bucketPathPattern, options, lockedKeys)
3099
3096
  createCsvLoader(),
3100
3097
  createFlatLoader(),
3101
3098
  createSyncLoader(),
3102
- createUnlocalizableLoader(
3103
- options.isCacheRestore,
3104
- options.returnUnlocalizedKeys
3105
- )
3099
+ createUnlocalizableLoader(options.isCacheRestore, options.returnUnlocalizedKeys)
3106
3100
  );
3107
3101
  case "html":
3108
3102
  return composeLoaders(
@@ -3110,10 +3104,7 @@ function createBucketLoader(bucketType, bucketPathPattern, options, lockedKeys)
3110
3104
  createPrettierLoader({ parser: "html", bucketPathPattern }),
3111
3105
  createHtmlLoader(),
3112
3106
  createSyncLoader(),
3113
- createUnlocalizableLoader(
3114
- options.isCacheRestore,
3115
- options.returnUnlocalizedKeys
3116
- )
3107
+ createUnlocalizableLoader(options.isCacheRestore, options.returnUnlocalizedKeys)
3117
3108
  );
3118
3109
  case "json":
3119
3110
  return composeLoaders(
@@ -3124,10 +3115,7 @@ function createBucketLoader(bucketType, bucketPathPattern, options, lockedKeys)
3124
3115
  createFlatLoader(),
3125
3116
  createLockedKeysLoader(lockedKeys || [], options.isCacheRestore),
3126
3117
  createSyncLoader(),
3127
- createUnlocalizableLoader(
3128
- options.isCacheRestore,
3129
- options.returnUnlocalizedKeys
3130
- )
3118
+ createUnlocalizableLoader(options.isCacheRestore, options.returnUnlocalizedKeys)
3131
3119
  );
3132
3120
  case "markdown":
3133
3121
  return composeLoaders(
@@ -3135,10 +3123,7 @@ function createBucketLoader(bucketType, bucketPathPattern, options, lockedKeys)
3135
3123
  createPrettierLoader({ parser: "markdown", bucketPathPattern }),
3136
3124
  createMarkdownLoader(),
3137
3125
  createSyncLoader(),
3138
- createUnlocalizableLoader(
3139
- options.isCacheRestore,
3140
- options.returnUnlocalizedKeys
3141
- )
3126
+ createUnlocalizableLoader(options.isCacheRestore, options.returnUnlocalizedKeys)
3142
3127
  );
3143
3128
  case "mdx":
3144
3129
  return composeLoaders(
@@ -3149,19 +3134,6 @@ function createBucketLoader(bucketType, bucketPathPattern, options, lockedKeys)
3149
3134
  createFlatLoader(),
3150
3135
  createMdxStructureLoader(),
3151
3136
  createSyncLoader(),
3152
- createUnlocalizableLoader(
3153
- options.isCacheRestore,
3154
- options.returnUnlocalizedKeys
3155
- )
3156
- );
3157
- case "mdx":
3158
- return composeLoaders(
3159
- createTextFileLoader(bucketPathPattern),
3160
- createPrettierLoader({ parser: "mdx", bucketPathPattern }),
3161
- createMdxFormatLoader(),
3162
- createFlatLoader(),
3163
- createMdxStructureLoader(),
3164
- createSyncLoader(),
3165
3137
  createUnlocalizableLoader(options.isCacheRestore, options.returnUnlocalizedKeys)
3166
3138
  );
3167
3139
  case "po":
@@ -3171,30 +3143,21 @@ function createBucketLoader(bucketType, bucketPathPattern, options, lockedKeys)
3171
3143
  createFlatLoader(),
3172
3144
  createSyncLoader(),
3173
3145
  createVariableLoader({ type: "python" }),
3174
- createUnlocalizableLoader(
3175
- options.isCacheRestore,
3176
- options.returnUnlocalizedKeys
3177
- )
3146
+ createUnlocalizableLoader(options.isCacheRestore, options.returnUnlocalizedKeys)
3178
3147
  );
3179
3148
  case "properties":
3180
3149
  return composeLoaders(
3181
3150
  createTextFileLoader(bucketPathPattern),
3182
3151
  createPropertiesLoader(),
3183
3152
  createSyncLoader(),
3184
- createUnlocalizableLoader(
3185
- options.isCacheRestore,
3186
- options.returnUnlocalizedKeys
3187
- )
3153
+ createUnlocalizableLoader(options.isCacheRestore, options.returnUnlocalizedKeys)
3188
3154
  );
3189
3155
  case "xcode-strings":
3190
3156
  return composeLoaders(
3191
3157
  createTextFileLoader(bucketPathPattern),
3192
3158
  createXcodeStringsLoader(),
3193
3159
  createSyncLoader(),
3194
- createUnlocalizableLoader(
3195
- options.isCacheRestore,
3196
- options.returnUnlocalizedKeys
3197
- )
3160
+ createUnlocalizableLoader(options.isCacheRestore, options.returnUnlocalizedKeys)
3198
3161
  );
3199
3162
  case "xcode-stringsdict":
3200
3163
  return composeLoaders(
@@ -3202,10 +3165,7 @@ function createBucketLoader(bucketType, bucketPathPattern, options, lockedKeys)
3202
3165
  createXcodeStringsdictLoader(),
3203
3166
  createFlatLoader(),
3204
3167
  createSyncLoader(),
3205
- createUnlocalizableLoader(
3206
- options.isCacheRestore,
3207
- options.returnUnlocalizedKeys
3208
- )
3168
+ createUnlocalizableLoader(options.isCacheRestore, options.returnUnlocalizedKeys)
3209
3169
  );
3210
3170
  case "xcode-xcstrings":
3211
3171
  return composeLoaders(
@@ -3216,10 +3176,7 @@ function createBucketLoader(bucketType, bucketPathPattern, options, lockedKeys)
3216
3176
  createFlatLoader(),
3217
3177
  createSyncLoader(),
3218
3178
  createVariableLoader({ type: "ieee" }),
3219
- createUnlocalizableLoader(
3220
- options.isCacheRestore,
3221
- options.returnUnlocalizedKeys
3222
- )
3179
+ createUnlocalizableLoader(options.isCacheRestore, options.returnUnlocalizedKeys)
3223
3180
  );
3224
3181
  case "yaml":
3225
3182
  return composeLoaders(
@@ -3229,10 +3186,7 @@ function createBucketLoader(bucketType, bucketPathPattern, options, lockedKeys)
3229
3186
  createFlatLoader(),
3230
3187
  createLockedKeysLoader(lockedKeys || [], options.isCacheRestore),
3231
3188
  createSyncLoader(),
3232
- createUnlocalizableLoader(
3233
- options.isCacheRestore,
3234
- options.returnUnlocalizedKeys
3235
- )
3189
+ createUnlocalizableLoader(options.isCacheRestore, options.returnUnlocalizedKeys)
3236
3190
  );
3237
3191
  case "yaml-root-key":
3238
3192
  return composeLoaders(
@@ -3242,10 +3196,7 @@ function createBucketLoader(bucketType, bucketPathPattern, options, lockedKeys)
3242
3196
  createRootKeyLoader(true),
3243
3197
  createFlatLoader(),
3244
3198
  createSyncLoader(),
3245
- createUnlocalizableLoader(
3246
- options.isCacheRestore,
3247
- options.returnUnlocalizedKeys
3248
- )
3199
+ createUnlocalizableLoader(options.isCacheRestore, options.returnUnlocalizedKeys)
3249
3200
  );
3250
3201
  case "flutter":
3251
3202
  return composeLoaders(
@@ -3255,10 +3206,7 @@ function createBucketLoader(bucketType, bucketPathPattern, options, lockedKeys)
3255
3206
  createFlutterLoader(),
3256
3207
  createFlatLoader(),
3257
3208
  createSyncLoader(),
3258
- createUnlocalizableLoader(
3259
- options.isCacheRestore,
3260
- options.returnUnlocalizedKeys
3261
- )
3209
+ createUnlocalizableLoader(options.isCacheRestore, options.returnUnlocalizedKeys)
3262
3210
  );
3263
3211
  case "xliff":
3264
3212
  return composeLoaders(
@@ -3266,10 +3214,7 @@ function createBucketLoader(bucketType, bucketPathPattern, options, lockedKeys)
3266
3214
  createXliffLoader(),
3267
3215
  createFlatLoader(),
3268
3216
  createSyncLoader(),
3269
- createUnlocalizableLoader(
3270
- options.isCacheRestore,
3271
- options.returnUnlocalizedKeys
3272
- )
3217
+ createUnlocalizableLoader(options.isCacheRestore, options.returnUnlocalizedKeys)
3273
3218
  );
3274
3219
  case "xml":
3275
3220
  return composeLoaders(
@@ -3277,40 +3222,28 @@ function createBucketLoader(bucketType, bucketPathPattern, options, lockedKeys)
3277
3222
  createXmlLoader(),
3278
3223
  createFlatLoader(),
3279
3224
  createSyncLoader(),
3280
- createUnlocalizableLoader(
3281
- options.isCacheRestore,
3282
- options.returnUnlocalizedKeys
3283
- )
3225
+ createUnlocalizableLoader(options.isCacheRestore, options.returnUnlocalizedKeys)
3284
3226
  );
3285
3227
  case "srt":
3286
3228
  return composeLoaders(
3287
3229
  createTextFileLoader(bucketPathPattern),
3288
3230
  createSrtLoader(),
3289
3231
  createSyncLoader(),
3290
- createUnlocalizableLoader(
3291
- options.isCacheRestore,
3292
- options.returnUnlocalizedKeys
3293
- )
3232
+ createUnlocalizableLoader(options.isCacheRestore, options.returnUnlocalizedKeys)
3294
3233
  );
3295
3234
  case "dato":
3296
3235
  return composeLoaders(
3297
3236
  createDatoLoader(bucketPathPattern),
3298
3237
  createSyncLoader(),
3299
3238
  createFlatLoader(),
3300
- createUnlocalizableLoader(
3301
- options.isCacheRestore,
3302
- options.returnUnlocalizedKeys
3303
- )
3239
+ createUnlocalizableLoader(options.isCacheRestore, options.returnUnlocalizedKeys)
3304
3240
  );
3305
3241
  case "vtt":
3306
3242
  return composeLoaders(
3307
3243
  createTextFileLoader(bucketPathPattern),
3308
3244
  createVttLoader(),
3309
3245
  createSyncLoader(),
3310
- createUnlocalizableLoader(
3311
- options.isCacheRestore,
3312
- options.returnUnlocalizedKeys
3313
- )
3246
+ createUnlocalizableLoader(options.isCacheRestore, options.returnUnlocalizedKeys)
3314
3247
  );
3315
3248
  case "php":
3316
3249
  return composeLoaders(
@@ -3318,10 +3251,7 @@ function createBucketLoader(bucketType, bucketPathPattern, options, lockedKeys)
3318
3251
  createPhpLoader(),
3319
3252
  createSyncLoader(),
3320
3253
  createFlatLoader(),
3321
- createUnlocalizableLoader(
3322
- options.isCacheRestore,
3323
- options.returnUnlocalizedKeys
3324
- )
3254
+ createUnlocalizableLoader(options.isCacheRestore, options.returnUnlocalizedKeys)
3325
3255
  );
3326
3256
  case "vue-json":
3327
3257
  return composeLoaders(
@@ -3329,10 +3259,7 @@ function createBucketLoader(bucketType, bucketPathPattern, options, lockedKeys)
3329
3259
  createVueJsonLoader(),
3330
3260
  createSyncLoader(),
3331
3261
  createFlatLoader(),
3332
- createUnlocalizableLoader(
3333
- options.isCacheRestore,
3334
- options.returnUnlocalizedKeys
3335
- )
3262
+ createUnlocalizableLoader(options.isCacheRestore, options.returnUnlocalizedKeys)
3336
3263
  );
3337
3264
  }
3338
3265
  }
@@ -5335,20 +5262,21 @@ var status_default = new Command11().command("status").description("Show the sta
5335
5262
  console.log(chalk2.bold(`
5336
5263
  \u{1F310} LANGUAGE BY LANGUAGE BREAKDOWN:`));
5337
5264
  const table = new Table({
5338
- head: ["Language", "Status", "Complete", "Missing", "Updated", "Words"],
5265
+ head: ["Language", "Status", "Complete", "Missing", "Updated", "Total Keys", "Words to Translate"],
5339
5266
  style: {
5340
5267
  head: ["white"],
5341
5268
  // White color for headers
5342
5269
  border: []
5343
5270
  // No color for borders
5344
5271
  },
5345
- colWidths: [12, 20, 18, 12, 12, 15]
5272
+ colWidths: [12, 20, 18, 12, 12, 12, 15]
5346
5273
  // Explicit column widths, making Status column wider
5347
5274
  });
5348
5275
  let totalWordsToTranslate = 0;
5349
5276
  for (const locale of targetLocales) {
5350
5277
  const stats = languageStats[locale];
5351
5278
  const percentComplete = (stats.complete / totalSourceKeyCount * 100).toFixed(1);
5279
+ const totalNeeded = stats.missing + stats.updated;
5352
5280
  let statusText;
5353
5281
  let statusColor;
5354
5282
  if (stats.missing === totalSourceKeyCount) {
@@ -5375,6 +5303,7 @@ var status_default = new Command11().command("status").description("Show the sta
5375
5303
  `${stats.complete}/${totalSourceKeyCount} (${percentComplete}%)`,
5376
5304
  stats.missing > 0 ? chalk2.red(stats.missing.toString()) : "0",
5377
5305
  stats.updated > 0 ? chalk2.yellow(stats.updated.toString()) : "0",
5306
+ totalNeeded > 0 ? chalk2.magenta(totalNeeded.toString()) : "0",
5378
5307
  words > 0 ? `~${words.toLocaleString()}` : "0"
5379
5308
  ]);
5380
5309
  }
@@ -5382,8 +5311,9 @@ var status_default = new Command11().command("status").description("Show the sta
5382
5311
  console.log(chalk2.bold(`
5383
5312
  \u{1F4CA} USAGE ESTIMATE:`));
5384
5313
  console.log(
5385
- `\u2022 TOTAL: ~${chalk2.yellow.bold(totalWordsToTranslate.toLocaleString())} words to translate across all languages`
5314
+ `\u2022 WORDS TO BE CONSUMED: ~${chalk2.yellow.bold(totalWordsToTranslate.toLocaleString())} words across all languages`
5386
5315
  );
5316
+ console.log(` (Words are counted from source language for keys that need translation in target languages)`);
5387
5317
  if (targetLocales.length > 1) {
5388
5318
  console.log(`\u2022 Per-language breakdown:`);
5389
5319
  for (const locale of targetLocales) {
@@ -5528,7 +5458,7 @@ function validateParams2(i18nConfig, flags) {
5528
5458
  // package.json
5529
5459
  var package_default = {
5530
5460
  name: "lingo.dev",
5531
- version: "0.85.0",
5461
+ version: "0.85.2",
5532
5462
  description: "Lingo.dev CLI",
5533
5463
  private: false,
5534
5464
  publishConfig: {
@@ -5589,7 +5519,7 @@ var package_default = {
5589
5519
  "@ai-sdk/openai": "^1.3.7",
5590
5520
  "@datocms/cma-client-node": "^3.4.0",
5591
5521
  "@gitbeaker/rest": "^39.34.3",
5592
- "@inquirer/prompts": "^7.2.3",
5522
+ "@inquirer/prompts": "^7.4.1",
5593
5523
  "@lingo.dev/_sdk": "workspace:*",
5594
5524
  "@lingo.dev/_spec": "workspace:*",
5595
5525
  "@modelcontextprotocol/sdk": "^1.5.0",
@@ -5608,14 +5538,13 @@ var package_default = {
5608
5538
  express: "^4.21.2",
5609
5539
  "external-editor": "^3.1.0",
5610
5540
  figlet: "^1.8.0",
5611
- "figlet-cli": "^0.2.0",
5612
5541
  flat: "^6.0.1",
5613
5542
  "gettext-parser": "^8.0.0",
5614
5543
  glob: "<11.0.0",
5615
5544
  "gradient-string": "^3.0.0",
5616
5545
  "gray-matter": "^4.0.3",
5617
5546
  ini: "^5.0.0",
5618
- inquirer: "^12.3.2",
5547
+ inquirer: "^12.5.2",
5619
5548
  "interactive-commander": "^0.5.194",
5620
5549
  "is-url": "^1.2.4",
5621
5550
  jsdom: "^25.0.1",
@@ -5653,7 +5582,7 @@ var package_default = {
5653
5582
  unified: "^11.0.5",
5654
5583
  "unist-util-visit": "^5.0.0",
5655
5584
  vfile: "^6.0.3",
5656
- vitest: "^2.1.8",
5585
+ vitest: "^2.1.9",
5657
5586
  xliff: "^6.2.1",
5658
5587
  xml2js: "^0.6.2",
5659
5588
  xmldom: "^0.6.0",
@@ -5671,7 +5600,7 @@ var package_default = {
5671
5600
  "@types/ini": "^4.1.1",
5672
5601
  "@types/is-url": "^1.2.32",
5673
5602
  "@types/jsdom": "^21.1.7",
5674
- "@types/lodash": "^4.17.13",
5603
+ "@types/lodash": "^4.17.16",
5675
5604
  "@types/markdown-it": "^14.1.2",
5676
5605
  "@types/node": "^22.10.2",
5677
5606
  "@types/node-gettext": "^3.0.6",
@@ -5679,7 +5608,6 @@ var package_default = {
5679
5608
  "@types/plist": "^3.0.5",
5680
5609
  "@types/properties-parser": "^0.3.3",
5681
5610
  "@types/xml2js": "^0.4.14",
5682
- "@types/xmldom": "^0.1.34",
5683
5611
  tsup: "^8.3.5"
5684
5612
  },
5685
5613
  engines: {