lingo.dev 0.102.3 → 0.103.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/README.md +1 -1
- package/build/cli.cjs +32 -3
- package/build/cli.cjs.map +1 -1
- package/build/cli.mjs +32 -3
- package/build/cli.mjs.map +1 -1
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -158,6 +158,6 @@ If you like what we're doing, give us a ⭐ and help us reach 3,000 stars! 🌟
|
|
|
158
158
|
|
|
159
159
|
## 🌐 Readme in other languages
|
|
160
160
|
|
|
161
|
-
[English](https://github.com/lingodotdev/lingo.dev) • [中文](/readme/zh-Hans.md) • [日本語](/readme/ja.md) • [한국어](/readme/ko.md) • [Español](/readme/es.md) • [Français](/readme/fr.md) • [Русский](/readme/ru.md) • [Deutsch](/readme/de.md) • [Italiano](/readme/it.md) • [العربية](/readme/ar.md) • [हिन्दी](/readme/hi.md) • [বাংলা](/readme/bn.md) • [فارسی](/readme/fa.md)
|
|
161
|
+
[English](https://github.com/lingodotdev/lingo.dev) • [中文](/readme/zh-Hans.md) • [日本語](/readme/ja.md) • [한국어](/readme/ko.md) • [Español](/readme/es.md) • [Français](/readme/fr.md) • [Русский](/readme/ru.md) • [Українська](/readme/uk-UA.md) • [Deutsch](/readme/de.md) • [Italiano](/readme/it.md) • [العربية](/readme/ar.md) • [हिन्दी](/readme/hi.md) • [বাংলা](/readme/bn.md) • [فارسی](/readme/fa.md)
|
|
162
162
|
|
|
163
163
|
Don't see your language? Add it to [`i18n.json`](./i18n.json) and open a PR!
|
package/build/cli.cjs
CHANGED
|
@@ -2466,14 +2466,14 @@ function createXcodeXcstringsLoader(defaultLocale) {
|
|
|
2466
2466
|
});
|
|
2467
2467
|
}
|
|
2468
2468
|
function _removeLocale(input2, locale) {
|
|
2469
|
-
const {
|
|
2469
|
+
const { strings } = input2;
|
|
2470
2470
|
const newStrings = _lodash2.default.cloneDeep(strings);
|
|
2471
2471
|
for (const [key, value] of Object.entries(newStrings)) {
|
|
2472
2472
|
if (_optionalChain([value, 'access', _119 => _119.localizations, 'optionalAccess', _120 => _120[locale]])) {
|
|
2473
2473
|
delete value.localizations[locale];
|
|
2474
2474
|
}
|
|
2475
2475
|
}
|
|
2476
|
-
return {
|
|
2476
|
+
return { ...input2, strings: newStrings };
|
|
2477
2477
|
}
|
|
2478
2478
|
|
|
2479
2479
|
// src/cli/loaders/prettier.ts
|
|
@@ -4564,6 +4564,28 @@ function reorderKeys(data, originalInput) {
|
|
|
4564
4564
|
return orderedData;
|
|
4565
4565
|
}
|
|
4566
4566
|
|
|
4567
|
+
// src/cli/loaders/txt.ts
|
|
4568
|
+
function createTxtLoader() {
|
|
4569
|
+
return createLoader({
|
|
4570
|
+
async pull(locale, input2) {
|
|
4571
|
+
const result = {};
|
|
4572
|
+
if (input2 !== void 0 && input2 !== null && input2 !== "") {
|
|
4573
|
+
const lines = input2.split("\n");
|
|
4574
|
+
lines.forEach((line, index) => {
|
|
4575
|
+
result[String(index + 1)] = line;
|
|
4576
|
+
});
|
|
4577
|
+
}
|
|
4578
|
+
return result;
|
|
4579
|
+
},
|
|
4580
|
+
async push(locale, payload) {
|
|
4581
|
+
const sortedEntries = Object.entries(payload).sort(
|
|
4582
|
+
([a], [b]) => parseInt(a) - parseInt(b)
|
|
4583
|
+
);
|
|
4584
|
+
return sortedEntries.map(([_34, value]) => value).join("\n");
|
|
4585
|
+
}
|
|
4586
|
+
});
|
|
4587
|
+
}
|
|
4588
|
+
|
|
4567
4589
|
// src/cli/loaders/index.ts
|
|
4568
4590
|
function createBucketLoader(bucketType, bucketPathPattern, options, lockedKeys, lockedPatterns, ignoredKeys) {
|
|
4569
4591
|
switch (bucketType) {
|
|
@@ -4788,6 +4810,13 @@ function createBucketLoader(bucketType, bucketPathPattern, options, lockedKeys,
|
|
|
4788
4810
|
createIgnoredKeysLoader(ignoredKeys || []),
|
|
4789
4811
|
createUnlocalizableLoader(options.returnUnlocalizedKeys)
|
|
4790
4812
|
);
|
|
4813
|
+
case "txt":
|
|
4814
|
+
return composeLoaders(
|
|
4815
|
+
createTextFileLoader(bucketPathPattern),
|
|
4816
|
+
createTxtLoader(),
|
|
4817
|
+
createSyncLoader(),
|
|
4818
|
+
createUnlocalizableLoader(options.returnUnlocalizedKeys)
|
|
4819
|
+
);
|
|
4791
4820
|
}
|
|
4792
4821
|
}
|
|
4793
4822
|
|
|
@@ -9917,7 +9946,7 @@ async function renderHero2() {
|
|
|
9917
9946
|
// package.json
|
|
9918
9947
|
var package_default = {
|
|
9919
9948
|
name: "lingo.dev",
|
|
9920
|
-
version: "0.
|
|
9949
|
+
version: "0.103.0",
|
|
9921
9950
|
description: "Lingo.dev CLI",
|
|
9922
9951
|
private: false,
|
|
9923
9952
|
publishConfig: {
|