[PM-7304] Add missing i18n keys for import errors (#8743)
* Add static error message when import fails * Adding missing string on CLI for unassigned items * Added missing string on setImportTarget * fixed tests
This commit is contained in:
parent
395f2e806e
commit
28a89ddb86
|
@ -3011,5 +3011,11 @@
|
|||
},
|
||||
"unassignedItemsBannerSelfHost": {
|
||||
"message": "Notice: On May 2, 2024, unassigned organization items will no longer be visible in the All Vaults view and will only be accessible via the Admin Console. Assign these items to a collection from the Admin Console to make them visible."
|
||||
},
|
||||
"errorAssigningTargetCollection": {
|
||||
"message": "Error assigning target collection."
|
||||
},
|
||||
"errorAssigningTargetFolder": {
|
||||
"message": "Error assigning target folder."
|
||||
}
|
||||
}
|
||||
|
|
|
@ -49,5 +49,14 @@
|
|||
},
|
||||
"unsupportedEncryptedImport": {
|
||||
"message": "Importing encrypted files is currently not supported."
|
||||
},
|
||||
"importUnassignedItemsError": {
|
||||
"message": "File contains unassigned items."
|
||||
},
|
||||
"errorAssigningTargetCollection": {
|
||||
"message": "Error assigning target collection."
|
||||
},
|
||||
"errorAssigningTargetFolder": {
|
||||
"message": "Error assigning target folder."
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2705,5 +2705,11 @@
|
|||
},
|
||||
"passkeyRemoved": {
|
||||
"message": "Passkey removed"
|
||||
},
|
||||
"errorAssigningTargetCollection": {
|
||||
"message": "Error assigning target collection."
|
||||
},
|
||||
"errorAssigningTargetFolder": {
|
||||
"message": "Error assigning target folder."
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7944,5 +7944,11 @@
|
|||
},
|
||||
"deleteProviderWarning": {
|
||||
"message": "Deleting your provider is permanent. It cannot be undone."
|
||||
},
|
||||
"errorAssigningTargetCollection": {
|
||||
"message": "Error assigning target collection."
|
||||
},
|
||||
"errorAssigningTargetFolder": {
|
||||
"message": "Error assigning target folder."
|
||||
}
|
||||
}
|
||||
|
|
|
@ -196,7 +196,7 @@ describe("ImportService", () => {
|
|||
new Object() as FolderView,
|
||||
);
|
||||
|
||||
await expect(setImportTargetMethod).rejects.toThrow("Error assigning target collection");
|
||||
await expect(setImportTargetMethod).rejects.toThrow();
|
||||
});
|
||||
|
||||
it("passing importTarget as null on setImportTarget throws error", async () => {
|
||||
|
@ -206,7 +206,7 @@ describe("ImportService", () => {
|
|||
new Object() as CollectionView,
|
||||
);
|
||||
|
||||
await expect(setImportTargetMethod).rejects.toThrow("Error assigning target folder");
|
||||
await expect(setImportTargetMethod).rejects.toThrow();
|
||||
});
|
||||
|
||||
it("passing importTarget, collectionRelationship has the expected values", async () => {
|
||||
|
|
|
@ -432,7 +432,7 @@ export class ImportService implements ImportServiceAbstraction {
|
|||
|
||||
if (organizationId) {
|
||||
if (!(importTarget instanceof CollectionView)) {
|
||||
throw new Error("Error assigning target collection");
|
||||
throw new Error(this.i18nService.t("errorAssigningTargetCollection"));
|
||||
}
|
||||
|
||||
const noCollectionRelationShips: [number, number][] = [];
|
||||
|
@ -463,7 +463,7 @@ export class ImportService implements ImportServiceAbstraction {
|
|||
}
|
||||
|
||||
if (!(importTarget instanceof FolderView)) {
|
||||
throw new Error("Error assigning target folder");
|
||||
throw new Error(this.i18nService.t("errorAssigningTargetFolder"));
|
||||
}
|
||||
|
||||
const noFolderRelationShips: [number, number][] = [];
|
||||
|
|
Loading…
Reference in New Issue