From c4104ddaf4982cbfb4008fa945d9cec127b96a56 Mon Sep 17 00:00:00 2001 From: Kian-Meng Ang Date: Fri, 1 Jul 2022 21:26:06 +0800 Subject: [PATCH] Fix typos --- cps/cli.py | 2 +- cps/helper.py | 4 ++-- cps/kobo.py | 4 ++-- cps/remotelogin.py | 2 +- cps/shelf.py | 2 +- cps/ub.py | 4 ++-- cps/web.py | 2 +- 7 files changed, 10 insertions(+), 10 deletions(-) diff --git a/cps/cli.py b/cps/cli.py index 5896c7fe..6f58dcc4 100644 --- a/cps/cli.py +++ b/cps/cli.py @@ -29,7 +29,7 @@ from .constants import DEFAULT_SETTINGS_FILE, DEFAULT_GDRIVE_FILE def version_info(): if _NIGHTLY_VERSION[1].startswith('$Format'): - return "Calibre-Web version: %s - unkown git-clone" % _STABLE_VERSION['version'] + return "Calibre-Web version: %s - unknown git-clone" % _STABLE_VERSION['version'] return "Calibre-Web version: %s -%s" % (_STABLE_VERSION['version'], _NIGHTLY_VERSION[1]) diff --git a/cps/helper.py b/cps/helper.py index d40ffc33..99c37e16 100755 --- a/cps/helper.py +++ b/cps/helper.py @@ -121,7 +121,7 @@ def send_registration_mail(e_mail, user_name, default_password, resend=False): txt = "Hello %s!\r\n" % user_name if not resend: txt += "Your new account at Calibre-Web has been created. Thanks for joining us!\r\n" - txt += "Please log in to your account using the following informations:\r\n" + txt += "Please log in to your account using the following information:\r\n" txt += "User name: %s\r\n" % user_name txt += "Password: %s\r\n" % default_password txt += "Don't forget to change your password after first login.\r\n" @@ -940,7 +940,7 @@ def check_unrar(unrar_location): except (OSError, UnicodeDecodeError) as err: log.error_or_exception(err) - return _('Error excecuting UnRar') + return _('Error executing UnRar') def json_serial(obj): diff --git a/cps/kobo.py b/cps/kobo.py index 46e68acb..c379e9a2 100644 --- a/cps/kobo.py +++ b/cps/kobo.py @@ -155,7 +155,7 @@ def HandleSyncRequest(): new_archived_last_modified = datetime.datetime.min sync_results = [] - # We reload the book database so that the user get's a fresh view of the library + # We reload the book database so that the user gets a fresh view of the library # in case of external changes (e.g: adding a book through Calibre). calibre_db.reconnect_db(config, ub.app_DB_path) @@ -508,7 +508,7 @@ def get_metadata(book): @requires_kobo_auth # Creates a Shelf with the given items, and returns the shelf's uuid. def HandleTagCreate(): - # catch delete requests, otherwise the are handeld in the book delete handler + # catch delete requests, otherwise the are handled in the book delete handler if request.method == "DELETE": abort(405) name, items = None, None diff --git a/cps/remotelogin.py b/cps/remotelogin.py index ea613c29..037979ea 100644 --- a/cps/remotelogin.py +++ b/cps/remotelogin.py @@ -126,7 +126,7 @@ def token_verified(): ub.session_commit("User {} logged in via remotelogin, token deleted".format(user.name)) data['status'] = 'success' - log.debug(u"Remote Login for userid %s succeded", user.id) + log.debug(u"Remote Login for userid %s succeeded", user.id) flash(_(u"you are now logged in as: '%(nickname)s'", nickname=user.name), category="success") response = make_response(json.dumps(data, ensure_ascii=False)) diff --git a/cps/shelf.py b/cps/shelf.py index 49d9a633..9ddc0d1a 100644 --- a/cps/shelf.py +++ b/cps/shelf.py @@ -263,7 +263,7 @@ def order_shelf(shelf_id): for book in books_in_shelf: setattr(book, 'order', to_save[str(book.book_id)]) counter += 1 - # if order diffrent from before -> shelf.last_modified = datetime.utcnow() + # if order different from before -> shelf.last_modified = datetime.utcnow() try: ub.session.commit() except (OperationalError, InvalidRequestError) as e: diff --git a/cps/ub.py b/cps/ub.py index fd7a90ef..96e674d4 100644 --- a/cps/ub.py +++ b/cps/ub.py @@ -263,7 +263,7 @@ class OAuthProvider(Base): active = Column(Boolean) -# Class for anonymous user is derived from User base and completly overrides methods and properties for the +# Class for anonymous user is derived from User base and completely overrides methods and properties for the # anonymous user class Anonymous(AnonymousUserMixin, UserBase): def __init__(self): @@ -769,7 +769,7 @@ def update_download(book_id, user_id): session.rollback() -# Delete non exisiting downloaded books in calibre-web's own database +# Delete non existing downloaded books in calibre-web's own database def delete_download(book_id): session.query(Downloads).filter(book_id == Downloads.book_id).delete() try: diff --git a/cps/web.py b/cps/web.py index dcccbc32..3a6f9e60 100755 --- a/cps/web.py +++ b/cps/web.py @@ -437,7 +437,7 @@ def render_discover_books(book_id): def render_hot_books(page, order): if current_user.check_visibility(constants.SIDEBAR_HOT): if order[1] not in ['hotasc', 'hotdesc']: - # Unary expression comparsion only working (for this expression) in sqlalchemy 1.4+ + # Unary expression comparison only working (for this expression) in sqlalchemy 1.4+ # if not (order[0][0].compare(func.count(ub.Downloads.book_id).desc()) or # order[0][0].compare(func.count(ub.Downloads.book_id).asc())): order = [func.count(ub.Downloads.book_id).desc()], 'hotdesc'