Skip to content

TagSpaces is an offline, open source, document manager with tagging support

chore: improving notification on failed folder moving

Ilian Sapundshiev5998ab83419a
diff --git a/src/renderer/hooks/IOActionsContextProvider.tsx b/src/renderer/hooks/IOActionsContextProvider.tsx
index 82edc5dc1..43c80b6be 100644
--- a/src/renderer/hooks/IOActionsContextProvider.tsx
+++ b/src/renderer/hooks/IOActionsContextProvider.tsx
@@ -662,7 +662,13 @@ export const IOActionsContextProvider = ({
}
}
if (actions.length !== settled.length) {
- showNotification(t('core:copyingFoldersFailed'));
+ showNotification(
+ t(
+ mode === 'move'
+ ? 'core:movingFoldersFailed'
+ : 'core:copyingFoldersFailed',
+ ),
+ );
}
// If onProgress was wired, the dialog already shows in-flight rows.
// If not, mirror the previous behavior of emitting a final 100/0 list
@@ -815,18 +821,18 @@ export const IOActionsContextProvider = ({
});
} else {
showNotification(
- t('core:copyingFilesFailed') + ' ' + moveError.message,
+ t('core:movingFilesFailed') + ' ' + moveError.message,
);
return false;
}
} else {
- showNotification(t('core:copyingFilesFailed'));
+ showNotification(t('core:movingFilesFailed'));
return false;
}
})
.catch((err) => {
console.log('Moving files failed with ' + err);
- showNotification(t('core:copyingFilesFailed'));
+ showNotification(t('core:movingFilesFailed'));
return false;
});
}
diff --git a/src/renderer/locales/en/core.json b/src/renderer/locales/en/core.json
index ac2fecc44..89b4cbfcb 100644
--- a/src/renderer/locales/en/core.json
+++ b/src/renderer/locales/en/core.json
@@ -454,6 +454,7 @@
"renamingSuccessfully": "Renaming successfully.",
"loadingOrGeneratingThumbnails": "Loading or generating thumbnails...",
"copyingFilesFailed": "Copying files failed",
+ "movingFilesFailed": "Moving files failed",
"filesMovedSuccessful": "Files moved successful",
"filesCopiedSuccessful": "Files copied successful",
"searching": "Searching",
@@ -787,6 +788,7 @@
"openEntry": "Open entry",
"openSearch": "Open search",
"copyingFoldersFailed": "Copying folders failed",
+ "movingFoldersFailed": "Moving folders failed",
"directories": "Folders",
"files": "Files",
"errorCORS": "The URL can not be access, CORS error",