itzulpenak
This commit is contained in:
parent
6d30add55e
commit
7039f1373b
34
app.py
34
app.py
@ -113,9 +113,9 @@ def post_user():
|
||||
return index_tpl(alerts=[('error', msg, 'fadeOut')], str=i18n.str)
|
||||
|
||||
if len(form('username')) < 3:
|
||||
return error(i18n.msg[1])
|
||||
return error(i18n.msg[2])
|
||||
elif not tools.input_validation(form('username')):
|
||||
return error(i18n.msg[6])
|
||||
return error(i18n.msg[3])
|
||||
|
||||
if not tools.pwd_validation(form('password')):
|
||||
return error(i18n.msg[21])
|
||||
@ -126,7 +126,7 @@ def post_user():
|
||||
LOG.warning("Unsuccessful attempt to login %s: %s" % (form('username'), e))
|
||||
return error(str(e))
|
||||
|
||||
return user_tpl(alerts=[('success', '%s %s' % (i18n.msg[3], form('username').capitalize()), 'fadeOut' )], data=newSession().get(), str=i18n.str)
|
||||
return user_tpl(alerts=[('success', '%s %s' % (i18n.msg[1], form('username').capitalize()), 'fadeOut' )], data=newSession().get(), str=i18n.str)
|
||||
|
||||
@post('/signup')
|
||||
def post_signup():
|
||||
@ -152,14 +152,14 @@ def post_signup():
|
||||
return signup_tpl(alerts=[('error', msg, 'fadeOut')], str=i18n.str)
|
||||
|
||||
if not tools.code_is_valid(form('invite_code'), db):
|
||||
return(error(i18n.msg[4]))
|
||||
return(error(i18n.msg[6]))
|
||||
|
||||
if len(form('username')) < 3:
|
||||
return error(i18n.msg[5])
|
||||
return error(i18n.msg[2])
|
||||
|
||||
username = form('username').lower()
|
||||
if not tools.input_validation(username):
|
||||
return error(i18n.msg[6])
|
||||
return error(i18n.msg[3])
|
||||
|
||||
if len(form('firstname')) == 0:
|
||||
firstname = auto_complete('firstname')
|
||||
@ -175,7 +175,7 @@ def post_signup():
|
||||
|
||||
email = form('email').lower()
|
||||
if not tools.email_validation(email):
|
||||
return error(i18n.msg[14])
|
||||
return error(i18n.msg[15])
|
||||
|
||||
if not tools.pwd_validation(form('password')):
|
||||
return error(i18n.msg[8]) #mezua ALDATU egin behar da
|
||||
@ -216,12 +216,12 @@ def post_edit_fullname():
|
||||
if len(form('firstname')) < 3:
|
||||
return error(i18n.msg[11])
|
||||
elif not tools.input_validation(form('firstname')):
|
||||
return error(i18n.msg[6]) #Not allowed characters for the firstname field. ALDATU
|
||||
return error(i18n.msg[4])
|
||||
|
||||
if len(form('surname')) < 3:
|
||||
return error(i18n.msg[12])
|
||||
elif not tools.input_validation(form('surname')):
|
||||
return error(i18n.msg[6]) #Not allowed characters for the surname field. ALDATU
|
||||
return error(i18n.msg[5])
|
||||
|
||||
try:
|
||||
edit_fullname(username, old_firstname, old_surname, form('firstname').lower(), form('surname').lower())
|
||||
@ -269,7 +269,9 @@ def post_change_pwd():
|
||||
def error(msg):
|
||||
return change_pwd_tpl(username=username, alerts=[('error', msg, 'fadeOut')], str=i18n.str)
|
||||
|
||||
if (not tools.pwd_validation(form('new-password')) or not tools.pwd_validation(form('confirm-password'))):
|
||||
if not tools.pwd_validation(form('old-password')):
|
||||
return error(i18n.msg[26])
|
||||
elif (not tools.pwd_validation(form('new-password')) or not tools.pwd_validation(form('confirm-password'))):
|
||||
return error(i18n.msg[8]) #mezua aldatu egin behar da
|
||||
elif form('new-password') != form('confirm-password'):
|
||||
return error(i18n.msg[7])
|
||||
@ -369,7 +371,7 @@ def login_user(conf, *args):
|
||||
|
||||
except LDAPSocketOpenError as e:
|
||||
LOG.error('{}: {!s}'.format(e.__class__.__name__, e))
|
||||
raise Error(i18n.msg[22])
|
||||
raise Error(i18n.msg[23])
|
||||
|
||||
except LDAPExceptionError as e:
|
||||
LOG.error('{}: {!s}'.format(e.__class__.__name__, e))
|
||||
@ -417,7 +419,7 @@ def logout_user(conf, *args):
|
||||
|
||||
except LDAPSocketOpenError as e:
|
||||
LOG.error('{}: {!s}'.format(e.__class__.__name__, e))
|
||||
raise Error(i18n.msg[22])
|
||||
raise Error(i18n.msg[23])
|
||||
|
||||
except LDAPExceptionError as e:
|
||||
LOG.error('{}: {!s}'.format(e.__class__.__name__, e))
|
||||
@ -543,7 +545,7 @@ def new_fullname(conf, *args):
|
||||
|
||||
except LDAPSocketOpenError as e:
|
||||
LOG.error('{}: {!s}'.format(e.__class__.__name__, e))
|
||||
raise Error(i18n.msg[22])
|
||||
raise Error(i18n.msg[23])
|
||||
|
||||
except LDAPExceptionError as e:
|
||||
LOG.error('{}: {!s}'.format(e.__class__.__name__, e))
|
||||
@ -606,7 +608,7 @@ def new_email_address(conf, *args):
|
||||
|
||||
except LDAPSocketOpenError as e:
|
||||
LOG.error('{}: {!s}'.format(e.__class__.__name__, e))
|
||||
raise Error(i18n.msg[22])
|
||||
raise Error(i18n.msg[23])
|
||||
|
||||
except LDAPExceptionError as e:
|
||||
LOG.error('{}: {!s}'.format(e.__class__.__name__, e))
|
||||
@ -664,7 +666,7 @@ def change_password(conf, *args):
|
||||
|
||||
except LDAPSocketOpenError as e:
|
||||
LOG.error('{}: {!s}'.format(e.__class__.__name__, e))
|
||||
raise Error(i18n.msg[22])
|
||||
raise Error(i18n.msg[23])
|
||||
|
||||
except LDAPExceptionError as e:
|
||||
LOG.error('{}: {!s}'.format(e.__class__.__name__, e))
|
||||
@ -714,7 +716,7 @@ def del_account(conf, *args):
|
||||
|
||||
except LDAPSocketOpenError as e:
|
||||
LOG.error('{}: {!s}'.format(e.__class__.__name__, e))
|
||||
raise Error(i18n.msg[22])
|
||||
raise Error(i18n.msg[23])
|
||||
|
||||
except LDAPExceptionError as e:
|
||||
LOG.error('{}: {!s}'.format(e.__class__.__name__, e))
|
||||
|
Binary file not shown.
@ -18,7 +18,7 @@
|
||||
<form name="editEmailForm" method="post" action="/edit_email">
|
||||
|
||||
<label for="email">{{ str['email'] }}</label>
|
||||
<input id="email" name="email" type="text" value="{{ data['mail'] }}" >
|
||||
<input id="email" name="email" type="text" value="{{ data['mail'] }}" required>
|
||||
|
||||
<div class="form-buttons">
|
||||
<a href="/user"><button class="green" type="button">{{ str['back'] }}</button></a>
|
||||
|
@ -18,10 +18,10 @@
|
||||
<form name="fullNameForm" method="post" action="/edit_fullname">
|
||||
|
||||
<label for="firstname">{{ str['fn'] }}</label>
|
||||
<input id="firstname" name="firstname" type="text" value="{{ data['firstname'] }}">
|
||||
<input id="firstname" name="firstname" type="text" value="{{ data['firstname'] }}" required>
|
||||
|
||||
<label for="surname">{{ str['sn'] }}</label>
|
||||
<input id="surname" name="surname" type="text" value="{{ data['surname'] }}" >
|
||||
<input id="surname" name="surname" type="text" value="{{ data['surname'] }}" required>
|
||||
|
||||
<div class="form-buttons">
|
||||
<a href="/user"><button class="green" type="button">{{ str['back'] }}</button></a>
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -36,14 +36,14 @@ class LocalizeTo(object):
|
||||
|
||||
#messages
|
||||
msg_00 = _("The session was closed.")
|
||||
msg_01 = _("Username must be at least 3 characters long!")
|
||||
msg_02 = _("Please enter your password!")
|
||||
msg_03 = _("Welcome")
|
||||
msg_04 = _("The code is invalid or has expired.")
|
||||
msg_05 = _("A bit short, don't you think?!")
|
||||
msg_06 = _("Not allowed characters for the username field.")
|
||||
msg_01 = _("Welcome")
|
||||
msg_02 = _("Username must be at least 3 characters long!")
|
||||
msg_03 = _("Not allowed characters for the username field.")
|
||||
msg_04 = _("Not allowed characters for the firstname field.")
|
||||
msg_05 = _("Not allowed characters for the surname field.")
|
||||
msg_06 = _("The code is invalid or has expired.")
|
||||
msg_07 = _("Passwords do not match!")
|
||||
msg_08 = _("Password must be at least 8 characters long!")
|
||||
msg_08 = _("The password must contain at least 8 characters, at least one number, uppercase and lowercase letters and special characters.")
|
||||
msg_09 = _("Congratulations, your account has been created!")
|
||||
msg_10 = _("Your first and last name have not been changed.")
|
||||
msg_11 = _("Your firstname is a bit short, don't you think?")
|
||||
|
@ -1,20 +1,20 @@
|
||||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the PACKAGE package.
|
||||
# FIRST AUTHOR <aitzol@lainoa.eus>, 2022.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: 0.0.1\n"
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2022-04-07 17:23+0200\n"
|
||||
"POT-Creation-Date: 2022-04-25 16:52+0200\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: Aitzol Berasategi <aitzol@lainoa.eus>\n"
|
||||
"Language-Team: LANGUAGE <EU@eu.org>\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"Language: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Type: text/plain; charset=CHARSET\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: libs/localization.py:12
|
||||
@ -109,7 +109,7 @@ msgstr ""
|
||||
msgid "Delete your account"
|
||||
msgstr ""
|
||||
|
||||
#: libs/localization.py:35 libs/localization.py:41
|
||||
#: libs/localization.py:35 libs/localization.py:39
|
||||
msgid "Welcome"
|
||||
msgstr ""
|
||||
|
||||
@ -117,24 +117,24 @@ msgstr ""
|
||||
msgid "The session was closed."
|
||||
msgstr ""
|
||||
|
||||
#: libs/localization.py:39
|
||||
#: libs/localization.py:40
|
||||
msgid "Username must be at least 3 characters long!"
|
||||
msgstr ""
|
||||
|
||||
#: libs/localization.py:40
|
||||
msgid "Please enter your password!"
|
||||
#: libs/localization.py:41
|
||||
msgid "Not allowed characters for the username field."
|
||||
msgstr ""
|
||||
|
||||
#: libs/localization.py:42
|
||||
msgid "The code is invalid or has expired."
|
||||
msgid "Not allowed characters for the firstname field."
|
||||
msgstr ""
|
||||
|
||||
#: libs/localization.py:43
|
||||
msgid "A bit short, don't you think?!"
|
||||
msgid "Not allowed characters for the surname field."
|
||||
msgstr ""
|
||||
|
||||
#: libs/localization.py:44
|
||||
msgid "Not allowed characters for the username field."
|
||||
msgid "The code is invalid or has expired."
|
||||
msgstr ""
|
||||
|
||||
#: libs/localization.py:45
|
||||
@ -142,7 +142,9 @@ msgid "Passwords do not match!"
|
||||
msgstr ""
|
||||
|
||||
#: libs/localization.py:46
|
||||
msgid "Password must be at least 8 characters long!"
|
||||
msgid ""
|
||||
"The password must contain at least 8 characters, at least one number, "
|
||||
"uppercase and lowercase letters and special characters."
|
||||
msgstr ""
|
||||
|
||||
#: libs/localization.py:47
|
||||
|
Binary file not shown.
@ -7,11 +7,11 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: 0.0.1\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2022-04-07 17:23+0200\n"
|
||||
"PO-Revision-Date: 2022-04-16 17:11+0200\n"
|
||||
"POT-Creation-Date: 2022-04-07 17:20+0200\n"
|
||||
"PO-Revision-Date: 2022-04-25 17:15+0200\n"
|
||||
"Last-Translator: Aitzol Berasategi <aitzol@lainoa.eus>\n"
|
||||
"Language-Team: LANGUAGE <EU@eu.org>\n"
|
||||
"Language: en\n"
|
||||
"Language-Team: LANGUAGE <EN@en.org>\n"
|
||||
"Language: eu\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
@ -109,7 +109,7 @@ msgstr "Change your password"
|
||||
msgid "Delete your account"
|
||||
msgstr "Delete your account"
|
||||
|
||||
#: libs/localization.py:35 libs/localization.py:41
|
||||
#: libs/localization.py:35 libs/localization.py:39
|
||||
msgid "Welcome"
|
||||
msgstr "Welcome"
|
||||
|
||||
@ -117,33 +117,37 @@ msgstr "Welcome"
|
||||
msgid "The session was closed."
|
||||
msgstr "The session was closed."
|
||||
|
||||
#: libs/localization.py:39
|
||||
#: libs/localization.py:40
|
||||
msgid "Username must be at least 3 characters long!"
|
||||
msgstr "Username must be at least 3 characters long!"
|
||||
|
||||
#: libs/localization.py:40
|
||||
msgid "Please enter your password!"
|
||||
msgstr "Please enter your password!"
|
||||
|
||||
#: libs/localization.py:42
|
||||
msgid "The code is invalid or has expired."
|
||||
msgstr "The code is invalid or has expired."
|
||||
|
||||
#: libs/localization.py:43
|
||||
msgid "A bit short, don't you think?!"
|
||||
msgstr "A bit short, don't you think?!"
|
||||
|
||||
#: libs/localization.py:44
|
||||
#: libs/localization.py:41
|
||||
msgid "Not allowed characters for the username field."
|
||||
msgstr "Not allowed characters for the username field."
|
||||
|
||||
#: libs/localization.py:42
|
||||
msgid "Not allowed characters for the firstname field."
|
||||
msgstr "Not allowed characters for the firstname field."
|
||||
|
||||
#: libs/localization.py:43
|
||||
msgid "Not allowed characters for the surname field."
|
||||
msgstr "Not allowed characters for the surname field."
|
||||
|
||||
#: libs/localization.py:44
|
||||
msgid "The code is invalid or has expired."
|
||||
msgstr "The code is invalid or has expired."
|
||||
|
||||
#: libs/localization.py:45
|
||||
msgid "Passwords do not match!"
|
||||
msgstr "Passwords do not match!"
|
||||
|
||||
#: libs/localization.py:46
|
||||
msgid "Password must be at least 8 characters long!"
|
||||
msgstr "Password must be at least 8 characters long!"
|
||||
msgid ""
|
||||
"The password must contain at least 8 characters, at least one number, "
|
||||
"uppercase and lowercase letters and special characters."
|
||||
msgstr ""
|
||||
"The password must contain at least 8 characters, at least one number, "
|
||||
"uppercase and lowercase letters and special characters."
|
||||
|
||||
#: libs/localization.py:47
|
||||
msgid "Congratulations, your account has been created!"
|
||||
@ -202,8 +206,10 @@ msgid "Unable to connect to the remote server."
|
||||
msgstr "Unable to connect to the remote server."
|
||||
|
||||
#: libs/localization.py:61
|
||||
msgid "Encountered an unexpected error while communicating with the remote server."
|
||||
msgstr "Encountered an unexpected error while communicating with the remote server."
|
||||
msgid ""
|
||||
"Encountered an unexpected error while communicating with the remote server."
|
||||
msgstr ""
|
||||
"Encountered an unexpected error while communicating with the remote server."
|
||||
|
||||
#: libs/localization.py:62
|
||||
msgid "User already exists."
|
||||
|
Binary file not shown.
@ -8,7 +8,7 @@ msgstr ""
|
||||
"Project-Id-Version: 0.0.1\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2022-04-07 17:23+0200\n"
|
||||
"PO-Revision-Date: 2022-04-16 17:13+0200\n"
|
||||
"PO-Revision-Date: 2022-04-25 17:10+0200\n"
|
||||
"Last-Translator: Aitzol Berasategi <aitzol@lainoa.eus>\n"
|
||||
"Language-Team: LANGUAGE <EU@eu.org>\n"
|
||||
"Language: eu\n"
|
||||
@ -117,33 +117,37 @@ msgstr "Ongi etorri"
|
||||
msgid "The session was closed."
|
||||
msgstr "Saioa itxi da."
|
||||
|
||||
#: libs/localization.py:39
|
||||
#: libs/localization.py:40
|
||||
msgid "Username must be at least 3 characters long!"
|
||||
msgstr "Erabiltzaile izenak gutxienez 3 karaktere izan behar ditu!"
|
||||
|
||||
#: libs/localization.py:40
|
||||
msgid "Please enter your password!"
|
||||
msgstr "Sartu zure pasahitza, mesedez!"
|
||||
#: libs/localization.py:41
|
||||
msgid "Not allowed characters for the username field."
|
||||
msgstr "Erabiltzaile-izen eremurako onartzen ez diren karaktereak."
|
||||
|
||||
#: libs/localization.py:42
|
||||
msgid "The code is invalid or has expired."
|
||||
msgstr "Kodea baliogabea da edo iraungi egin da."
|
||||
msgid "Not allowed characters for the firstname field."
|
||||
msgstr "Izen eremurako onartzen ez diren karaktereak."
|
||||
|
||||
#: libs/localization.py:43
|
||||
msgid "A bit short, don't you think?!"
|
||||
msgstr "Labur-xamarra, ez duzu uste?!"
|
||||
msgid "Not allowed characters for the surname field."
|
||||
msgstr "Abizen eremurako onartzen ez diren karaktereak."
|
||||
|
||||
#: libs/localization.py:44
|
||||
msgid "Not allowed characters for the username field."
|
||||
msgstr "Erabiltzaile izenerako onartzen ez diren karaktereak."
|
||||
msgid "The code is invalid or has expired."
|
||||
msgstr "Kodea baliogabea da edo iraungi egin da."
|
||||
|
||||
#: libs/localization.py:45
|
||||
msgid "Passwords do not match!"
|
||||
msgstr "Pasahitzak ez datoz bat!"
|
||||
|
||||
#: libs/localization.py:46
|
||||
msgid "Password must be at least 8 characters long!"
|
||||
msgstr "Pasahitzak gutxienez 8 karaktereko luzera izan behar du!"
|
||||
msgid ""
|
||||
"The password must contain at least 8 characters, at least one number, "
|
||||
"uppercase and lowercase letters and special characters."
|
||||
msgstr ""
|
||||
"Pasahitzak gutxienez 8 karaktere izan behar ditu, zenbakiren bat gutxienez, "
|
||||
"hizki txiki zein larriak eta baita karaktere bereziak ere."
|
||||
|
||||
#: libs/localization.py:47
|
||||
msgid "Congratulations, your account has been created!"
|
||||
@ -202,7 +206,8 @@ msgid "Unable to connect to the remote server."
|
||||
msgstr "Ezinezkoa urruneko zerbitzara konektatzea."
|
||||
|
||||
#: libs/localization.py:61
|
||||
msgid "Encountered an unexpected error while communicating with the remote server."
|
||||
msgid ""
|
||||
"Encountered an unexpected error while communicating with the remote server."
|
||||
msgstr "Ezusteko errore bat gertatu da urruneko zerbitzariarekin komunikatzean."
|
||||
|
||||
#: libs/localization.py:62
|
||||
|
Loading…
Reference in New Issue
Block a user