Skip to content

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

chore: updating translations, added draggable paper component

Ilian Sapundshieva791bcba7a85
diff --git a/app/components/DraggablePaper.tsx b/app/components/DraggablePaper.tsx
new file mode 100644
index 000000000..625105cdc
--- /dev/null
+++ b/app/components/DraggablePaper.tsx
@@ -0,0 +1,33 @@
+/**
+ * TagSpaces - universal file and folder organizer
+ * Copyright (C) 2017-present TagSpaces UG (haftungsbeschraenkt)
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License (version 3) as
+ * published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
+ *
+ */
+
+import React from 'react';
+import Paper, { PaperProps } from '@mui/material/Paper';
+import Draggable from 'react-draggable';
+
+function DraggablePaper(props: PaperProps) {
+ return (
+ <Draggable
+ handle="#draggable-dialog-title"
+ cancel={'[class*="MuiDialogContent-root"]'}
+ >
+ <Paper {...props} />
+ </Draggable>
+ );
+}
+export default DraggablePaper;
diff --git a/app/components/dialogs/AboutDialog.tsx b/app/components/dialogs/AboutDialog.tsx
index 4b075b9f7..042027a2f 100644
--- a/app/components/dialogs/AboutDialog.tsx
+++ b/app/components/dialogs/AboutDialog.tsx
@@ -17,9 +17,8 @@
*/
import React, { useState } from 'react';
-import Draggable from 'react-draggable';
import Button from '@mui/material/Button';
-import Paper, { PaperProps } from '@mui/material/Paper';
+import Paper from '@mui/material/Paper';
import Typography from '@mui/material/Typography';
import DialogActions from '@mui/material/DialogActions';
import DialogContent from '@mui/material/DialogContent';
@@ -27,6 +26,7 @@ import DialogTitle from '@mui/material/DialogTitle';
import Tooltip from '-/components/Tooltip';
import Dialog from '@mui/material/Dialog';
import semver from 'semver';
+import DraggablePaper from '-/components/DraggablePaper';
import LogoIcon from '-/assets/images/icon100x100.svg';
import i18n from '-/services/i18n';
import versionMeta from '-/version.json';
@@ -46,17 +46,6 @@ interface Props {
onClose: () => void;
}
-function PaperComponent(props: PaperProps) {
- return (
- <Draggable
- handle="#draggable-dialog-title"
- cancel={'[class*="MuiDialogContent-root"]'}
- >
- <Paper {...props} />
- </Draggable>
- );
-}
-
let buildID = versionMeta.commitId;
if (buildID && buildID.length >= 11) {
buildID = buildID.slice(0, 11);
@@ -131,7 +120,7 @@ function AboutDialog(props: Props) {
fullScreen={fullScreen}
keepMounted
scroll="paper"
- PaperComponent={fullScreen ? Paper : PaperComponent}
+ PaperComponent={fullScreen ? Paper : DraggablePaper}
aria-labelledby="draggable-dialog-title"
>
<DialogTitle style={{ cursor: 'move' }} id="draggable-dialog-title">
diff --git a/app/components/dialogs/RenameEntryDialog.tsx b/app/components/dialogs/RenameEntryDialog.tsx
index af2070224..2100d7c09 100644
--- a/app/components/dialogs/RenameEntryDialog.tsx
+++ b/app/components/dialogs/RenameEntryDialog.tsx
@@ -32,6 +32,7 @@ import {
extractDirectoryName,
extractFileName
} from '@tagspaces/tagspaces-common/paths';
+import DraggablePaper from '-/components/DraggablePaper';
import AppConfig from '-/AppConfig';
import i18n from '-/services/i18n';
import { actions as AppActions, getLastSelectedEntry } from '-/reducers/app';
@@ -154,6 +155,8 @@ function RenameEntryDialog(props: Props) {
onClose={onClose}
keepMounted
scroll="paper"
+ aria-labelledby="draggable-dialog-title"
+ PaperComponent={DraggablePaper}
onKeyDown={event => {
if (event.key === 'Enter' || event.keyCode === 13) {
event.preventDefault();
@@ -164,7 +167,7 @@ function RenameEntryDialog(props: Props) {
}*/
}}
>
- <DialogTitle>
+ <DialogTitle style={{ cursor: 'move' }} id="draggable-dialog-title">
{i18n.t('core:' + (isFile ? 'renameFile' : 'renameDirectory'))}
<DialogCloseButton onClose={onClose} />
</DialogTitle>
@@ -178,7 +181,7 @@ function RenameEntryDialog(props: Props) {
name="entryName"
label={i18n.t(
'core:' +
- (isFile ? 'renameNewFileName' : 'renameDirectoryTitleName')
+ (isFile ? 'renameNewFileName' : 'createNewDirectoryTitleName')
)}
onChange={handleInputChange}
onFocus={onInputFocus}
diff --git a/app/locales/en/core.json b/app/locales/en/core.json
index 9596337d6..44ec9ce5d 100644
--- a/app/locales/en/core.json
+++ b/app/locales/en/core.json
@@ -11,7 +11,7 @@
"deleteLocationContentAlert": "Do you want to delete the location '{{locationName}}'?",
"deleteLocationTitleAlert": "Delete Location",
"renameNewFileName": "New Filename",
- "selectDialogTitle": "Select Directory",
+ "selectDialogTitle": "Select Folder",
"selectDialogCurrentPath": "Current Path",
"editTagTitle": "Edit tag",
"tagOperationTitle": "Tag operation on multiple files",
@@ -20,12 +20,11 @@
"tagOperationAddTag": "Add Tags",
"tagOperationRemoveTag": "Remove Tags",
"tagOperationCleanTags": "Clean All Tags",
- "copyMoveFilesTitle": "Move or Copy File(s)",
- "copyMoveTitle": "Move or Copy",
+ "copyMoveEntriesTitle": "Move or Copy Entries",
"moveCopyToPath": "Target path",
"chooseTargetLocationAndPath": "Choose target location and path",
- "moveFilesButton": "Move File(s)",
- "copyFilesButton": "Copy File(s)",
+ "moveEntriesButton": "Move",
+ "copyEntriesButton": "Copy",
"editTagMasterName": "Name",
"addTagsToGroupTitle": "Add tags to tag group",
"addTagsToGroupTags": "Tags",
@@ -35,15 +34,14 @@
"createTagGroupTitle": "Create Tag Group",
"createTagGroupName": "Tag Group Name",
"fullTextIndexRegenerate": "The search index for this location should be regenerated before performing full text searches. Do you want to start indexing?",
- "createNewDirectoryTitle": "Create New Directory",
- "createNewDirectoryTitleName": "New Directory Name",
- "deleteDirectoryTitleConfirm": "Confirm Delete Directory",
- "deleteDirectoryContentConfirm": "Do you want to delete the directory '{{dirPath}}' ?",
- "errorDeletingDirectoryAlert": "Deleting '{{dirPath}}' failed. Directory probably not empty.",
- "deletingDirectorySuccessfull": "Directory '{{dirPath}}' successfully deleted.",
- "renameDirectoryTitleName": "New directory name",
- "filePropertiesDescription": "Description",
- "directoryPropertiesTitle": "Directory Properties",
+ "createNewDirectoryTitle": "Create New Folder",
+ "createNewDirectoryTitleName": "New Folder Name",
+ "deleteDirectoryTitleConfirm": "Confirm Delete Folder",
+ "deleteDirectoryContentConfirm": "Do you want to delete the folder '{{dirPath}}' ?",
+ "errorDeletingDirectoryAlert": "Deleting '{{dirPath}}' failed. Folder probably not empty.",
+ "deletingDirectorySuccessfull": "Folder '{{dirPath}}' successfully deleted.",
+ "filePropertiesDescription": "Folder",
+ "directoryPropertiesTitle": "Folder Properties",
"createLocationTitle": "Connect a Location",
"createLocation": "New location",
"exportLocationTitle": "Export Location Configuration",
@@ -96,14 +94,14 @@
"deleteDocument": "Delete Document",
"openFileExternally": "Open File Externally",
"openInWindow": "Open in new window",
- "showUnixHiddenFiles": "Show files/directories with a dot(.) in front of the name (e.g. Unix, Linux, OS X hidden files)",
+ "showUnixHiddenFiles": "Show files/folders with a dot(.) in front of the name (e.g. Unix, Linux, OS X hidden files)",
"checkForNewVersionOnStartup": "Check for new version on startup",
"reorderTags": "Enable changing the tag order with drag and drop",
"calculateTag": "Extracts the tags used in the current folder",
"tagDelimiter": "Tag delimiter (e.g. Filename[TAG1_TAG2], _ is the delimiter)",
"prefixTagContainer": "Prefix for the tag container (e.g. in 'Filename_[TAG1].txt', '_' is the prefix)",
"fileNameHelp": "File name should be at least one character long and should not contain the following characters: # / \\ : * ? \" < > |",
- "directoryNameHelp": "Directory name should be at least one character long and should not contain the following characters: # / \\ : * ? \" < > |",
+ "directoryNameHelp": "Folder name should be at least one character long and should not contain the following characters: # / \\ : * ? \" < > |",
"exportTagGroupsButton": "Export Tag Library",
"showMainMenu": "Show main menu (restart needed)",
"useDefaultLocation": "Use default location as a startup location",
@@ -125,7 +123,7 @@
"interfaceLanguage": "Interface Language",
"loadLocationMetaData": "Loads location meta data (currently only tag groups)",
"useSearchInSubfolders": "Search in sub-folders by default",
- "watchCurrentDirectory": "Watch current directory for changes",
+ "watchCurrentDirectory": "Watch current folder for changes",
"createEditDateTitle": "Create/Edit Date",
"editDateTag": "Edit Date",
"dateTimeTab": "Date Time",
@@ -154,7 +152,7 @@
"renameFile": "Rename File",
"newFileName": "New File Name",
"moveCopyFile": "Move / Copy File",
- "moveCopyDirectory": "Move / Copy Directory",
+ "moveCopyDirectory": "Move / Copy Folder",
"duplicateFile": "Duplicate File",
"deleteEntry": "Delete",
"reloadFile": "Reload File",
@@ -186,10 +184,10 @@
"toggleTagGroup": "Toggle Tag Group",
"deleteTagGroup": "Delete Tag Group",
"sortTagGroup": "Sort Tag Group",
- "reloadDirectory": "Reload Directory",
- "newSubdirectory": "New Subdirectory",
- "openParentDirectory": "Open Parent Directory",
- "openDirectory": "Open Directory",
+ "reloadDirectory": "Reload Folder",
+ "newSubdirectory": "New Subfolder",
+ "openParentDirectory": "Open Parent Folder",
+ "openDirectory": "Open Folder",
"aboutTagSpaces": "About TagSpaces",
"startingHints": "Starting Tips",
"whatsNew": "What's New",
@@ -207,9 +205,9 @@
"perspectiveManager": "Perspective Manager",
"noSubfoldersFound": "No subfolders found",
"editLocation": "Edit Location",
- "toggleDirectory": "Toggle Directory",
- "renameDirectory": "Rename Directory",
- "deleteDirectory": "Delete Directory",
+ "toggleDirectory": "Toggle Folder",
+ "renameDirectory": "Rename Folder",
+ "deleteDirectory": "Delete Folder",
"showDevTools": "Show Developer Tools",
"toggleFullScreen": "Toggle Fullscreen",
"reloadApplication": "Reload Application",
@@ -264,7 +262,7 @@
"createMarkdown": "Create Markdown File",
"createMarkdownTitle": "Use to create a digital note or just a text file with simple formatting.",
"createRichTextFile": "Create HTML File",
- "createDirectory": "New Directory",
+ "createDirectory": "New Folder",
"addFiles": "Add Files",
"addFilesTitle": "Add or upload files from your computer.",
"exitApp": "Exit",
@@ -287,7 +285,7 @@
"fileSize": "Size",
"fileLDTM": "Date Modified",
"random": "Random",
- "fileDirectory": "Directory",
+ "fileDirectory": "Folder",
"fileFirstTag": "First Tag",
"filePath": "Path",
"fileName": "File Name",
@@ -336,11 +334,11 @@
"toggleProperties": "Toggle properties",
"switchToFullscreen": "Switch to fullscreen",
"openInFullWidth": "Open in full width",
- "openDirectoryExternally": "Open directory externally",
+ "openDirectoryExternally": "Open Folder Externally",
"toggleEntryProperties": "Toggle entry properties",
"closeEntry": "Close entry",
"saveFileBeforeClosingFile": "Do you want to save the changes before closing the file?",
- "openDirectoryMenu": "Open directory menu",
+ "openDirectoryMenu": "Open folder menu",
"pleaseOpenLocation": "Please open location",
"thisIsStartupLocation": "This is the startup location",
"thisFunctionalityIsAvailableInPro": "This functionality is available in the PRO version",
@@ -371,7 +369,7 @@
"toggleSelectAllFiles": "Toggle Select All Files",
"entryDescription": "Entry description",
"noEntrySelected": "No entry selected",
- "navigateToParentDirectory": "Navigate to parent directory",
+ "navigateToParentDirectory": "Navigate to parent folder",
"switchToGridView": "Switch to grid view",
"switchToListView": "Switch to list view",
"tagSelectedEntries": "Tag selected entries",
@@ -418,7 +416,7 @@
"upgradeToPro": "See what's in the PRO version",
"locationType": "Type",
"firstOpenaFolder": "Please first open a folder!",
- "errorLoadingFolder": "Error loading directory",
+ "errorLoadingFolder": "Error loading folder",
"fileCreateSuccessfully": "File create successfully",
"errorCreatingFile": "Error creating file",
"connectedtoObjectStore": "Connected to object storage",
@@ -457,7 +455,7 @@
"noneOfTheseTags": "None of these tags",
"collectTagsFromLocation": "Collect Tags From Current Location",
"collectTagsFromLocationTitle": "Collects all tags found on files or folders in the current location",
- "searchCurrentFolderWithSubFolders": "Search in the current folder including sub folders",
+ "searchCurrentFolderWithSubFolders": "Search in the current folder including subfolders",
"searchInAllLocationTooltip": "Search globally in all locations",
"searchInAllLocations": "Search in all locations",
"dndDisabledReadOnlyMode": "Importing files is disabled because the location is in read-only mode.",
@@ -614,7 +612,7 @@
"addTileServersHelp": "Further map tile servers can be found in the OpenStreetMap documentation",
"addTileServersSettings": "In order to see the map, add at least one map tile server in the settings of the app",
"showFolderMapControl": "Show folders on the map",
- "noSubFoldersFound": "No sub folders in the current folder",
+ "noSubFoldersFound": "No subfolders in the current folder",
"fileTaggingSetting": "File tagging method",
"defaultSetting": "Default",
"ignorePatterns": "Ignore patterns",
@@ -676,7 +674,7 @@
"currentLocation": "Current Location",
"navigateTo": "Navigate to",
"searchScope": "Search Scope",
- "clickToExpand": "Click to load sub folders",
+ "clickToExpand": "Click to load subfolders",
"exifGeo": "Import EXIF latitude and longitude as geo-tag",
"exifDateTime": "Import EXIF image shooting date and times as date tag",
"iptcDescription": "Import IPTC description as file description",
@@ -713,14 +711,14 @@
"changeBackgroundImage": "Change Background Image",
"noItems": "No items found",
"notAvailable": "Not available",
- "counting": "counting...",
+ "counting": "counting",
"clearBackground": "Clear background image",
"password": "Password",
"userAccount": "User Account",
"save": "Save",
"importKanbanBoard": "Import Kanban Board",
"clearEditor": "Clear editor",
- "folderVisibilityMenu": "Toggle visibility of sub folders",
+ "folderVisibilityMenu": "Toggle visibility of subfolders",
"showCurrentFolderContent": "Show content of the current folder",
"hide": "Hide",
"show": "Show",
@@ -772,8 +770,8 @@
"noSuitableLocation": "Files or folders can't be created. No suitable location found!",
"openEntry": "Open entry",
"openSearch": "Open search",
- "copyingDirsFailed": "Copying Dirs Failed",
- "directories": "Directories",
+ "copyingFoldersFailed": "Copying folders failed",
+ "directories": "Folders",
"files": "Files",
"-": "-"
}
diff --git a/app/reducers/io-actions.ts b/app/reducers/io-actions.ts
index 9f3054a69..611735540 100644
--- a/app/reducers/io-actions.ts
+++ b/app/reducers/io-actions.ts
@@ -96,7 +96,7 @@ const actions = {
.catch(err => {
console.warn('Moving dirs failed ', err);
dispatch(
- AppActions.showNotification(i18n.t('core:copyingDirsFailed'))
+ AppActions.showNotification(i18n.t('core:copyingFoldersFailed'))
);
});
});
@@ -214,7 +214,7 @@ const actions = {
.catch(err => {
console.warn('Copy dirs failed ', err);
dispatch(
- AppActions.showNotification(i18n.t('core:copyingDirsFailed'))
+ AppActions.showNotification(i18n.t('core:copyingFoldersFailed'))
);
});
});
diff --git a/app/services/i18n.ts b/app/services/i18n.ts
index 3ac47723a..824ae98d6 100644
--- a/app/services/i18n.ts
+++ b/app/services/i18n.ts
@@ -22,7 +22,7 @@ import LanguageDetector from 'i18next-browser-languagedetector';
import enUs from '../locales/en_US/core.json';
import en from '../locales/en/core.json';
-let defaultLanguage = enUs;
+let defaultLanguage: any = enUs;
if (
typeof process !== 'undefined' &&
process.env &&