Skip to content

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

chore: extracting strings in core.ts

Ilian Sapundshiev8f8dbbabd24e
diff --git a/app/components/dialogs/CreateEditLocationDialog.tsx b/app/components/dialogs/CreateEditLocationDialog.tsx
index 2c2a15a34..d4bd9ab61 100644
--- a/app/components/dialogs/CreateEditLocationDialog.tsx
+++ b/app/components/dialogs/CreateEditLocationDialog.tsx
@@ -586,7 +586,9 @@ const CreateEditLocationDialog = (props: Props) => {
style={{ justifyContent: 'space-between' }}
control={
<Button size="small" variant="outlined" disabled>
- {currentTagsSetting ? 'Use Sidecar Files' : 'Rename Files'}
+ {currentTagsSetting
+ ? i18n.t('core:useSidecarFile')
+ : i18n.t('core:renameFile')}
</Button>
}
label={
@@ -615,11 +617,11 @@ const CreateEditLocationDialog = (props: Props) => {
arrow
title={
<Typography color="inherit">
- Use the default settings for saving the tags:{' '}
+ {i18n.t('core:useDefaultTaggingType')}:{' '}
<b>
{currentTagsSetting
- ? 'Use Sidecar Files'
- : 'Rename Files'}
+ ? i18n.t('core:useSidecarFile')
+ : i18n.t('core:renameFile')}
</b>
</Typography>
}
@@ -639,16 +641,14 @@ const CreateEditLocationDialog = (props: Props) => {
arrow
title={
<Typography color="inherit">
- Use the name of file for saving the tags - Tagging the
- file <b>image.jpg</b> with a tag <b>sunset</b> will
- rename it to <b>image[sunset].jpg</b>
+ {i18n.t('core:tagsInFilenameExplanation')}
</Typography>
}
>
<div style={{ display: 'flex' }}>
{persistTagsInSidecarFile !== null &&
!persistTagsInSidecarFile && <CheckIcon />}
- &nbsp;Rename Files&nbsp;&nbsp;
+ &nbsp;{i18n.t('core:renameFile')}&nbsp;&nbsp;
</div>
</Tooltip>
</ToggleButton>
@@ -661,18 +661,14 @@ const CreateEditLocationDialog = (props: Props) => {
arrow
title={
<Typography color="inherit">
- Use sidecar file for saving the tags - Tagging the
- file <b>image.jpg</b> with a tag <b>sunset</b> will
- save this tag in an additional sidecar file called{' '}
- <b>image.jpg.json</b> located in a sub folder with the
- name <b>.ts</b>
+ {i18n.t('core:tagsInSidecarFileExplanation')}
</Typography>
}
>
<div style={{ display: 'flex' }}>
{persistTagsInSidecarFile !== null &&
persistTagsInSidecarFile && <CheckIcon />}
- &nbsp;Use Sidecar Files&nbsp;&nbsp;
+ &nbsp;{i18n.t('core:useSidecarFile')}&nbsp;&nbsp;
</div>
</Tooltip>
</ToggleButton>
diff --git a/app/components/dialogs/settings/SettingsGeneral.tsx b/app/components/dialogs/settings/SettingsGeneral.tsx
index 3e1e9059e..cf04bb01d 100644
--- a/app/components/dialogs/settings/SettingsGeneral.tsx
+++ b/app/components/dialogs/settings/SettingsGeneral.tsx
@@ -152,14 +152,16 @@ const SettingsGeneral = (props: Props) => {
className={classes.listItem}
title={
AppConfig.useSidecarsForFileTaggingDisableSetting
- ? 'This setting is managed with an external configuration'
+ ? i18n.t('core:settingExternallyConfigured')
: ''
}
>
<ListItemText primary={i18n.t('core:fileTaggingSetting')} />
{AppConfig.useSidecarsForFileTaggingDisableSetting ? (
<Button size="small" variant="outlined" disabled>
- {persistTagsInSidecarFile ? 'Use Sidecar Files' : 'Rename Files'}
+ {persistTagsInSidecarFile
+ ? i18n.t('core:useSidecarFile')
+ : i18n.t('core:renameFile')}
</Button>
) : (
<ToggleButtonGroup
@@ -176,15 +178,13 @@ const SettingsGeneral = (props: Props) => {
arrow
title={
<Typography color="inherit">
- Use the name of file for saving the tags - Tagging the
- file <b>image.jpg</b> with a tag <b>sunset</b> will rename
- it to <b>image[sunset].jpg</b>
+ {i18n.t('core:tagsInFilenameExplanation')}
</Typography>
}
>
<div style={{ display: 'flex' }}>
{!persistTagsInSidecarFile && <CheckIcon />}
- &nbsp;Rename Files&nbsp;&nbsp;
+ &nbsp;{i18n.t('core:renameFile')}&nbsp;&nbsp;
<InfoIcon />
</div>
</Tooltip>
@@ -198,17 +198,13 @@ const SettingsGeneral = (props: Props) => {
arrow
title={
<Typography color="inherit">
- Use sidecar file for saving the tags - Tagging the file{' '}
- <b>image.jpg</b> with a tag <b>sunset</b> will save this
- tag in an additional sidecar file called{' '}
- <b>image.jpg.json</b> located in a sub folder with the
- name <b>.ts</b>
+ {i18n.t('core:tagsInSidecarFileExplanation')}
</Typography>
}
>
<div style={{ display: 'flex' }}>
{persistTagsInSidecarFile && <CheckIcon />}
- &nbsp;Use Sidecar Files&nbsp;&nbsp;
+ &nbsp;{i18n.t('core:useSidecarFile')}&nbsp;&nbsp;
<InfoIcon />
</div>
</Tooltip>
diff --git a/app/locales/en/core.json b/app/locales/en/core.json
index d7625933f..06502faf7 100644
--- a/app/locales/en/core.json
+++ b/app/locales/en/core.json
@@ -590,5 +590,10 @@
"folderName": "Folder Name",
"editDescription": "Edit Description",
"clearFolderColor": "Clears the color of this folder",
+ "settingExternallyConfigured": "This setting is configured externally",
+ "useSidecarFile": "Use Sidecar File",
+ "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'",
"-": "-"
}