Fix #1879446 [[Enhancement] Change name of Tag editor](https://bugs.launchpad.net/calibre/+bug/1879446)
This commit is contained in:
Kovid Goyal 2020-05-20 06:48:44 +05:30
commit cbb63a5f92
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
2 changed files with 29 additions and 24 deletions

View File

@ -29,10 +29,25 @@ class TagEditor(QDialog, Ui_TagEditor):
self.is_names = fm['display'].get('is_names', False)
if self.is_names:
self.sep = '&'
self.setWindowTitle(_('Edit %s') % fm['name'])
self.setWindowTitle(self.windowTitle() + ': ' + fm['name'])
except Exception:
pass
key = db.field_metadata.key_to_label(key)
else:
self.setWindowTitle(self.windowTitle() + ': ' + db.field_metadata['tags']['name'])
if self.sep == '&':
self.add_tag_input.setToolTip('<p>' +
_('If the item you want is not in the available list, '
'you can add it here. Accepts an ampersand-separated '
'list of items. The item(s) will be applied to '
'the book.') + '</p>')
else:
self.add_tag_input.setToolTip('<p>' +
_('If the item you want is not in the available list, '
'you can add it here. Accepts a comma-separated '
'list of items. The item(s) will be applied to '
'the book.') + '</p>')
self.key = key
self.index = db.row(id_) if id_ is not None else None
if self.index is not None:

View File

@ -11,7 +11,7 @@
</rect>
</property>
<property name="windowTitle">
<string>Tag editor</string>
<string>Manage items</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
@ -38,7 +38,7 @@
<item>
<widget class="QLabel" name="label_3">
<property name="text">
<string>&amp;Add tag:</string>
<string>&amp;Add item:</string>
</property>
<property name="buddy">
<cstring>add_tag_input</cstring>
@ -46,19 +46,12 @@
</widget>
</item>
<item>
<widget class="EnLineEdit" name="add_tag_input">
<property name="toolTip">
<string>If the tag you want is not in the available list, you can add it here. Accepts a comma separated list of tags.</string>
</property>
</widget>
<widget class="EnLineEdit" name="add_tag_input"/>
</item>
<item>
<widget class="QToolButton" name="add_tag_button">
<property name="toolTip">
<string>Add tag to available tags and apply it to current book</string>
</property>
<property name="text">
<string>...</string>
<string>Apply item(s) to the current book</string>
</property>
<property name="icon">
<iconset resource="../../../../resources/images.qrc">
@ -95,7 +88,7 @@
<item row="1" column="0">
<widget class="QLineEdit" name="available_filter_input">
<property name="placeholderText">
<string>Filter the available tags</string>
<string>Filter the available items</string>
</property>
<property name="clearButtonEnabled">
<bool>true</bool>
@ -118,10 +111,10 @@
<item row="3" column="0" colspan="2">
<widget class="QPushButton" name="delete_button">
<property name="toolTip">
<string>Delete tag from database. This will unapply the tag from all books and then remove it from the database.</string>
<string>Delete the item from database. This will unapply the item from all books and then remove it from the database.</string>
</property>
<property name="text">
<string>&amp;Delete tag</string>
<string>&amp;Delete item(s)</string>
</property>
<property name="icon">
<iconset resource="../../../../resources/images.qrc">
@ -132,7 +125,7 @@
<item row="0" column="0" colspan="2">
<widget class="QLabel" name="label">
<property name="text">
<string>Ava&amp;ilable tags</string>
<string>Ava&amp;ilable items</string>
</property>
<property name="buddy">
<cstring>available_tags</cstring>
@ -144,10 +137,7 @@
<item>
<widget class="QToolButton" name="apply_button">
<property name="toolTip">
<string>Apply tag to current book</string>
</property>
<property name="text">
<string>...</string>
<string>Apply item to current book</string>
</property>
<property name="icon">
<iconset resource="../../../../resources/images.qrc">
@ -160,7 +150,7 @@
<item row="1" column="0">
<widget class="QLineEdit" name="applied_filter_input">
<property name="placeholderText">
<string>Filter the applied tags</string>
<string>Filter the applied items</string>
</property>
<property name="clearButtonEnabled">
<bool>true</bool>
@ -183,7 +173,7 @@
<item row="0" column="0" colspan="2">
<widget class="QLabel" name="label_2">
<property name="text">
<string>Applied &amp;tags</string>
<string>Applied &amp;items</string>
</property>
<property name="buddy">
<cstring>applied_tags</cstring>
@ -193,10 +183,10 @@
<item row="3" column="0" colspan="2">
<widget class="QPushButton" name="unapply_button">
<property name="toolTip">
<string>Unapply (remove) tag from current book</string>
<string>Unapply (remove) the item from current book</string>
</property>
<property name="text">
<string>&amp;Unapply tag</string>
<string>&amp;Unapply item(s)</string>
</property>
<property name="icon">
<iconset resource="../../../../resources/images.qrc">