String changes

This commit is contained in:
Kovid Goyal 2017-06-23 12:13:55 +05:30
parent d12de473cb
commit 96bc0e6a6f
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
7 changed files with 38 additions and 38 deletions

View File

@ -534,9 +534,9 @@ The first click on an item will restrict the list of books to those that contain
Items in the Tag browser have their icons partially colored. The amount of color depends on the average rating of the books in that category. So for example if the books by Isaac Asimov have an average of four stars, the icon for Isaac Asimov in the Tag browser will be 4/5th colored. You can hover your mouse over the icon to see the average rating.
The outer-level items in the :guilabel:`Tag browser`, such as Authors and Series, are called categories. You can create your own categories, called :guilabel:`User categories`, which are useful for organizing items. For example, you can use the :guilabel:`User categories editor` (click the :guilabel:`Configure` button at the lower-left of the :guilabel:`Tag browser` and choose :guilabel:`Manage authors, series, etc->User categories`) to create a user category called Favorite Authors, then put the items for your favorites into the category. User categories can have sub-categories. For example, the user category Favorites.Authors is a sub-category of Favorites. You might also have Favorites.Series, in which case there will be two sub-categories under Favorites. Sub-categories can be created by right-clicking on a user category, choosing :guilabel:`Add sub-category to...`, and entering the sub-category name; or by using the :guilabel:`User categories editor` by entering names like the Favorites example above.
The outer-level items in the :guilabel:`Tag browser`, such as Authors and Series, are called categories. You can create your own categories, called :guilabel:`User categories`, which are useful for organizing items. For example, you can use the :guilabel:`User categories editor` (click the :guilabel:`Configure` button at the lower-left of the :guilabel:`Tag browser` and choose :guilabel:`Manage authors, series, etc->User categories`) to create a User category called ``Favorite Authors``, then put the items for your favorites into the category. User categories can have sub-categories. For example, the User category ``Favorites.Authors`` is a sub-category of ``Favorites``. You might also have ``Favorites.Series``, in which case there will be two sub-categories under ``Favorites``. Sub-categories can be created by right-clicking on a User category, choosing :guilabel:`Add sub-category to...`, and entering the sub-category name; or by using the :guilabel:`User categories editor` by entering names like the Favorites example above.
You can search user categories in the same way as built-in categories, by clicking on them. There are four different searches cycled through by clicking:
You can search User categories in the same way as built-in categories, by clicking on them. There are four different searches cycled through by clicking:
1. "everything matching an item in the category" indicated by a single green plus sign.
2. "everything matching an item in the category or its sub-categories" indicated by two green plus signs.
3. "everything not matching an item in the category" shown by a single red minus sign.
@ -544,9 +544,9 @@ You can search user categories in the same way as built-in categories, by clicki
It is also possible to create hierarchies inside some of the text categories such as tags, series, and custom columns. These hierarchies show with the small triangle, permitting the sub-items to be hidden. To use hierarchies of items in a category, you must first go to :guilabel:`Preferences->Interface->Look & feel` and enter the category name(s) into the "Categories with hierarchical items" box. Once this is done, items in that category that contain periods will be shown using the small triangle. For example, assume you create a custom column called "Genre" and indicate that it contains hierarchical items. Once done, items such as Mystery.Thriller and Mystery.English will display as Mystery with the small triangle next to it. Clicking on the triangle will show Thriller and English as sub-items. See :ref:`Managing subgroups of books, for example "genre" <subgroups-tutorial>` for more information.
Hierarchical items (items with children) use the same four 'click-on' searches as user categories. Items that do not have children use two of the searches: "everything matching" and "everything not matching".
Hierarchical items (items with children) use the same four 'click-on' searches as User categories. Items that do not have children use two of the searches: "everything matching" and "everything not matching".
You can drag and drop items in the Tag browser onto user categories to add them to that category. If the source is a user category, holding the shift key while dragging will move the item to the new category. You can also drag and drop books from the book list onto items in the Tag browser; dropping a book on an item causes that item to be automatically applied to the dropped books. For example, dragging a book onto Isaac Asimov will set the author of that book to Isaac Asimov. Dropping it onto the tag History will add the tag History to the book's tags.
You can drag and drop items in the Tag browser onto User categories to add them to that category. If the source is a User category, holding the shift key while dragging will move the item to the new category. You can also drag and drop books from the book list onto items in the Tag browser; dropping a book on an item causes that item to be automatically applied to the dropped books. For example, dragging a book onto Isaac Asimov will set the author of that book to Isaac Asimov. Dropping it onto the tag History will add the tag History to the book's tags.
You can easily find any item in the Tag browser by clicking the search button at the lower-right corner. In addition, you can right click on any item and choose one of several operations. Some examples are to hide it, rename it, or open a "Manage x" dialog that allows you to manage items of that kind. For example, the "Manage Authors" dialog allows you to rename authors and control how their names are sorted.

View File

@ -81,7 +81,7 @@ class CheckLibraryDialog(QDialog):
QDialog.__init__(self, parent)
self.db = db
self.setWindowTitle(_('Check library -- Problems Found'))
self.setWindowTitle(_('Check library -- Problems found'))
self.setWindowIcon(QIcon(I('debug.png')))
self._tl = QHBoxLayout()

View File

@ -981,7 +981,7 @@ see the counts by hovering your mouse over any item.</string>
<item row="4" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>&amp;Padding between items:</string>
<string>&amp;Spacing between items:</string>
</property>
<property name="buddy">
<cstring>opt_tag_browser_item_padding</cstring>

View File

@ -48,15 +48,15 @@ class ConfigWidget(ConfigWidgetBase, Ui_Form):
"to search in the value box, then push the Save button. "
"<p>Note: Search terms are forced to lower case; <code>MySearch</code> "
"and <code>mysearch</code> are the same term."
"<p>You can have your grouped search term show up as user categories in "
"<p>You can have your grouped search term show up as User categories in "
" the Tag browser. Just add the grouped search term names to the Make user "
"categories from box. You can add multiple terms separated by commas. "
"The new user category will be automatically "
"The new User category will be automatically "
"populated with all the items in the categories included in the grouped "
"search term. <p>Automatic user categories permit you to see easily "
"search term. <p>Automatic User categories permit you to see easily "
"all the category items that "
"are in the columns contained in the grouped search term. Using the above "
"<code>allseries</code> example, the automatically-generated user category "
"<code>allseries</code> example, the automatically-generated User category "
"will contain all the series mentioned in <code>series</code>, "
"<code>#myseries</code>, and <code>#myseries2</code>. This "
"can be useful to check for duplicates, to find which column contains "
@ -154,7 +154,7 @@ class ConfigWidget(ConfigWidgetBase, Ui_Form):
show=True)
if name in [icu_lower(p) for p in self.db.prefs.get('user_categories', {})]:
return error_dialog(self.gui, _('Grouped search terms'),
_('That name is already used for user category'),
_('That name is already used for User category'),
show=True)
val = [v.strip() for v in unicode(self.gst_value.text()).split(',') if v.strip()]

View File

@ -401,7 +401,7 @@ class TagsModel(QAbstractItemModel): # {{{
self.user_category_node_tree = {}
# We build the node tree including categories that might later not be
# displayed because their items might be in user categories. The resulting
# displayed because their items might be in User categories. The resulting
# nodes will be reordered later.
for i, key in enumerate(self.categories):
is_gst = False
@ -605,8 +605,8 @@ class TagsModel(QAbstractItemModel): # {{{
node_parent = category
# category display order is important here. The following works
# only if all the non-user categories are displayed before the
# user categories
# only if all the non-User categories are displayed before the
# User categories
if category_is_hierarchical or tag.is_hierarchical:
components = get_name_components(tag.original_name)
else:
@ -673,7 +673,7 @@ class TagsModel(QAbstractItemModel): # {{{
# }}}
# Build the entire node tree. Note that category_nodes is in field
# metadata order so the user categories will be at the end
# metadata order so the User categories will be at the end
with self.db.new_api.safe_read_lock: # needed as we read from book_value_map
for category in self.category_nodes:
process_one_node(category, collapse_model, self.db.new_api.fields['rating'].book_value_map,
@ -785,7 +785,7 @@ class TagsModel(QAbstractItemModel): # {{{
copied = False
src_name = idx.tag.original_name
src_cat = idx.tag.category
# delete the item if the source is a user category and action is move
# delete the item if the source is a User category and action is move
if is_uc and not src_parent_is_gst and src_parent in user_cats and \
action == Qt.MoveAction:
new_cat = []
@ -797,7 +797,7 @@ class TagsModel(QAbstractItemModel): # {{{
else:
copied = True
# Now add the item to the destination user category
# Now add the item to the destination User category
add_it = True
if not is_uc and src_cat == 'news':
src_cat = 'tags'
@ -1074,9 +1074,9 @@ class TagsModel(QAbstractItemModel): # {{{
item = self.get_node(index)
if item.type == TagTreeItem.CATEGORY and item.category_key.startswith('@'):
if val.find('.') >= 0:
error_dialog(self.gui_parent, _('Rename user category'),
error_dialog(self.gui_parent, _('Rename User category'),
_('You cannot use periods in the name when '
'renaming user categories'), show=True)
'renaming User categories'), show=True)
return False
user_cats = self.db.prefs.get('user_categories', {})
@ -1099,7 +1099,7 @@ class TagsModel(QAbstractItemModel): # {{{
if len(c) == len(ckey):
if strcmp(ckey, nkey) != 0 and \
nkey_lower in user_cat_keys_lower:
error_dialog(self.gui_parent, _('Rename user category'),
error_dialog(self.gui_parent, _('Rename User category'),
_('The name %s is already used')%nkey, show=True)
return False
user_cats[nkey] = user_cats[ckey]
@ -1108,7 +1108,7 @@ class TagsModel(QAbstractItemModel): # {{{
rest = c[len(ckey):]
if strcmp(ckey, nkey) != 0 and \
icu_lower(nkey + rest) in user_cat_keys_lower:
error_dialog(self.gui_parent, _('Rename user category'),
error_dialog(self.gui_parent, _('Rename User category'),
_('The name %s is already used')%(nkey+rest), show=True)
return False
user_cats[nkey + rest] = user_cats[ckey + rest]
@ -1151,7 +1151,7 @@ class TagsModel(QAbstractItemModel): # {{{
def rename_item_in_all_user_categories(self, item_name, item_category, new_name):
'''
Search all user categories for items named item_name with category
Search all User categories for items named item_name with category
item_category and rename them to new_name. The caller must arrange to
redisplay the tree as appropriate.
'''
@ -1168,7 +1168,7 @@ class TagsModel(QAbstractItemModel): # {{{
def delete_item_from_all_user_categories(self, item_name, item_category):
'''
Search all user categories for items named item_name with category
Search all User categories for items named item_name with category
item_category and delete them. The caller must arrange to redisplay the
tree as appropriate.
'''
@ -1351,7 +1351,7 @@ class TagsModel(QAbstractItemModel): # {{{
# not shared, which can lead to the possibility of searching twice for
# the same tag. The tags_seen set helps us prevent that
tags_seen = set()
# Tag nodes are in their own category and possibly in user categories.
# Tag nodes are in their own category and possibly in User categories.
# They will be 'checked' in both places, but we want to put the node
# into the search string only once. The nodes_seen set helps us do that
nodes_seen = set()

View File

@ -135,7 +135,7 @@ class TagBrowserMixin(object): # {{{
def do_edit_user_categories(self, on_category=None):
'''
Open the user categories editor.
Open the User categories editor.
'''
db = self.library_view.model().db
d = TagCategories(self, db, on_category,
@ -151,7 +151,7 @@ class TagBrowserMixin(object): # {{{
def do_delete_user_category(self, category_name):
'''
Delete the user category named category_name. Any leading '@' is removed
Delete the User category named category_name. Any leading '@' is removed
'''
if category_name.startswith('@'):
category_name = category_name[1:]
@ -167,10 +167,10 @@ class TagBrowserMixin(object): # {{{
elif k.startswith(category_name + '.'):
has_children = True
if not found:
return error_dialog(self.tags_view, _('Delete user category'),
_('%s is not a user category')%category_name, show=True)
return error_dialog(self.tags_view, _('Delete User category'),
_('%s is not a User category')%category_name, show=True)
if has_children:
if not question_dialog(self.tags_view, _('Delete user category'),
if not question_dialog(self.tags_view, _('Delete User category'),
_('%s contains items. Do you really '
'want to delete it?')%category_name):
return
@ -185,7 +185,7 @@ class TagBrowserMixin(object): # {{{
def do_del_item_from_user_cat(self, user_cat, item_name, item_category):
'''
Delete the item (item_name, item_category) from the user category with
Delete the item (item_name, item_category) from the User category with
key user_cat. Any leading '@' characters are removed
'''
if user_cat.startswith('@'):
@ -204,7 +204,7 @@ class TagBrowserMixin(object): # {{{
def do_add_item_to_user_cat(self, dest_category, src_name, src_category):
'''
Add the item src_name in src_category to the user category
Add the item src_name in src_category to the User category
dest_category. Any leading '@' is removed
'''
db = self.library_view.model().db
@ -214,10 +214,10 @@ class TagBrowserMixin(object): # {{{
dest_category = dest_category[1:]
if dest_category not in user_cats:
return error_dialog(self.tags_view, _('Add to user category'),
_('A user category %s does not exist')%dest_category, show=True)
return error_dialog(self.tags_view, _('Add to User category'),
_('A User category %s does not exist')%dest_category, show=True)
# Now add the item to the destination user category
# Now add the item to the destination User category
add_it = True
if src_category == 'news':
src_category = 'tags'

View File

@ -541,9 +541,9 @@ class TagsView(QTreeView): # {{{
action='edit_author_link', index=tag.id))
# is_editable is also overloaded to mean 'can be added
# to a user category'
# to a User category'
m = self.context_menu.addMenu(self.user_category_icon,
_('Add %s to user category')%display_name(tag))
_('Add %s to User category')%display_name(tag))
nt = self.model().user_category_node_tree
def add_node_tree(tree_dict, m, path):
@ -601,7 +601,7 @@ class TagsView(QTreeView): # {{{
partial(self.context_menu_handler,
action='add_subcategory', key=key))
self.context_menu.addAction(self.delete_icon,
_('Delete user category %s')%item.py_name,
_('Delete User category %s')%item.py_name,
partial(self.context_menu_handler,
action='delete_user_category', key=key))
self.context_menu.addSeparator()
@ -654,7 +654,7 @@ class TagsView(QTreeView): # {{{
self.context_menu.addAction(_('Restore default icon'),
partial(self.context_menu_handler, action='clear_icon', key=key))
# Always show the user categories editor
# Always show the User categories editor
self.context_menu.addSeparator()
if key.startswith('@') and \
key[1:] in self.db.prefs.get('user_categories', {}).keys():