Skip to content

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

chore: adding test id to dialog's close button, cleaning up strings

Ilian Sapundshiev34259962cfce
diff --git a/app/components/EntryProperties.tsx b/app/components/EntryProperties.tsx
index c5493409c..5dee1000b 100644
--- a/app/components/EntryProperties.tsx
+++ b/app/components/EntryProperties.tsx
@@ -680,7 +680,7 @@ const EntryProperties = (props: Props) => {
color="primary"
onClick={activateEditNameField}
>
- {i18n.t('core:rename')}
+ {i18n.t('core:renameFile')}
</Button>
)}
</div>
diff --git a/app/components/dialogs/DialogCloseButton.tsx b/app/components/dialogs/DialogCloseButton.tsx
index 98c73ab36..ca6b5a05d 100644
--- a/app/components/dialogs/DialogCloseButton.tsx
+++ b/app/components/dialogs/DialogCloseButton.tsx
@@ -23,10 +23,11 @@ import i18n from '-/services/i18n';
interface Props {
onClose: () => void;
+ testId?: string; // id used for user interface test automation
}
const DialogCloseButton = (props: Props) => {
- const { onClose } = props;
+ const { onClose, testId } = props;
return (
<IconButton
title={i18n.t('closeButtonDialog')}
@@ -36,6 +37,7 @@ const DialogCloseButton = (props: Props) => {
right: 5,
top: 5
}}
+ data-tid={testId && testId}
onClick={onClose}
>
<CloseIcon />
diff --git a/app/components/dialogs/OnboardingDialog.tsx b/app/components/dialogs/OnboardingDialog.tsx
index 37a6844ec..be375359d 100644
--- a/app/components/dialogs/OnboardingDialog.tsx
+++ b/app/components/dialogs/OnboardingDialog.tsx
@@ -95,8 +95,7 @@ const OnboardingDialog = (props: Props) => {
scroll="paper"
>
<DialogTitle style={{ justifyContent: 'center', textAlign: 'center' }}>
- Welcome to TagSpaces
- <DialogCloseButton onClose={onClose} />
+ <DialogCloseButton onClose={onClose} testId="closeOnboardingDialog" />
</DialogTitle>
<DialogContent
style={{
@@ -116,7 +115,9 @@ const OnboardingDialog = (props: Props) => {
overflowX: 'hidden'
}}
>
- <Typography variant="h6">&nbsp;</Typography>
+ <Typography variant="h5">
+ {i18n.t('core:welcomeToTagSpaces')}
+ </Typography>
<img
style={{ maxHeight: 300, marginTop: 15 }}
src={NewLook}
diff --git a/app/components/dialogs/RenameEntryDialog.tsx b/app/components/dialogs/RenameEntryDialog.tsx
index caa4950b5..ad3c51883 100644
--- a/app/components/dialogs/RenameEntryDialog.tsx
+++ b/app/components/dialogs/RenameEntryDialog.tsx
@@ -177,7 +177,7 @@ const RenameEntryDialog = (props: Props) => {
}}
>
<DialogTitle>
- {i18n.t('core:' + (isFile ? 'renameFileTitle' : 'renameDirectory'))}
+ {i18n.t('core:' + (isFile ? 'renameFile' : 'renameDirectory'))}
<DialogCloseButton onClose={onClose} />
</DialogTitle>
<DialogContent>
diff --git a/app/locales/en/core.json b/app/locales/en/core.json
index 06502faf7..9c6a4814c 100644
--- a/app/locales/en/core.json
+++ b/app/locales/en/core.json
@@ -11,7 +11,6 @@
"deleteLocationContentAlert": "Do you want to delete the location '{{locationName}}'?",
"deleteLocationTitleAlert": "Delete Location",
"newFileType": "Type",
- "renameFileTitle": "Rename File",
"renameNewFileName": "New Filename",
"selectDialogTitle": "Select Directory",
"selectDialogCurrentPath": "Current Path",
@@ -39,7 +38,6 @@
"createNote": "Create Note",
"createNoteTitle": "Press 'N' to create a note (rich text formatting)",
"createNewDirectoryTitleName": "New Directory Name",
- "renameDirectoryTitle": "Rename Directory",
"deleteDirectoryTitleConfirm": "Confirm Delete Directory",
"deleteDirectoryContentConfirm": "Do you want to delete the directory '{{dirPath}}' ?",
"errorDeletingDirectoryAlert": "Deleting '{{dirPath}}' failed. Directory probably not empty.",
@@ -595,5 +593,7 @@
"useDefaultTaggingType": "Use the default tagging type from the settings",
"tagsInFilenameExplanation": "Use the name of file for saving the tags - Tagging 'photo437.jpg' with a tag 'sunset' will rename it to 'image[sunset].jpg'",
"tagsInSidecarFileExplanation": "Use sidecar file for saving the tags - Tagging 'photo437.jpg' with a tag 'sunset' will save this tag in an additional sidecar file called 'image.jpg.json' located in a sub-folder called '.ts'",
+ "moveFile": "Move",
+ "welcomeToTagSpaces": "Welcome to TagSpaces",
"-": "-"
}