@vocoder/cli 0.7.0 → 0.9.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/dist/bin.mjs +34 -14
- package/dist/bin.mjs.map +1 -1
- package/dist/{chunk-ADQ4WVOA.mjs → chunk-IZN5HVYD.mjs} +16 -4
- package/dist/{chunk-ADQ4WVOA.mjs.map → chunk-IZN5HVYD.mjs.map} +1 -1
- package/dist/lib.d.mts +2 -0
- package/dist/lib.mjs +1 -1
- package/dist/lib.mjs.map +1 -1
- package/package.json +3 -3
|
@@ -43584,7 +43584,8 @@ function detectLocalEcosystem(cwd = process.cwd()) {
|
|
|
43584
43584
|
hasExtractor: false,
|
|
43585
43585
|
hasConfig: false,
|
|
43586
43586
|
hasUiPackage: false,
|
|
43587
|
-
sourceLocale: null
|
|
43587
|
+
sourceLocale: null,
|
|
43588
|
+
isTypeScript: existsSync(join(cwd, "tsconfig.json"))
|
|
43588
43589
|
};
|
|
43589
43590
|
}
|
|
43590
43591
|
const allDeps = {
|
|
@@ -43594,6 +43595,7 @@ function detectLocalEcosystem(cwd = process.cwd()) {
|
|
|
43594
43595
|
const hasUnplugin = "@vocoder/plugin" in allDeps;
|
|
43595
43596
|
const hasExtractor = "@vocoder/extractor" in allDeps;
|
|
43596
43597
|
const hasConfig = "@vocoder/config" in allDeps;
|
|
43598
|
+
const isTypeScript = existsSync(join(cwd, "tsconfig.json")) || "typescript" in allDeps;
|
|
43597
43599
|
const { ecosystem, framework, uiPackage } = detectFromDeps(allDeps, cwd);
|
|
43598
43600
|
const hasUiPackage = uiPackage !== null && uiPackage in allDeps;
|
|
43599
43601
|
return {
|
|
@@ -43605,7 +43607,8 @@ function detectLocalEcosystem(cwd = process.cwd()) {
|
|
|
43605
43607
|
hasExtractor,
|
|
43606
43608
|
hasConfig,
|
|
43607
43609
|
hasUiPackage,
|
|
43608
|
-
sourceLocale: null
|
|
43610
|
+
sourceLocale: null,
|
|
43611
|
+
isTypeScript
|
|
43609
43612
|
};
|
|
43610
43613
|
}
|
|
43611
43614
|
function detectPackageManager(cwd) {
|
|
@@ -50537,6 +50540,7 @@ var StringExtractor = class {
|
|
|
50537
50540
|
let hasPlural = false;
|
|
50538
50541
|
let hasSelect = false;
|
|
50539
50542
|
let isOrdinal = false;
|
|
50543
|
+
let hasGender = false;
|
|
50540
50544
|
for (const attr of attributes) {
|
|
50541
50545
|
if (attr.type !== "JSXAttribute") continue;
|
|
50542
50546
|
const name = attr.name.name;
|
|
@@ -50544,6 +50548,10 @@ var StringExtractor = class {
|
|
|
50544
50548
|
isOrdinal = true;
|
|
50545
50549
|
continue;
|
|
50546
50550
|
}
|
|
50551
|
+
if (name === "gender") {
|
|
50552
|
+
hasGender = true;
|
|
50553
|
+
continue;
|
|
50554
|
+
}
|
|
50547
50555
|
const value = attr.value?.type === "StringLiteral" ? attr.value.value : null;
|
|
50548
50556
|
if (!value) continue;
|
|
50549
50557
|
if (PLURAL_CLDR.has(name) || /^_\d+$/.test(name)) {
|
|
@@ -50557,7 +50565,11 @@ var StringExtractor = class {
|
|
|
50557
50565
|
}
|
|
50558
50566
|
}
|
|
50559
50567
|
if (isOrdinal) {
|
|
50560
|
-
|
|
50568
|
+
const ordinalICU = "{count, selectordinal, other {#}}";
|
|
50569
|
+
if (hasGender) {
|
|
50570
|
+
return `{gender, select, masculine {${ordinalICU}} feminine {${ordinalICU}} other {${ordinalICU}}}`;
|
|
50571
|
+
}
|
|
50572
|
+
return ordinalICU;
|
|
50561
50573
|
}
|
|
50562
50574
|
if (!hasPlural && !hasSelect) return null;
|
|
50563
50575
|
if (hasPlural) {
|
|
@@ -50626,4 +50638,4 @@ export {
|
|
|
50626
50638
|
loadVocoderConfig,
|
|
50627
50639
|
StringExtractor
|
|
50628
50640
|
};
|
|
50629
|
-
//# sourceMappingURL=chunk-
|
|
50641
|
+
//# sourceMappingURL=chunk-IZN5HVYD.mjs.map
|