Skip to content

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

fixing wrong label in tag selection component

Ilian Sapundshievbf493560d214
diff --git a/app/components/EntryProperties.js b/app/components/EntryProperties.js
index 79f755b6b..07596b106 100644
--- a/app/components/EntryProperties.js
+++ b/app/components/EntryProperties.js
@@ -604,7 +604,7 @@ class EntryProperties extends Component<Props, State> {
<div className="grid-item" />
</div>
<TagDropContainer entryPath={path}>
- <TagsSelect isReadOnlyMode={isReadOnlyMode} tags={tags} handleChange={this.handleChange} />
+ <TagsSelect placeholderText={i18n.t('core:dropHere')} isReadOnlyMode={isReadOnlyMode} tags={tags} handleChange={this.handleChange} />
</TagDropContainer>
</div>
@@ -657,12 +657,12 @@ class EntryProperties extends Component<Props, State> {
/>
) : (
<Typography
- style={{
+ style={{
display: 'block',
- padding: 2,
- marginBottom: 5
+ padding: 2,
+ marginBottom: 5
}}
- className={classes.field}
+ className={classes.field}
role="button"
id="descriptionArea"
// placeholder={Pro ? 'Click to add description' : i18n.t('core:addDescription')}
diff --git a/app/components/Search.js b/app/components/Search.js
index fdbad4f29..7b4c045d2 100644
--- a/app/components/Search.js
+++ b/app/components/Search.js
@@ -319,7 +319,7 @@ class Search extends React.Component<Props, State> {
className={classes.formControl}
disabled={indexing}
>
- <TagsSelect tags={this.state.tagsAND} handleChange={this.handleTagFieldChange} tagSearchType={'tagsAND'} />
+ <TagsSelect placeholderText={i18n.t('core:selectTags')} tags={this.state.tagsAND} handleChange={this.handleTagFieldChange} tagSearchType={'tagsAND'} />
</FormControl>
<Typography variant="caption" className={classes.header} style={{ marginTop: 10 }}>
{i18n.t('core:atLeastOneOfTheseTags')}
@@ -328,7 +328,7 @@ class Search extends React.Component<Props, State> {
className={classes.formControl}
disabled={indexing}
>
- <TagsSelect tags={this.state.tagsOR} handleChange={this.handleTagFieldChange} tagSearchType={'tagsOR'} />
+ <TagsSelect placeholderText={i18n.t('core:selectTags')} tags={this.state.tagsOR} handleChange={this.handleTagFieldChange} tagSearchType={'tagsOR'} />
</FormControl>
<Typography variant="caption" className={classes.header} style={{ marginTop: 10 }}>
{i18n.t('core:noneOfTheseTags')}
@@ -337,7 +337,7 @@ class Search extends React.Component<Props, State> {
className={classes.formControl}
disabled={indexing}
>
- <TagsSelect tags={this.state.tagsNOT} handleChange={this.handleTagFieldChange} tagSearchType={'tagsNOT'} />
+ <TagsSelect placeholderText={i18n.t('core:selectTags')} tags={this.state.tagsNOT} handleChange={this.handleTagFieldChange} tagSearchType={'tagsNOT'} />
</FormControl>
<FormControl
className={classes.formControl}
diff --git a/app/components/TagsSelect.js b/app/components/TagsSelect.js
index d8d9ec210..bc87af639 100644
--- a/app/components/TagsSelect.js
+++ b/app/components/TagsSelect.js
@@ -193,7 +193,8 @@ type Props = {
tagSearchType: string,
handleChange: () => void,
allTags: Array<Tag>,
- isReadOnlyMode?: boolean
+ isReadOnlyMode?: boolean,
+ placeholderText: string
};
const TagsSelect = (props: Props) => {
@@ -228,7 +229,8 @@ const TagsSelect = (props: Props) => {
tags,
defaultBackgroundColor,
defaultTextColor,
- isReadOnlyMode = false
+ isReadOnlyMode = false,
+ placeholderText = ''
} = props;
const selectStyles = {
@@ -269,7 +271,7 @@ const TagsSelect = (props: Props) => {
}} */
value={tags}
onChange={handleChange}
- placeholder={i18n.t('core:dropHere')}
+ placeholder={placeholderText}
isMulti
formatCreateLabel={(label) => label}
// isSearchable
diff --git a/app/components/dialogs/AddRemoveTagsDialog.js b/app/components/dialogs/AddRemoveTagsDialog.js
index 1717c9258..fada7fe0e 100644
--- a/app/components/dialogs/AddRemoveTagsDialog.js
+++ b/app/components/dialogs/AddRemoveTagsDialog.js
@@ -116,7 +116,7 @@ class AddRemoveTagsDialog extends React.Component<Props, State> {
)}
renderContent={() => (
<DialogContent style={{ minHeight: 330 }}>
- <TagsSelect tags={newlyAddedTags} handleChange={this.handleChange} />
+ <TagsSelect placeholderText={i18n.t('core:selectTags')} tags={newlyAddedTags} handleChange={this.handleChange} />
<List dense style={{ width: 550 }}>
{selectedEntries.length > 0 && selectedEntries.map((entry) => (
<ListItem title={entry.path}>
diff --git a/app/locales/en/core.json b/app/locales/en/core.json
index 0ce308868..568096c7c 100644
--- a/app/locales/en/core.json
+++ b/app/locales/en/core.json
@@ -447,5 +447,6 @@
"cancelIndexing": "Cancel Indexing",
"getLatestVersionPro": "Please download the latest version from the link in the purchase confirmation email.",
"noFileButFoldersFound": "Some folders found! Turn on the folder visibility from the perspective's toolbar to view them.",
+ "selectTags": "Select tags",
"-": "-"
}