lingo.dev 0.115.0 → 0.116.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/README.md +1 -0
- package/build/chunk-ZZGWAPLZ.cjs +8 -0
- package/build/chunk-ZZGWAPLZ.cjs.map +1 -0
- package/build/cli.cjs +140 -110
- package/build/cli.cjs.map +1 -1
- package/build/cli.mjs +40 -14
- package/build/cli.mjs.map +1 -1
- package/build/compiler.cjs +3 -1
- package/build/compiler.cjs.map +1 -1
- package/build/locale-codes.cjs +3 -1
- package/build/locale-codes.cjs.map +1 -1
- package/build/react/client.cjs +3 -1
- package/build/react/client.cjs.map +1 -1
- package/build/react/react-router.cjs +3 -1
- package/build/react/react-router.cjs.map +1 -1
- package/build/react/rsc.cjs +3 -1
- package/build/react/rsc.cjs.map +1 -1
- package/build/react.cjs +3 -1
- package/build/react.cjs.map +1 -1
- package/build/sdk.cjs +3 -1
- package/build/sdk.cjs.map +1 -1
- package/build/spec.cjs +3 -1
- package/build/spec.cjs.map +1 -1
- package/package.json +6 -6
package/build/cli.mjs
CHANGED
|
@@ -203,6 +203,9 @@ var docLinks = {
|
|
|
203
203
|
bucketNotFound: "https://lingo.dev/cli",
|
|
204
204
|
authError: "https://lingo.dev/cli",
|
|
205
205
|
localeTargetNotFound: "https://lingo.dev/cli",
|
|
206
|
+
// corrected key (previously misspelled as "lockFiletNotFound")
|
|
207
|
+
lockFileNotFound: "https://lingo.dev/cli",
|
|
208
|
+
// legacy alias for backward compatibility
|
|
206
209
|
lockFiletNotFound: "https://lingo.dev/cli",
|
|
207
210
|
failedReplexicaEngine: "https://lingo.dev/cli",
|
|
208
211
|
placeHolderFailed: "https://lingo.dev/cli",
|
|
@@ -210,6 +213,9 @@ var docLinks = {
|
|
|
210
213
|
connectionFailed: "https://lingo.dev/cli",
|
|
211
214
|
invalidType: "https://lingo.dev/cli",
|
|
212
215
|
invalidPathPattern: "https://lingo.dev/cli",
|
|
216
|
+
// corrected key (previously misspelled as "androidResouceError")
|
|
217
|
+
androidResourceError: "https://lingo.dev/cli",
|
|
218
|
+
// legacy alias for backward compatibility
|
|
213
219
|
androidResouceError: "https://lingo.dev/cli",
|
|
214
220
|
invalidBucketType: "https://lingo.dev/cli",
|
|
215
221
|
invalidStringDict: "https://lingo.dev/cli"
|
|
@@ -2172,7 +2178,7 @@ function createAndroidLoader() {
|
|
|
2172
2178
|
console.error("Error parsing Android resource file:", error);
|
|
2173
2179
|
throw new CLIError({
|
|
2174
2180
|
message: "Failed to parse Android resource file",
|
|
2175
|
-
docUrl: "
|
|
2181
|
+
docUrl: "androidResourceError"
|
|
2176
2182
|
});
|
|
2177
2183
|
}
|
|
2178
2184
|
},
|
|
@@ -2198,7 +2204,7 @@ function createAndroidLoader() {
|
|
|
2198
2204
|
console.error("Error generating Android resource file:", error);
|
|
2199
2205
|
throw new CLIError({
|
|
2200
2206
|
message: "Failed to generate Android resource file",
|
|
2201
|
-
docUrl: "
|
|
2207
|
+
docUrl: "androidResourceError"
|
|
2202
2208
|
});
|
|
2203
2209
|
}
|
|
2204
2210
|
}
|
|
@@ -2670,7 +2676,7 @@ function asString(value, name) {
|
|
|
2670
2676
|
}
|
|
2671
2677
|
throw new CLIError({
|
|
2672
2678
|
message: `Expected string value for resource "${name}"`,
|
|
2673
|
-
docUrl: "
|
|
2679
|
+
docUrl: "androidResourceError"
|
|
2674
2680
|
});
|
|
2675
2681
|
}
|
|
2676
2682
|
function asStringArray(value, name) {
|
|
@@ -2679,7 +2685,7 @@ function asStringArray(value, name) {
|
|
|
2679
2685
|
}
|
|
2680
2686
|
throw new CLIError({
|
|
2681
2687
|
message: `Expected array of strings for resource "${name}"`,
|
|
2682
|
-
docUrl: "
|
|
2688
|
+
docUrl: "androidResourceError"
|
|
2683
2689
|
});
|
|
2684
2690
|
}
|
|
2685
2691
|
function asPluralMap(value, name) {
|
|
@@ -2689,7 +2695,7 @@ function asPluralMap(value, name) {
|
|
|
2689
2695
|
if (typeof pluralValue !== "string") {
|
|
2690
2696
|
throw new CLIError({
|
|
2691
2697
|
message: `Expected plural item "${quantity}" of "${name}" to be a string`,
|
|
2692
|
-
docUrl: "
|
|
2698
|
+
docUrl: "androidResourceError"
|
|
2693
2699
|
});
|
|
2694
2700
|
}
|
|
2695
2701
|
result[quantity] = pluralValue;
|
|
@@ -2698,7 +2704,7 @@ function asPluralMap(value, name) {
|
|
|
2698
2704
|
}
|
|
2699
2705
|
throw new CLIError({
|
|
2700
2706
|
message: `Expected object value for plurals resource "${name}"`,
|
|
2701
|
-
docUrl: "
|
|
2707
|
+
docUrl: "androidResourceError"
|
|
2702
2708
|
});
|
|
2703
2709
|
}
|
|
2704
2710
|
function asBoolean(value, name) {
|
|
@@ -2712,7 +2718,7 @@ function asBoolean(value, name) {
|
|
|
2712
2718
|
}
|
|
2713
2719
|
throw new CLIError({
|
|
2714
2720
|
message: `Expected boolean value for resource "${name}"`,
|
|
2715
|
-
docUrl: "
|
|
2721
|
+
docUrl: "androidResourceError"
|
|
2716
2722
|
});
|
|
2717
2723
|
}
|
|
2718
2724
|
function asInteger(value, name) {
|
|
@@ -2721,7 +2727,7 @@ function asInteger(value, name) {
|
|
|
2721
2727
|
}
|
|
2722
2728
|
throw new CLIError({
|
|
2723
2729
|
message: `Expected number value for resource "${name}"`,
|
|
2724
|
-
docUrl: "
|
|
2730
|
+
docUrl: "androidResourceError"
|
|
2725
2731
|
});
|
|
2726
2732
|
}
|
|
2727
2733
|
function escapeAndroidString(value) {
|
|
@@ -3072,7 +3078,7 @@ function inferTypeFromValue(value) {
|
|
|
3072
3078
|
}
|
|
3073
3079
|
throw new CLIError({
|
|
3074
3080
|
message: "Unable to infer Android resource type from payload",
|
|
3075
|
-
docUrl: "
|
|
3081
|
+
docUrl: "androidResourceError"
|
|
3076
3082
|
});
|
|
3077
3083
|
}
|
|
3078
3084
|
function extractResourceMetadata(xml) {
|
|
@@ -4044,6 +4050,11 @@ function createXcodeXcstringsLoader(defaultLocale) {
|
|
|
4044
4050
|
if (langTranslationEntity) {
|
|
4045
4051
|
if ("stringUnit" in langTranslationEntity) {
|
|
4046
4052
|
resultData[translationKey] = langTranslationEntity.stringUnit.value;
|
|
4053
|
+
} else if ("stringSet" in langTranslationEntity) {
|
|
4054
|
+
const values = langTranslationEntity.stringSet.values;
|
|
4055
|
+
if (Array.isArray(values) && values.length > 0) {
|
|
4056
|
+
resultData[translationKey] = values;
|
|
4057
|
+
}
|
|
4047
4058
|
} else if ("variations" in langTranslationEntity) {
|
|
4048
4059
|
if ("plural" in langTranslationEntity.variations) {
|
|
4049
4060
|
resultData[translationKey] = {};
|
|
@@ -4088,6 +4099,21 @@ function createXcodeXcstringsLoader(defaultLocale) {
|
|
|
4088
4099
|
if (hasDoNotTranslateFlag) {
|
|
4089
4100
|
langDataToMerge.strings[key].shouldTranslate = false;
|
|
4090
4101
|
}
|
|
4102
|
+
} else if (Array.isArray(value)) {
|
|
4103
|
+
langDataToMerge.strings[key] = {
|
|
4104
|
+
extractionState: originalInput?.strings?.[key]?.extractionState,
|
|
4105
|
+
localizations: {
|
|
4106
|
+
[locale]: {
|
|
4107
|
+
stringSet: {
|
|
4108
|
+
state: "translated",
|
|
4109
|
+
values: value
|
|
4110
|
+
}
|
|
4111
|
+
}
|
|
4112
|
+
}
|
|
4113
|
+
};
|
|
4114
|
+
if (hasDoNotTranslateFlag) {
|
|
4115
|
+
langDataToMerge.strings[key].shouldTranslate = false;
|
|
4116
|
+
}
|
|
4091
4117
|
} else {
|
|
4092
4118
|
const updatedVariations = {};
|
|
4093
4119
|
for (const form in value) {
|
|
@@ -12025,11 +12051,11 @@ async function determineAuthId(ctx) {
|
|
|
12025
12051
|
}
|
|
12026
12052
|
|
|
12027
12053
|
// src/cli/cmd/run/index.ts
|
|
12028
|
-
var
|
|
12054
|
+
var __dirname2 = path17.dirname(fileURLToPath(import.meta.url));
|
|
12029
12055
|
function playSound(type) {
|
|
12030
12056
|
const platform = os2.platform();
|
|
12031
12057
|
return new Promise((resolve) => {
|
|
12032
|
-
const assetDir = path17.join(
|
|
12058
|
+
const assetDir = path17.join(__dirname2, "../assets");
|
|
12033
12059
|
const soundFiles = [path17.join(assetDir, `${type}.mp3`)];
|
|
12034
12060
|
let command = "";
|
|
12035
12061
|
if (platform === "linux") {
|
|
@@ -13298,7 +13324,7 @@ var status_default = new Command20().command("status").description("Show the sta
|
|
|
13298
13324
|
console.log(`\u2022 Per-language breakdown:`);
|
|
13299
13325
|
for (const locale of targetLocales) {
|
|
13300
13326
|
const words = totalWordCount.get(locale) || 0;
|
|
13301
|
-
const percent = (words / totalWordsToTranslate * 100).toFixed(1);
|
|
13327
|
+
const percent = totalWordsToTranslate > 0 ? (words / totalWordsToTranslate * 100).toFixed(1) : "0.0";
|
|
13302
13328
|
console.log(
|
|
13303
13329
|
` - ${locale}: ~${words.toLocaleString()} words (${percent}% of total)`
|
|
13304
13330
|
);
|
|
@@ -13530,7 +13556,7 @@ async function renderHero2() {
|
|
|
13530
13556
|
// package.json
|
|
13531
13557
|
var package_default = {
|
|
13532
13558
|
name: "lingo.dev",
|
|
13533
|
-
version: "0.
|
|
13559
|
+
version: "0.116.2",
|
|
13534
13560
|
description: "Lingo.dev CLI",
|
|
13535
13561
|
private: false,
|
|
13536
13562
|
publishConfig: {
|
|
@@ -13726,7 +13752,7 @@ var package_default = {
|
|
|
13726
13752
|
"php-array-reader": "^2.1.2",
|
|
13727
13753
|
plist: "^3.1.0",
|
|
13728
13754
|
"posthog-node": "^5.8.1",
|
|
13729
|
-
prettier: "^3.
|
|
13755
|
+
prettier: "^3.6.2",
|
|
13730
13756
|
react: "^18.3.1",
|
|
13731
13757
|
"rehype-stringify": "^10.0.1",
|
|
13732
13758
|
"remark-disable-tokenizers": "^1.1.1",
|