mirror of
https://github.com/janeczku/calibre-web
synced 2024-12-22 16:10:30 +00:00
Fix typos
This commit is contained in:
parent
07c67b09db
commit
c4104ddaf4
@ -29,7 +29,7 @@ from .constants import DEFAULT_SETTINGS_FILE, DEFAULT_GDRIVE_FILE
|
|||||||
|
|
||||||
def version_info():
|
def version_info():
|
||||||
if _NIGHTLY_VERSION[1].startswith('$Format'):
|
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])
|
return "Calibre-Web version: %s -%s" % (_STABLE_VERSION['version'], _NIGHTLY_VERSION[1])
|
||||||
|
|
||||||
|
|
||||||
|
@ -121,7 +121,7 @@ def send_registration_mail(e_mail, user_name, default_password, resend=False):
|
|||||||
txt = "Hello %s!\r\n" % user_name
|
txt = "Hello %s!\r\n" % user_name
|
||||||
if not resend:
|
if not resend:
|
||||||
txt += "Your new account at Calibre-Web has been created. Thanks for joining us!\r\n"
|
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 += "User name: %s\r\n" % user_name
|
||||||
txt += "Password: %s\r\n" % default_password
|
txt += "Password: %s\r\n" % default_password
|
||||||
txt += "Don't forget to change your password after first login.\r\n"
|
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:
|
except (OSError, UnicodeDecodeError) as err:
|
||||||
log.error_or_exception(err)
|
log.error_or_exception(err)
|
||||||
return _('Error excecuting UnRar')
|
return _('Error executing UnRar')
|
||||||
|
|
||||||
|
|
||||||
def json_serial(obj):
|
def json_serial(obj):
|
||||||
|
@ -155,7 +155,7 @@ def HandleSyncRequest():
|
|||||||
new_archived_last_modified = datetime.datetime.min
|
new_archived_last_modified = datetime.datetime.min
|
||||||
sync_results = []
|
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).
|
# in case of external changes (e.g: adding a book through Calibre).
|
||||||
calibre_db.reconnect_db(config, ub.app_DB_path)
|
calibre_db.reconnect_db(config, ub.app_DB_path)
|
||||||
|
|
||||||
@ -508,7 +508,7 @@ def get_metadata(book):
|
|||||||
@requires_kobo_auth
|
@requires_kobo_auth
|
||||||
# Creates a Shelf with the given items, and returns the shelf's uuid.
|
# Creates a Shelf with the given items, and returns the shelf's uuid.
|
||||||
def HandleTagCreate():
|
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":
|
if request.method == "DELETE":
|
||||||
abort(405)
|
abort(405)
|
||||||
name, items = None, None
|
name, items = None, None
|
||||||
|
@ -126,7 +126,7 @@ def token_verified():
|
|||||||
ub.session_commit("User {} logged in via remotelogin, token deleted".format(user.name))
|
ub.session_commit("User {} logged in via remotelogin, token deleted".format(user.name))
|
||||||
|
|
||||||
data['status'] = 'success'
|
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")
|
flash(_(u"you are now logged in as: '%(nickname)s'", nickname=user.name), category="success")
|
||||||
|
|
||||||
response = make_response(json.dumps(data, ensure_ascii=False))
|
response = make_response(json.dumps(data, ensure_ascii=False))
|
||||||
|
@ -263,7 +263,7 @@ def order_shelf(shelf_id):
|
|||||||
for book in books_in_shelf:
|
for book in books_in_shelf:
|
||||||
setattr(book, 'order', to_save[str(book.book_id)])
|
setattr(book, 'order', to_save[str(book.book_id)])
|
||||||
counter += 1
|
counter += 1
|
||||||
# if order diffrent from before -> shelf.last_modified = datetime.utcnow()
|
# if order different from before -> shelf.last_modified = datetime.utcnow()
|
||||||
try:
|
try:
|
||||||
ub.session.commit()
|
ub.session.commit()
|
||||||
except (OperationalError, InvalidRequestError) as e:
|
except (OperationalError, InvalidRequestError) as e:
|
||||||
|
@ -263,7 +263,7 @@ class OAuthProvider(Base):
|
|||||||
active = Column(Boolean)
|
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
|
# anonymous user
|
||||||
class Anonymous(AnonymousUserMixin, UserBase):
|
class Anonymous(AnonymousUserMixin, UserBase):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
@ -769,7 +769,7 @@ def update_download(book_id, user_id):
|
|||||||
session.rollback()
|
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):
|
def delete_download(book_id):
|
||||||
session.query(Downloads).filter(book_id == Downloads.book_id).delete()
|
session.query(Downloads).filter(book_id == Downloads.book_id).delete()
|
||||||
try:
|
try:
|
||||||
|
@ -437,7 +437,7 @@ def render_discover_books(book_id):
|
|||||||
def render_hot_books(page, order):
|
def render_hot_books(page, order):
|
||||||
if current_user.check_visibility(constants.SIDEBAR_HOT):
|
if current_user.check_visibility(constants.SIDEBAR_HOT):
|
||||||
if order[1] not in ['hotasc', 'hotdesc']:
|
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
|
# 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[0][0].compare(func.count(ub.Downloads.book_id).asc())):
|
||||||
order = [func.count(ub.Downloads.book_id).desc()], 'hotdesc'
|
order = [func.count(ub.Downloads.book_id).desc()], 'hotdesc'
|
||||||
|
Loading…
Reference in New Issue
Block a user