lingo.dev 0.85.0 → 0.85.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.
- package/build/cli.cjs +27 -97
- package/build/cli.cjs.map +1 -1
- package/build/cli.mjs +27 -97
- package/build/cli.mjs.map +1 -1
- package/package.json +1 -1
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
|
|
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.
|
|
5461
|
+
version: "0.85.1",
|
|
5532
5462
|
description: "Lingo.dev CLI",
|
|
5533
5463
|
private: false,
|
|
5534
5464
|
publishConfig: {
|