Skip to content

Commit 75eb346

Browse files
authored
fix: adapt to scoped namespaces in import (#177)
1 parent 2eb22c0 commit 75eb346

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

schema.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@
8888
}
8989
},
9090
"removeOtherKeys": {
91-
"description": "Remove keys which are not present in the import.",
91+
"description": "Remove keys which are not present in the import (within imported namespaces).",
9292
"type": "boolean"
9393
}
9494
}

src/commands/push.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ export default (config: Schema) =>
296296
.addOption(
297297
new Option(
298298
'--remove-other-keys',
299-
'Remove keys which are not present in the import.'
299+
'Remove keys which are not present in the import (within imported namespaces).'
300300
).default(config.push?.removeOtherKeys)
301301
)
302302
.action(pushHandler(config));

test/e2e/push.test.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -311,12 +311,16 @@ describe('project 3', () => {
311311

312312
const stored = tolgeeDataToDict(keys.data);
313313

314+
// Keys in the "food" namespace should not be removed
314315
expect(Object.keys(stored)).toEqual([
315316
'table',
316317
'chair',
317318
'plate',
318319
'fork',
319320
'water',
321+
'salad',
322+
'tomato',
323+
'onions',
320324
]);
321325
});
322326

@@ -354,12 +358,16 @@ describe('project 3', () => {
354358

355359
const stored = tolgeeDataToDict(keys.data);
356360

361+
// Keys in the "food" namespace should not be removed
357362
expect(Object.keys(stored)).toEqual([
358363
'table',
359364
'chair',
360365
'plate',
361366
'fork',
362367
'water',
368+
'salad',
369+
'tomato',
370+
'onions',
363371
]);
364372
});
365373
});

0 commit comments

Comments
 (0)