diff --git a/src/calibre/gui2/actions/copy_to_library.py b/src/calibre/gui2/actions/copy_to_library.py index b763c9e8a2..bc53698c5a 100644 --- a/src/calibre/gui2/actions/copy_to_library.py +++ b/src/calibre/gui2/actions/copy_to_library.py @@ -257,7 +257,7 @@ class ChooseLibrary(Dialog): # {{{ def browse(self): d = choose_dir(self, 'choose_library_for_copy', - _('Choose Library')) + _('Choose library')) if d: self.le.setText(d) diff --git a/src/calibre/gui2/preferences/server.py b/src/calibre/gui2/preferences/server.py index 74802ae6b2..64c02e7479 100644 --- a/src/calibre/gui2/preferences/server.py +++ b/src/calibre/gui2/preferences/server.py @@ -758,14 +758,20 @@ class User(QWidget): username, user_data = self.username, self.user_data r = user_data[username]['restriction'] if r['allowed_library_names']: - m = _( - '{} is currently only allowed to access the libraries named: {}' - ).format(username, ', '.join(r['allowed_library_names'])) + libs = r['allowed_library_names'] + m = ngettext( + '{} is currently only allowed to access the library named: {}', + '{} is currently only allowed to access the libraries named: {}', + len(libs) + ).format(username, ', '.join(libs)) b = _('Change the allowed libraries') elif r['blocked_library_names']: - m = _( - '{} is currently not allowed to access the libraries named: {}' - ).format(username, ', '.join(r['blocked_library_names'])) + libs = r['blocked_library_names'] + m = ngettext( + '{} is currently not allowed to access the library named: {}', + '{} is currently not allowed to access the libraries named: {}', + len(libs) + ).format(username, ', '.join(libs)) b = _('Change the blocked libraries') else: m = _('{} is currently allowed access to all libraries') diff --git a/src/calibre/srv/manage_users_cli.py b/src/calibre/srv/manage_users_cli.py index d87c841738..db319232a6 100644 --- a/src/calibre/srv/manage_users_cli.py +++ b/src/calibre/srv/manage_users_cli.py @@ -133,13 +133,19 @@ def manage_users_cli(path=None): if r is None: raise SystemExit('The user {} does not exist'.format(username)) if r['allowed_library_names']: + libs = r['allowed_library_names'] prints( - _('{} is currently only allowed to access the libraries named: {}') - .format(username, ', '.join(r['allowed_library_names']))) + ngettext( + '{} is currently only allowed to access the library named: {}', + '{} is currently only allowed to access the libraries named: {}', + len(libs)).format(username, ', '.join(libs))) if r['blocked_library_names']: + libs = r['blocked_library_names'] prints( - _('{} is currently not allowed to access the libraries named: {}') - .format(username, ', '.join(r['blocked_library_names']))) + ngettext( + '{} is currently not allowed to access the library named: {}', + '{} is currently not allowed to access the libraries named: {}', + len(libs)).format(username, ', '.join(libs))) if r['library_restrictions']: prints( _('{} has the following additional per-library restrictions:')