1
0
mirror of https://github.com/janeczku/calibre-web synced 2024-12-25 09:30:31 +00:00

Included khmer language

Further unified naming
This commit is contained in:
OzzieIsaacs 2018-08-28 10:29:11 +02:00
parent 2453786174
commit 3a37183e25
25 changed files with 35002 additions and 2335 deletions

View File

@ -77,8 +77,8 @@ def make_mobi(book_id, calibrepath, user_id, kindle_mail):
def send_test_mail(kindle_mail, user_name): def send_test_mail(kindle_mail, user_name):
global_WorkerThread.add_email(_(u'Calibre-Web test email'),None, None, ub.get_mail_settings(), global_WorkerThread.add_email(_(u'Calibre-Web test e-mail'),None, None, ub.get_mail_settings(),
kindle_mail, user_name, _(u"Test E-Mail")) kindle_mail, user_name, _(u"Test e-mail"))
return return
@ -94,7 +94,7 @@ def send_registration_mail(e_mail, user_name, default_password, resend=False):
text += "Sincerely\r\n\r\n" text += "Sincerely\r\n\r\n"
text += "Your Calibre-Web team" text += "Your Calibre-Web team"
global_WorkerThread.add_email(_(u'Get Started with Calibre-Web'),None, None, ub.get_mail_settings(), global_WorkerThread.add_email(_(u'Get Started with Calibre-Web'),None, None, ub.get_mail_settings(),
e_mail, user_name, _(u"Registration E-Mail for user: %s" % user_name),text) e_mail, user_name, _(u"Registration e-mail for user: %s" % user_name),text)
return return
@ -117,7 +117,7 @@ def send_mail(book_id, kindle_mail, calibrepath, user_id):
formats["pdf"] = entry.name + ".pdf" formats["pdf"] = entry.name + ".pdf"
if len(formats) == 0: if len(formats) == 0:
return _(u"Could not find any formats suitable for sending by email") return _(u"Could not find any formats suitable for sending by e-mail")
if 'mobi' in formats: if 'mobi' in formats:
result = formats['mobi'] result = formats['mobi']
@ -127,7 +127,7 @@ def send_mail(book_id, kindle_mail, calibrepath, user_id):
elif 'pdf' in formats: elif 'pdf' in formats:
result = formats['pdf'] # worker.get_attachment() result = formats['pdf'] # worker.get_attachment()
else: else:
return _(u"Could not find any formats suitable for sending by email") return _(u"Could not find any formats suitable for sending by e-mail")
if result: if result:
global_WorkerThread.add_email(_(u"Send to Kindle"), book.path, result, ub.get_mail_settings(), global_WorkerThread.add_email(_(u"Send to Kindle"), book.path, result, ub.get_mail_settings(),
kindle_mail, user_id, _(u"E-Mail: %s" % book.title)) kindle_mail, user_id, _(u"E-Mail: %s" % book.title))

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -2090,13 +2090,13 @@ def register():
flash(_(u"An unknown error occurred. Please try again later."), category="error") flash(_(u"An unknown error occurred. Please try again later."), category="error")
return render_title_template('register.html', title=_(u"register"), page="register") return render_title_template('register.html', title=_(u"register"), page="register")
else: else:
flash(_(u"Your email is not allowed to register"), category="error") flash(_(u"Your e-mail is not allowed to register"), category="error")
app.logger.info('Registering failed for user "' + to_save['nickname'] + '" EMailadress: ' + to_save["email"]) app.logger.info('Registering failed for user "' + to_save['nickname'] + '" e-mail adress: ' + to_save["email"])
return render_title_template('register.html', title=_(u"register"), page="register") return render_title_template('register.html', title=_(u"register"), page="register")
flash(_(u"Confirmation email was send to your email account."), category="success") flash(_(u"Confirmation e-mail was send to your e-mail account."), category="success")
return redirect(url_for('login')) return redirect(url_for('login'))
else: else:
flash(_(u"This username or email address is already in use."), category="error") flash(_(u"This username or e-mail address is already in use."), category="error")
return render_title_template('register.html', title=_(u"register"), page="register") return render_title_template('register.html', title=_(u"register"), page="register")
return render_title_template('register.html', title=_(u"register"), page="register") return render_title_template('register.html', title=_(u"register"), page="register")
@ -2233,7 +2233,7 @@ def send_to_kindle(book_id):
else: else:
flash(_(u"There was an error sending this book: %(res)s", res=result), category="error") flash(_(u"There was an error sending this book: %(res)s", res=result), category="error")
else: else:
flash(_(u"Please configure your kindle email address first..."), category="error") flash(_(u"Please configure your kindle e-mail address first..."), category="error")
return redirect(request.environ["HTTP_REFERER"]) return redirect(request.environ["HTTP_REFERER"])
@ -2539,7 +2539,7 @@ def profile():
content.kindle_mail = to_save["kindle_mail"] content.kindle_mail = to_save["kindle_mail"]
if to_save["email"] and to_save["email"] != content.email: if to_save["email"] and to_save["email"] != content.email:
if config.config_public_reg and not check_valid_domain(to_save["email"]): if config.config_public_reg and not check_valid_domain(to_save["email"]):
flash(_(u"Email is not from valid domain"), category="error") flash(_(u"E-mail is not from valid domain"), category="error")
return render_title_template("user_edit.html", content=content, downloads=downloads, return render_title_template("user_edit.html", content=content, downloads=downloads,
title=_(u"%(name)s's profile", name=current_user.nickname)) title=_(u"%(name)s's profile", name=current_user.nickname))
content.email = to_save["email"] content.email = to_save["email"]
@ -2580,7 +2580,7 @@ def profile():
ub.session.commit() ub.session.commit()
except IntegrityError: except IntegrityError:
ub.session.rollback() ub.session.rollback()
flash(_(u"Found an existing account for this email address."), category="error") flash(_(u"Found an existing account for this e-mail address."), category="error")
return render_title_template("user_edit.html", content=content, downloads=downloads, return render_title_template("user_edit.html", content=content, downloads=downloads,
title=_(u"%(name)s's profile", name=current_user.nickname)) title=_(u"%(name)s's profile", name=current_user.nickname))
flash(_(u"Profile updated"), category="success") flash(_(u"Profile updated"), category="success")
@ -2939,7 +2939,7 @@ def new_user():
content.password = generate_password_hash(to_save["password"]) content.password = generate_password_hash(to_save["password"])
content.nickname = to_save["nickname"] content.nickname = to_save["nickname"]
if config.config_public_reg and not check_valid_domain(to_save["email"]): if config.config_public_reg and not check_valid_domain(to_save["email"]):
flash(_(u"Email is not from valid domain"), category="error") flash(_(u"E-mail is not from valid domain"), category="error")
return render_title_template("user_edit.html", new_user=1, content=content, translations=translations, return render_title_template("user_edit.html", new_user=1, content=content, translations=translations,
title=_(u"Add new user")) title=_(u"Add new user"))
else: else:
@ -2951,7 +2951,7 @@ def new_user():
return redirect(url_for('admin')) return redirect(url_for('admin'))
except IntegrityError: except IntegrityError:
ub.session.rollback() ub.session.rollback()
flash(_(u"Found an existing account for this email address or nickname."), category="error") flash(_(u"Found an existing account for this e-mail address or nickname."), category="error")
else: else:
content.role = config.config_default_role content.role = config.config_default_role
content.sidebar_view = config.config_default_show content.sidebar_view = config.config_default_show
@ -2975,7 +2975,7 @@ def edit_mailsettings():
content.mail_use_ssl = int(to_save["mail_use_ssl"]) content.mail_use_ssl = int(to_save["mail_use_ssl"])
try: try:
ub.session.commit() ub.session.commit()
flash(_(u"Mail server settings updated"), category="success") flash(_(u"E-mail server settings updated"), category="success")
except Exception as e: except Exception as e:
flash(e, category="error") flash(e, category="error")
if "test" in to_save and to_save["test"]: if "test" in to_save and to_save["test"]:
@ -2987,9 +2987,9 @@ def edit_mailsettings():
else: else:
flash(_(u"There was an error sending the Test e-mail: %(res)s", res=result), category="error") flash(_(u"There was an error sending the Test e-mail: %(res)s", res=result), category="error")
else: else:
flash(_(u"Please configure your kindle email address first..."), category="error") flash(_(u"Please configure your kindle e-mail address first..."), category="error")
else: else:
flash(_(u"Mail server settings updated"), category="success") flash(_(u"E-mail server settings updated"), category="success")
return render_title_template("email_edit.html", content=content, title=_(u"Edit e-mail server settings"), return render_title_template("email_edit.html", content=content, title=_(u"Edit e-mail server settings"),
page="mailset") page="mailset")

View File

@ -218,7 +218,7 @@ class WorkerThread(threading.Thread):
if(filename): if(filename):
self.add_email(_(u'Send to Kindle'), self.queue[self.current]['path'], filename, self.add_email(_(u'Send to Kindle'), self.queue[self.current]['path'], filename,
self.queue[self.current]['settings'], self.queue[self.current]['kindle'], self.queue[self.current]['settings'], self.queue[self.current]['kindle'],
self.UIqueue[self.current]['user'], _(u"E-Mail: %s" % self.queue[self.current]['title'])) self.UIqueue[self.current]['user'], _(u"E-mail: %s" % self.queue[self.current]['title']))
def convert(self): def convert(self):
error_message = None error_message = None
@ -327,7 +327,7 @@ class WorkerThread(threading.Thread):
def add_email(self, subject, filepath, attachment, settings, recipient, user_name, typ, def add_email(self, subject, filepath, attachment, settings, recipient, user_name, typ,
text=_(u'This email has been sent via calibre web.')): text=_(u'This e-mail has been sent via Calibre-Web.')):
# if more than 20 entries in the list, clean the list # if more than 20 entries in the list, clean the list
addLock = threading.Lock() addLock = threading.Lock()
addLock.acquire() addLock.acquire()

File diff suppressed because it is too large Load Diff

View File

@ -12,7 +12,7 @@ Calibre-Web is a web app providing a clean interface for browsing, reading and d
- full graphical setup - full graphical setup
- User management with fine grained per-user permissions - User management with fine grained per-user permissions
- Admin interface - Admin interface
- User Interface in dutch, english, french, german, italian, japanese, polish, russian, simplified chinese, spanish - User Interface in dutch, english, french, german, italian, japanese, khmer, polish, russian, simplified chinese, spanish
- OPDS feed for eBook reader apps - OPDS feed for eBook reader apps
- Filter and search by titles, authors, tags, series and language - Filter and search by titles, authors, tags, series and language
- Create custom book collection (shelves) - Create custom book collection (shelves)