Skip to content

Commit 1f0d721

Browse files
committed
#This is the commit message #2:
feat: empty values in xcstrings feat: shoudTranslate chore: cleanup
1 parent 385565d commit 1f0d721

File tree

9 files changed

+501
-342
lines changed

9 files changed

+501
-342
lines changed

.husky/commit-msg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
npx --no -- commitlint --edit $1
1+
pnpm commitlint --edit $1

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
"devDependencies": {
1313
"@commitlint/cli": "^19.6.1",
1414
"@commitlint/config-conventional": "^19.6.0",
15+
"commitlint": "^19.7.1",
1516
"husky": "^9.1.7",
1617
"turbo": "^2.3.3"
1718
},

packages/cli/src/cli/cmd/cleanup.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export default new Command()
4040
for (const bucketConfig of bucket.config) {
4141
const sourceLocale = resolveOverridenLocale(i18nConfig!.locale.source, bucketConfig.delimiter);
4242
const bucketOra = Ora({ indent: 2 }).info(`Processing path: ${bucketConfig.pathPattern}`);
43-
const bucketLoader = createBucketLoader(bucket.type, bucketConfig.pathPattern);
43+
const bucketLoader = createBucketLoader(bucket.type, bucketConfig.pathPattern, { isCacheRestore: false, defaultLocale: sourceLocale });
4444
bucketLoader.setDefaultLocale(sourceLocale);
4545

4646
// Load source data

packages/cli/src/cli/cmd/i18n.ts

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,10 @@ export default new Command()
8181
for (const bucketConfig of bucket.config) {
8282
const sourceLocale = resolveOverridenLocale(i18nConfig!.locale.source, bucketConfig.delimiter);
8383

84-
const bucketLoader = createBucketLoader(bucket.type, bucketConfig.pathPattern);
84+
const bucketLoader = createBucketLoader(bucket.type, bucketConfig.pathPattern, {
85+
isCacheRestore: false,
86+
defaultLocale: sourceLocale,
87+
});
8588
bucketLoader.setDefaultLocale(sourceLocale);
8689
await bucketLoader.init();
8790

@@ -108,7 +111,10 @@ export default new Command()
108111
bucketOra.info(`Processing path: ${bucketConfig.pathPattern}`);
109112

110113
const sourceLocale = resolveOverridenLocale(i18nConfig!.locale.source, bucketConfig.delimiter);
111-
const bucketLoader = createBucketLoader(bucket.type, bucketConfig.pathPattern, { isCacheRestore: true });
114+
const bucketLoader = createBucketLoader(bucket.type, bucketConfig.pathPattern, {
115+
isCacheRestore: true,
116+
defaultLocale: sourceLocale,
117+
});
112118
bucketLoader.setDefaultLocale(sourceLocale);
113119
await bucketLoader.init();
114120
const sourceData = await bucketLoader.pull(sourceLocale);
@@ -150,7 +156,10 @@ export default new Command()
150156
for (const bucketConfig of bucket.config) {
151157
const sourceLocale = resolveOverridenLocale(i18nConfig!.locale.source, bucketConfig.delimiter);
152158

153-
const bucketLoader = createBucketLoader(bucket.type, bucketConfig.pathPattern);
159+
const bucketLoader = createBucketLoader(bucket.type, bucketConfig.pathPattern, {
160+
isCacheRestore: false,
161+
defaultLocale: sourceLocale,
162+
});
154163
bucketLoader.setDefaultLocale(sourceLocale);
155164
await bucketLoader.init();
156165

@@ -183,7 +192,10 @@ export default new Command()
183192

184193
const sourceLocale = resolveOverridenLocale(i18nConfig!.locale.source, bucketConfig.delimiter);
185194

186-
const bucketLoader = createBucketLoader(bucket.type, bucketConfig.pathPattern);
195+
const bucketLoader = createBucketLoader(bucket.type, bucketConfig.pathPattern, {
196+
isCacheRestore: false,
197+
defaultLocale: sourceLocale,
198+
});
187199
bucketLoader.setDefaultLocale(sourceLocale);
188200
await bucketLoader.init();
189201
let sourceData = await bucketLoader.pull(sourceLocale);

packages/cli/src/cli/cmd/lockfile.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export default new Command()
2626
for (const bucket of buckets) {
2727
for (const bucketConfig of bucket.config) {
2828
const sourceLocale = resolveOverridenLocale(i18nConfig!.locale.source, bucketConfig.delimiter);
29-
const bucketLoader = createBucketLoader(bucket.type, bucketConfig.pathPattern);
29+
const bucketLoader = createBucketLoader(bucket.type, bucketConfig.pathPattern, { isCacheRestore: false, defaultLocale: sourceLocale });
3030
bucketLoader.setDefaultLocale(sourceLocale);
3131

3232
const sourceData = await bucketLoader.pull(sourceLocale);

0 commit comments

Comments
 (0)