ip eta gailu erregistroa

This commit is contained in:
aitzol 2023-04-07 15:21:44 +02:00
parent d82d827079
commit 3b8582a7df
11 changed files with 333 additions and 260 deletions

8
app.py
View File

@ -32,7 +32,7 @@ import logging
from os import getenv, environ, path from os import getenv, environ, path
from libs import flist, slist from libs import flist, slist
from libs.localization import * from libs.localization import *
from libs.helper import * from libs.helper import tools
import random import random
from user_agents import parse from user_agents import parse
from datetime import datetime from datetime import datetime
@ -120,7 +120,6 @@ def get_index():
@post('/user') @post('/user')
def post_user(): def post_user():
form = request.forms.getunicode form = request.forms.getunicode
tools = Tools()
def error(msg): def error(msg):
return index_tpl(alerts=[('error', msg, 'fadeOut')], str=i18n.str) return index_tpl(alerts=[('error', msg, 'fadeOut')], str=i18n.str)
@ -151,7 +150,6 @@ def post_signup():
form = request.forms.getunicode form = request.forms.getunicode
isFake = False isFake = False
tools = Tools()
db = 'data/invite-codes.db' db = 'data/invite-codes.db'
def auto_complete(arg): def auto_complete(arg):
@ -214,7 +212,6 @@ def post_signup():
@post('/edit_fullname') @post('/edit_fullname')
def post_edit_fullname(): def post_edit_fullname():
form = request.forms.getunicode form = request.forms.getunicode
tools = Tools()
try: try:
username = newSession().get()['username'] username = newSession().get()['username']
@ -247,7 +244,6 @@ def post_edit_fullname():
@post('/edit_email') @post('/edit_email')
def post_edit_email(): def post_edit_email():
form = request.forms.getunicode form = request.forms.getunicode
tools = Tools()
try: try:
username = newSession().get()['username'] username = newSession().get()['username']
@ -272,7 +268,6 @@ def post_edit_email():
@post('/change_pwd') @post('/change_pwd')
def post_change_pwd(): def post_change_pwd():
form = request.forms.getunicode form = request.forms.getunicode
tools = Tools()
try: try:
username=newSession().get()['username'] username=newSession().get()['username']
@ -305,7 +300,6 @@ def post_change_pwd():
@post('/delete') @post('/delete')
def post_delete(): def post_delete():
form = request.forms.getunicode form = request.forms.getunicode
tools = Tools()
def error(msg): def error(msg):
return delete_tpl(alerts=[('error', msg, 'fadeOut')], str=i18n.str) return delete_tpl(alerts=[('error', msg, 'fadeOut')], str=i18n.str)

View File

@ -42,3 +42,5 @@ class Tools():
def pwd_validation(self, e): def pwd_validation(self, e):
regex = r'^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*#?&])[A-Za-z\d@$!#%*?&]{8,18}$' regex = r'^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*#?&])[A-Za-z\d@$!#%*?&]{8,18}$'
return(bool(re.fullmatch(regex, e))) return(bool(re.fullmatch(regex, e)))
tools = Tools()

View File

@ -36,6 +36,10 @@ class LocalizeTo(object):
str_21 = _("Change your password") str_21 = _("Change your password")
str_22 = _("Delete your account") str_22 = _("Delete your account")
str_23 = _("Welcome") str_23 = _("Welcome")
str_24 = _("Logs")
str_25 = _("Last login")
str_26 = _("Devices")
str_27 = _("show")
#messages #messages
msg_00 = _("The session was closed.") msg_00 = _("The session was closed.")
@ -68,5 +72,10 @@ class LocalizeTo(object):
msg_27 = _("The session has expired.") msg_27 = _("The session has expired.")
msg_28 = _("Registration is currently closed. We apologize for the inconvenience.") msg_28 = _("Registration is currently closed. We apologize for the inconvenience.")
self.str = {'usr':str_00, 'usrn':str_01, 'fn':str_02, 'sn':str_03, 'pwd':str_04, 'old-pwd':str_05, 'new-pwd':str_06, 'conf-pwd':str_07, 'email':str_08, 'edit':str_09, 'login':str_10, 'log-out':str_11, 'del':str_12, 'sign-up':str_13, 'back':str_14, 'update':str_15, 'or-sign-in':str_16, 'or-sign-up':str_17, 'inv-code':str_18, 'edit-fn':str_19, 'edit-email':str_20, 'ch-pwd':str_21, 'del-account':str_22, 'welcome':str_23, 'pwd-pattern': msg_08} self.str = {'usr':str_00, 'usrn':str_01, 'fn':str_02, 'sn':str_03, 'pwd':str_04, 'old-pwd':str_05,
'new-pwd':str_06, 'conf-pwd':str_07, 'email':str_08, 'edit':str_09, 'login':str_10, 'log-out':str_11,
'del':str_12, 'sign-up':str_13, 'back':str_14, 'update':str_15, 'or-sign-in':str_16,
'or-sign-up':str_17, 'inv-code':str_18, 'edit-fn':str_19, 'edit-email':str_20, 'ch-pwd':str_21,
'del-account':str_22, 'welcome':str_23, 'logs':str_24, 'last-login':str_25, 'devices':str_26,
'show':str_27, 'pwd-pattern': msg_08}
self.msg = (msg_00, msg_01, msg_02, msg_03, msg_04, msg_05, msg_06, msg_07, msg_08, msg_09, msg_10, msg_11, msg_12, msg_13, msg_14, msg_15, msg_16, msg_17, msg_18, msg_19, msg_20, msg_21, msg_22, msg_23, msg_24, msg_25, msg_26, msg_27, msg_28) self.msg = (msg_00, msg_01, msg_02, msg_03, msg_04, msg_05, msg_06, msg_07, msg_08, msg_09, msg_10, msg_11, msg_12, msg_13, msg_14, msg_15, msg_16, msg_17, msg_18, msg_19, msg_20, msg_21, msg_22, msg_23, msg_24, msg_25, msg_26, msg_27, msg_28)

View File

@ -9,7 +9,7 @@ msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-04-25 16:52+0200\n" "POT-Creation-Date: 2022-04-25 16:52+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: 2023-04-07 13:28+0200\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n" "Language: \n"
@ -17,213 +17,232 @@ msgstr ""
"Content-Type: text/plain; charset=CHARSET\n" "Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
#: libs/localization.py:12
msgid "User"
msgstr ""
#: libs/localization.py:13
msgid "Username"
msgstr ""
#: libs/localization.py:14
msgid "Firstname"
msgstr ""
#: libs/localization.py:15 #: libs/localization.py:15
msgid "Surname" msgid "User"
msgstr "" msgstr "User"
#: libs/localization.py:16 #: libs/localization.py:16
msgid "Password" msgid "Username"
msgstr "" msgstr "Username"
#: libs/localization.py:17 #: libs/localization.py:17
msgid "Old password" msgid "Firstname"
msgstr "" msgstr "Firstname"
#: libs/localization.py:18 #: libs/localization.py:18
msgid "New password" msgid "Surname"
msgstr "" msgstr "Surname"
#: libs/localization.py:19 #: libs/localization.py:19
msgid "Confirm password" msgid "Password"
msgstr "" msgstr "Password"
#: libs/localization.py:20 #: libs/localization.py:20
msgid "Email" msgid "Old password"
msgstr "" msgstr "Old password"
#: libs/localization.py:21 #: libs/localization.py:21
msgid "edit" msgid "New password"
msgstr "" msgstr "New password"
#: libs/localization.py:22 #: libs/localization.py:22
msgid "Login" msgid "Confirm password"
msgstr "" msgstr "Confirm password"
#: libs/localization.py:23 #: libs/localization.py:23
msgid "Logout" msgid "Email"
msgstr "" msgstr "Email"
#: libs/localization.py:24 #: libs/localization.py:24
msgid "Delete" msgid "edit"
msgstr "" msgstr "edit"
#: libs/localization.py:25 #: libs/localization.py:25
msgid "Sign Up" msgid "Login"
msgstr "" msgstr "Login"
#: libs/localization.py:26 #: libs/localization.py:26
msgid "Back" msgid "Logout"
msgstr "" msgstr "Logout"
#: libs/localization.py:27 #: libs/localization.py:27
msgid "Update" msgid "Delete"
msgstr "" msgstr "Delete"
#: libs/localization.py:28 #: libs/localization.py:28
msgid "Or Sign In" msgid "Sign Up"
msgstr "" msgstr "Sign Up"
#: libs/localization.py:29 #: libs/localization.py:29
msgid "Or Sign Up" msgid "Back"
msgstr "" msgstr "Back"
#: libs/localization.py:30 #: libs/localization.py:30
msgid "Invite code" msgid "Update"
msgstr "" msgstr "Update"
#: libs/localization.py:31 #: libs/localization.py:31
msgid "Edit your fullname" msgid "Or Sign In"
msgstr "" msgstr "Or Sign In"
#: libs/localization.py:32 #: libs/localization.py:32
msgid "Edit your email" msgid "Or Sign Up"
msgstr "" msgstr "Or Sign Up"
#: libs/localization.py:33 #: libs/localization.py:33
msgid "Change your password" msgid "Invite code"
msgstr "" msgstr "Invite code"
#: libs/localization.py:34 #: libs/localization.py:34
msgid "Delete your account" msgid "Edit your fullname"
msgstr "" msgstr "Edit your fullname"
#: libs/localization.py:35 libs/localization.py:39 #: libs/localization.py:35
msgid "Edit your email"
msgstr "Edit your email"
#: libs/localization.py:36
msgid "Change your password"
msgstr "Change your password"
#: libs/localization.py:37
msgid "Delete your account"
msgstr "Delete your account"
#: libs/localization.py:38 libs/localization.py:46
msgid "Welcome" msgid "Welcome"
msgstr "" msgstr "Welcome"
#: libs/localization.py:39
msgid "Logs"
msgstr "Logs"
#: libs/localization.py:40 #: libs/localization.py:40
msgid "The session was closed." msgid "Last login"
msgstr "" msgstr "Last login"
#: libs/localization.py:41
msgid "Devices"
msgstr "Devices"
#: libs/localization.py:42 #: libs/localization.py:42
msgid "Username must be at least 3 characters long!" msgid "show"
msgstr "" msgstr "show"
#: libs/localization.py:43
msgid "Not allowed characters for the username field."
msgstr ""
#: libs/localization.py:44
msgid "Not allowed characters for the firstname field."
msgstr ""
#: libs/localization.py:45 #: libs/localization.py:45
msgid "Not allowed characters for the surname field." msgid "The session was closed."
msgstr "" msgstr "The session was closed."
#: libs/localization.py:46
msgid "The code is invalid or has expired."
msgstr ""
#: libs/localization.py:47 #: libs/localization.py:47
msgid "Passwords do not match!" msgid "Username must be at least 3 characters long!"
msgstr "" msgstr "Username must be at least 3 characters long!"
#: libs/localization.py:48 #: libs/localization.py:48
msgid "Not allowed characters for the username field."
msgstr "Not allowed characters for the username field."
#: libs/localization.py:49
msgid "Not allowed characters for the firstname field."
msgstr "Not allowed characters for the firstname field."
#: libs/localization.py:50
msgid "Not allowed characters for the surname field."
msgstr "Not allowed characters for the surname field."
#: libs/localization.py:51
msgid "The code is invalid or has expired."
msgstr "The code is invalid or has expired."
#: libs/localization.py:52
msgid "Passwords do not match!"
msgstr "Passwords do not match!"
#: libs/localization.py:53
msgid "" msgid ""
"The password must contain at least 8 characters, at least one number, " "The password must contain at least 8 characters, at least one number, "
"a capital letter and a special character." "a capital letter and a special character."
msgstr "" msgstr ""
"The password must contain at least 8 characters, at least one number, "
#: libs/localization.py:49 "a capital letter and a special character."
msgid "Congratulations, your account has been created!"
msgstr ""
#: libs/localization.py:50
msgid "Your first and last name have not been changed."
msgstr ""
#: libs/localization.py:51
msgid "Your firstname is a bit short, don't you think?"
msgstr ""
#: libs/localization.py:52
msgid "Your surname is a bit short, don't you think?"
msgstr ""
#: libs/localization.py:53
msgid "Your first and last name have been successfully updated."
msgstr ""
#: libs/localization.py:54 #: libs/localization.py:54
msgid "Invalid email address. Please try again." msgid "Congratulations, your account has been created!"
msgstr "" msgstr "Congratulations, your account has been created!"
#: libs/localization.py:55 #: libs/localization.py:55
msgid "Email address has not been changed." msgid "Your first and last name have not been changed."
msgstr "" msgstr "Your first and last name have not been changed."
#: libs/localization.py:56 #: libs/localization.py:56
msgid "Your email has been successfully updated." msgid "Your firstname is a bit short, don't you think?"
msgstr "" msgstr "Your firstname is a bit short, don't you think?"
#: libs/localization.py:57 #: libs/localization.py:57
msgid "The password entered is the same as the current password." msgid "Your surname is a bit short, don't you think?"
msgstr "" msgstr "Your surname is a bit short, don't you think?"
#: libs/localization.py:58 #: libs/localization.py:58
msgid "Password has been changed!" msgid "Your first and last name have been successfully updated."
msgstr "" msgstr "Your first and last name have been successfully updated."
#: libs/localization.py:59 #: libs/localization.py:59
msgid "Please, type your username for account deletion." msgid "Invalid email address. Please try again."
msgstr "" msgstr "Invalid email address. Please try again."
#: libs/localization.py:60 #: libs/localization.py:60
msgid "Account successfully deleted!" msgid "Email address has not been changed."
msgstr "" msgstr "Email address has not been changed."
#: libs/localization.py:61 #: libs/localization.py:61
msgid "Username or password is incorrect!" msgid "Your email has been successfully updated."
msgstr "" msgstr "Your email has been successfully updated."
#: libs/localization.py:62 #: libs/localization.py:62
msgid "Unable to connect to the remote server." msgid "The password entered is the same as the current password."
msgstr "" msgstr "The password entered is the same as the current password."
#: libs/localization.py:63 #: libs/localization.py:63
msgid "Password has been changed!"
msgstr "Password has been changed!"
#: libs/localization.py:64
msgid "Please, type your username for account deletion."
msgstr "Please, type your username for account deletion."
#: libs/localization.py:65
msgid "Account successfully deleted!"
msgstr "Account successfully deleted!"
#: libs/localization.py:66
msgid "Username or password is incorrect!"
msgstr "Username or password is incorrect!"
#: libs/localization.py:67
msgid "Unable to connect to the remote server."
msgstr "Unable to connect to the remote server."
#: libs/localization.py:68
msgid "" msgid ""
"Encountered an unexpected error while communicating with the remote server." "Encountered an unexpected error while communicating with the remote server."
msgstr "" msgstr ""
"Encountered an unexpected error while communicating with the remote server."
#: libs/localization.py:64 #: libs/localization.py:69
msgid "User already exists." msgid "User already exists."
msgstr "" msgstr "User already exists."
#: libs/localization.py:65 #: libs/localization.py:70
msgid "Email already exists." msgid "Email already exists."
msgstr "" msgstr "Email already exists."
#: libs/localization.py:66 #: libs/localization.py:71
msgid "Forgot your password? Please try again." msgid "Forgot your password? Please try again."
msgstr "" msgstr "Forgot your password? Please try again."
#: libs/localization.py:67 #: libs/localization.py:72
msgid "The session has expired." msgid "The session has expired."
msgstr "" msgstr "The session has expired."
#: libs/localization.py:68 #: libs/localization.py:73
msgid "Registration is currently closed. We apologize for the inconvenience." msgid "Registration is currently closed. We apologize for the inconvenience."
msgstr "" msgstr "Registration is currently closed. We apologize for the inconvenience."

Binary file not shown.

View File

@ -8,140 +8,156 @@ msgstr ""
"Project-Id-Version: 0.0.1\n" "Project-Id-Version: 0.0.1\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-04-07 17:20+0200\n" "POT-Creation-Date: 2022-04-07 17:20+0200\n"
"PO-Revision-Date: 2022-04-25 17:15+0200\n" "PO-Revision-Date: 2023-04-07 13:28+0200\n"
"Last-Translator: Aitzol Berasategi <aitzol@lainoa.eus>\n" "Last-Translator: Aitzol Berasategi <aitzol@lainoa.eus>\n"
"Language-Team: LANGUAGE <EN@en.org>\n" "Language-Team: LANGUAGE <EN@en.org>\n"
"Language: eu\n" "Language: en\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 2.3\n" "X-Generator: Poedit 2.3\n"
#: libs/localization.py:12 #: libs/localization.py:15
msgid "User" msgid "User"
msgstr "User" msgstr "User"
#: libs/localization.py:13 #: libs/localization.py:16
msgid "Username" msgid "Username"
msgstr "Username" msgstr "Username"
#: libs/localization.py:14 #: libs/localization.py:17
msgid "Firstname" msgid "Firstname"
msgstr "Firstname" msgstr "Firstname"
#: libs/localization.py:15 #: libs/localization.py:18
msgid "Surname" msgid "Surname"
msgstr "Surname" msgstr "Surname"
#: libs/localization.py:16 #: libs/localization.py:19
msgid "Password" msgid "Password"
msgstr "Password" msgstr "Password"
#: libs/localization.py:17 #: libs/localization.py:20
msgid "Old password" msgid "Old password"
msgstr "Old password" msgstr "Old password"
#: libs/localization.py:18 #: libs/localization.py:21
msgid "New password" msgid "New password"
msgstr "New password" msgstr "New password"
#: libs/localization.py:19 #: libs/localization.py:22
msgid "Confirm password" msgid "Confirm password"
msgstr "Confirm password" msgstr "Confirm password"
#: libs/localization.py:20 #: libs/localization.py:23
msgid "Email" msgid "Email"
msgstr "Email" msgstr "Email"
#: libs/localization.py:21 #: libs/localization.py:24
msgid "edit" msgid "edit"
msgstr "edit" msgstr "edit"
#: libs/localization.py:22 #: libs/localization.py:25
msgid "Login" msgid "Login"
msgstr "Login" msgstr "Login"
#: libs/localization.py:23 #: libs/localization.py:26
msgid "Logout" msgid "Logout"
msgstr "Logout" msgstr "Logout"
#: libs/localization.py:24 #: libs/localization.py:27
msgid "Delete" msgid "Delete"
msgstr "Delete" msgstr "Delete"
#: libs/localization.py:25 #: libs/localization.py:28
msgid "Sign Up" msgid "Sign Up"
msgstr "Sign Up" msgstr "Sign Up"
#: libs/localization.py:26 #: libs/localization.py:29
msgid "Back" msgid "Back"
msgstr "Back" msgstr "Back"
#: libs/localization.py:27 #: libs/localization.py:30
msgid "Update" msgid "Update"
msgstr "Update" msgstr "Update"
#: libs/localization.py:28 #: libs/localization.py:31
msgid "Or Sign In" msgid "Or Sign In"
msgstr "Or Sign In" msgstr "Or Sign In"
#: libs/localization.py:29 #: libs/localization.py:32
msgid "Or Sign Up" msgid "Or Sign Up"
msgstr "Or Sign Up" msgstr "Or Sign Up"
#: libs/localization.py:30 #: libs/localization.py:33
msgid "Invite code" msgid "Invite code"
msgstr "Invite code" msgstr "Invite code"
#: libs/localization.py:31 #: libs/localization.py:34
msgid "Edit your fullname" msgid "Edit your fullname"
msgstr "Edit your fullname" msgstr "Edit your fullname"
#: libs/localization.py:32 #: libs/localization.py:35
msgid "Edit your email" msgid "Edit your email"
msgstr "Edit your email" msgstr "Edit your email"
#: libs/localization.py:33 #: libs/localization.py:36
msgid "Change your password" msgid "Change your password"
msgstr "Change your password" msgstr "Change your password"
#: libs/localization.py:34 #: libs/localization.py:37
msgid "Delete your account" msgid "Delete your account"
msgstr "Delete your account" msgstr "Delete your account"
#: libs/localization.py:35 libs/localization.py:39 #: libs/localization.py:38 libs/localization.py:46
msgid "Welcome" msgid "Welcome"
msgstr "Welcome" msgstr "Welcome"
#: libs/localization.py:39
msgid "Logs"
msgstr "Logs"
#: libs/localization.py:40 #: libs/localization.py:40
msgid "Last login"
msgstr "Last login"
#: libs/localization.py:41
msgid "Devices"
msgstr "Devices"
#: libs/localization.py:42
msgid "show"
msgstr "show"
#: libs/localization.py:45
msgid "The session was closed." msgid "The session was closed."
msgstr "The session was closed." msgstr "The session was closed."
#: libs/localization.py:42 #: libs/localization.py:47
msgid "Username must be at least 3 characters long!" msgid "Username must be at least 3 characters long!"
msgstr "Username must be at least 3 characters long!" msgstr "Username must be at least 3 characters long!"
#: libs/localization.py:43 #: libs/localization.py:48
msgid "Not allowed characters for the username field." msgid "Not allowed characters for the username field."
msgstr "Not allowed characters for the username field." msgstr "Not allowed characters for the username field."
#: libs/localization.py:44 #: libs/localization.py:49
msgid "Not allowed characters for the firstname field." msgid "Not allowed characters for the firstname field."
msgstr "Not allowed characters for the firstname field." msgstr "Not allowed characters for the firstname field."
#: libs/localization.py:45 #: libs/localization.py:50
msgid "Not allowed characters for the surname field." msgid "Not allowed characters for the surname field."
msgstr "Not allowed characters for the surname field." msgstr "Not allowed characters for the surname field."
#: libs/localization.py:46 #: libs/localization.py:51
msgid "The code is invalid or has expired." msgid "The code is invalid or has expired."
msgstr "The code is invalid or has expired." msgstr "The code is invalid or has expired."
#: libs/localization.py:47 #: libs/localization.py:52
msgid "Passwords do not match!" msgid "Passwords do not match!"
msgstr "Passwords do not match!" msgstr "Passwords do not match!"
#: libs/localization.py:48 #: libs/localization.py:53
msgid "" msgid ""
"The password must contain at least 8 characters, at least one number, " "The password must contain at least 8 characters, at least one number, "
"a capital letter and a special character." "a capital letter and a special character."
@ -149,84 +165,84 @@ msgstr ""
"The password must contain at least 8 characters, at least one number, " "The password must contain at least 8 characters, at least one number, "
"a capital letter and a special character." "a capital letter and a special character."
#: libs/localization.py:49 #: libs/localization.py:54
msgid "Congratulations, your account has been created!" msgid "Congratulations, your account has been created!"
msgstr "Congratulations, your account has been created!" msgstr "Congratulations, your account has been created!"
#: libs/localization.py:50 #: libs/localization.py:55
msgid "Your first and last name have not been changed." msgid "Your first and last name have not been changed."
msgstr "Your first and last name have not been changed." msgstr "Your first and last name have not been changed."
#: libs/localization.py:51 #: libs/localization.py:56
msgid "Your firstname is a bit short, don't you think?" msgid "Your firstname is a bit short, don't you think?"
msgstr "Your firstname is a bit short, don't you think?" msgstr "Your firstname is a bit short, don't you think?"
#: libs/localization.py:52 #: libs/localization.py:57
msgid "Your surname is a bit short, don't you think?" msgid "Your surname is a bit short, don't you think?"
msgstr "Your surname is a bit short, don't you think?" msgstr "Your surname is a bit short, don't you think?"
#: libs/localization.py:53 #: libs/localization.py:58
msgid "Your first and last name have been successfully updated." msgid "Your first and last name have been successfully updated."
msgstr "Your first and last name have been successfully updated." msgstr "Your first and last name have been successfully updated."
#: libs/localization.py:54 #: libs/localization.py:59
msgid "Invalid email address. Please try again." msgid "Invalid email address. Please try again."
msgstr "Invalid email address. Please try again." msgstr "Invalid email address. Please try again."
#: libs/localization.py:55 #: libs/localization.py:60
msgid "Email address has not been changed." msgid "Email address has not been changed."
msgstr "Email address has not been changed." msgstr "Email address has not been changed."
#: libs/localization.py:56 #: libs/localization.py:61
msgid "Your email has been successfully updated." msgid "Your email has been successfully updated."
msgstr "Your email has been successfully updated." msgstr "Your email has been successfully updated."
#: libs/localization.py:57 #: libs/localization.py:62
msgid "The password entered is the same as the current password." msgid "The password entered is the same as the current password."
msgstr "The password entered is the same as the current password." msgstr "The password entered is the same as the current password."
#: libs/localization.py:58 #: libs/localization.py:63
msgid "Password has been changed!" msgid "Password has been changed!"
msgstr "Password has been changed!" msgstr "Password has been changed!"
#: libs/localization.py:59 #: libs/localization.py:64
msgid "Please, type your username for account deletion." msgid "Please, type your username for account deletion."
msgstr "Please, type your username for account deletion." msgstr "Please, type your username for account deletion."
#: libs/localization.py:60 #: libs/localization.py:65
msgid "Account successfully deleted!" msgid "Account successfully deleted!"
msgstr "Account successfully deleted!" msgstr "Account successfully deleted!"
#: libs/localization.py:61 #: libs/localization.py:66
msgid "Username or password is incorrect!" msgid "Username or password is incorrect!"
msgstr "Username or password is incorrect!" msgstr "Username or password is incorrect!"
#: libs/localization.py:62 #: libs/localization.py:67
msgid "Unable to connect to the remote server." msgid "Unable to connect to the remote server."
msgstr "Unable to connect to the remote server." msgstr "Unable to connect to the remote server."
#: libs/localization.py:63 #: libs/localization.py:68
msgid "" msgid ""
"Encountered an unexpected error while communicating with the remote server." "Encountered an unexpected error while communicating with the remote server."
msgstr "" msgstr ""
"Encountered an unexpected error while communicating with the remote server." "Encountered an unexpected error while communicating with the remote server."
#: libs/localization.py:64 #: libs/localization.py:69
msgid "User already exists." msgid "User already exists."
msgstr "User already exists." msgstr "User already exists."
#: libs/localization.py:65 #: libs/localization.py:70
msgid "Email already exists." msgid "Email already exists."
msgstr "Email already exists." msgstr "Email already exists."
#: libs/localization.py:66 #: libs/localization.py:71
msgid "Forgot your password? Please try again." msgid "Forgot your password? Please try again."
msgstr "Forgot your password? Please try again." msgstr "Forgot your password? Please try again."
#: libs/localization.py:67 #: libs/localization.py:72
msgid "The session has expired." msgid "The session has expired."
msgstr "The session has expired." msgstr "The session has expired."
#: libs/localization.py:68 #: libs/localization.py:73
msgid "Registration is currently closed. We apologize for the inconvenience." msgid "Registration is currently closed. We apologize for the inconvenience."
msgstr "Registration is currently closed. We apologize for the inconvenience." msgstr "Registration is currently closed. We apologize for the inconvenience."

Binary file not shown.

View File

@ -8,7 +8,7 @@ msgstr ""
"Project-Id-Version: 0.0.1\n" "Project-Id-Version: 0.0.1\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-04-07 17:23+0200\n" "POT-Creation-Date: 2022-04-07 17:23+0200\n"
"PO-Revision-Date: 2022-04-25 17:10+0200\n" "PO-Revision-Date: 2023-04-07 13:27+0200\n"
"Last-Translator: Aitzol Berasategi <aitzol@lainoa.eus>\n" "Last-Translator: Aitzol Berasategi <aitzol@lainoa.eus>\n"
"Language-Team: LANGUAGE <EU@eu.org>\n" "Language-Team: LANGUAGE <EU@eu.org>\n"
"Language: eu\n" "Language: eu\n"
@ -17,131 +17,147 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 2.3\n" "X-Generator: Poedit 2.3\n"
#: libs/localization.py:12 #: libs/localization.py:15
msgid "User" msgid "User"
msgstr "Erabiltzailea" msgstr "Erabiltzailea"
#: libs/localization.py:13 #: libs/localization.py:16
msgid "Username" msgid "Username"
msgstr "Erabiltzailea" msgstr "Erabiltzailea"
#: libs/localization.py:14 #: libs/localization.py:17
msgid "Firstname" msgid "Firstname"
msgstr "Izena" msgstr "Izena"
#: libs/localization.py:15 #: libs/localization.py:18
msgid "Surname" msgid "Surname"
msgstr "Abizena" msgstr "Abizena"
#: libs/localization.py:16 #: libs/localization.py:19
msgid "Password" msgid "Password"
msgstr "Pasahitza" msgstr "Pasahitza"
#: libs/localization.py:17 #: libs/localization.py:20
msgid "Old password" msgid "Old password"
msgstr "Pasahitz zaharra" msgstr "Pasahitz zaharra"
#: libs/localization.py:18 #: libs/localization.py:21
msgid "New password" msgid "New password"
msgstr "Pasahitz berria" msgstr "Pasahitz berria"
#: libs/localization.py:19 #: libs/localization.py:22
msgid "Confirm password" msgid "Confirm password"
msgstr "Pasahitza berretsi" msgstr "Pasahitza berretsi"
#: libs/localization.py:20 #: libs/localization.py:23
msgid "Email" msgid "Email"
msgstr "Emaila" msgstr "Emaila"
#: libs/localization.py:21 #: libs/localization.py:24
msgid "edit" msgid "edit"
msgstr "editatu" msgstr "editatu"
#: libs/localization.py:22 #: libs/localization.py:25
msgid "Login" msgid "Login"
msgstr "Saioa hasi" msgstr "Saioa hasi"
#: libs/localization.py:23 #: libs/localization.py:26
msgid "Logout" msgid "Logout"
msgstr "Saioa itxi" msgstr "Saioa itxi"
#: libs/localization.py:24 #: libs/localization.py:27
msgid "Delete" msgid "Delete"
msgstr "Ezabatu" msgstr "Ezabatu"
#: libs/localization.py:25 #: libs/localization.py:28
msgid "Sign Up" msgid "Sign Up"
msgstr "Kontua sortu" msgstr "Kontua sortu"
#: libs/localization.py:26 #: libs/localization.py:29
msgid "Back" msgid "Back"
msgstr "Itzuli" msgstr "Itzuli"
#: libs/localization.py:27 #: libs/localization.py:30
msgid "Update" msgid "Update"
msgstr "Eguneratu" msgstr "Eguneratu"
#: libs/localization.py:28 #: libs/localization.py:31
msgid "Or Sign In" msgid "Or Sign In"
msgstr "Edo Saioa hasi" msgstr "Edo Saioa hasi"
#: libs/localization.py:29 #: libs/localization.py:32
msgid "Or Sign Up" msgid "Or Sign Up"
msgstr "Edo Kontua sortu" msgstr "Edo Kontua sortu"
#: libs/localization.py:30 #: libs/localization.py:33
msgid "Invite code" msgid "Invite code"
msgstr "Gonbidapen kodea" msgstr "Gonbidapen kodea"
#: libs/localization.py:31 #: libs/localization.py:34
msgid "Edit your fullname" msgid "Edit your fullname"
msgstr "Izen-abizenak editatu" msgstr "Izen-abizenak editatu"
#: libs/localization.py:32 #: libs/localization.py:35
msgid "Edit your email" msgid "Edit your email"
msgstr "Email helbidea editatu" msgstr "Email helbidea editatu"
#: libs/localization.py:33 #: libs/localization.py:36
msgid "Change your password" msgid "Change your password"
msgstr "Pasahitza eguneratu" msgstr "Pasahitza eguneratu"
#: libs/localization.py:34 #: libs/localization.py:37
msgid "Delete your account" msgid "Delete your account"
msgstr "Kontua ezabatu" msgstr "Kontua ezabatu"
#: libs/localization.py:35 libs/localization.py:41 #: libs/localization.py:38 libs/localization.py:46
msgid "Welcome" msgid "Welcome"
msgstr "Ongi etorri" msgstr "Ongi etorri"
#: libs/localization.py:39
msgid "Logs"
msgstr "Erregistroak"
#: libs/localization.py:40 #: libs/localization.py:40
msgid "Last login"
msgstr "Azken saio hasiera"
#: libs/localization.py:41
msgid "Devices"
msgstr "Gailuak"
#: libs/localization.py:42
msgid "show"
msgstr "ikusi"
#: libs/localization.py:45
msgid "The session was closed." msgid "The session was closed."
msgstr "Saioa itxi da." msgstr "Saioa itxi da."
#: libs/localization.py:42 #: libs/localization.py:47
msgid "Username must be at least 3 characters long!" msgid "Username must be at least 3 characters long!"
msgstr "Erabiltzaile izenak gutxienez 3 karaktere izan behar ditu!" msgstr "Erabiltzaile izenak gutxienez 3 karaktere izan behar ditu!"
#: libs/localization.py:43 #: libs/localization.py:48
msgid "Not allowed characters for the username field." msgid "Not allowed characters for the username field."
msgstr "Erabiltzaile-izenaren eremurako onartzen ez diren karaktereak." msgstr "Erabiltzaile-izenaren eremurako onartzen ez diren karaktereak."
#: libs/localization.py:44 #: libs/localization.py:49
msgid "Not allowed characters for the firstname field." msgid "Not allowed characters for the firstname field."
msgstr "Izenaren eremurako onartzen ez diren karaktereak." msgstr "Izenaren eremurako onartzen ez diren karaktereak."
#: libs/localization.py:45 #: libs/localization.py:50
msgid "Not allowed characters for the surname field." msgid "Not allowed characters for the surname field."
msgstr "Abizenaren eremurako onartzen ez diren karaktereak." msgstr "Abizenaren eremurako onartzen ez diren karaktereak."
#: libs/localization.py:46 #: libs/localization.py:51
msgid "The code is invalid or has expired." msgid "The code is invalid or has expired."
msgstr "Kodea baliogabea da edo iraungi egin da." msgstr "Kodea baliogabea da edo iraungi egin da."
#: libs/localization.py:47 #: libs/localization.py:52
msgid "Passwords do not match!" msgid "Passwords do not match!"
msgstr "Pasahitzak ez datoz bat!" msgstr "Pasahitzak ez datoz bat!"
#: libs/localization.py:48 #: libs/localization.py:53
msgid "" msgid ""
"The password must contain at least 8 characters, at least one number, " "The password must contain at least 8 characters, at least one number, "
"a capital letter and a special character." "a capital letter and a special character."
@ -149,83 +165,83 @@ msgstr ""
"Pasahitzak gutxienez 8 karaktere izan behar ditu, zenbaki bat, hizki larri bat " "Pasahitzak gutxienez 8 karaktere izan behar ditu, zenbaki bat, hizki larri bat "
"eta karaktere berezi bat." "eta karaktere berezi bat."
#: libs/localization.py:49 #: libs/localization.py:54
msgid "Congratulations, your account has been created!" msgid "Congratulations, your account has been created!"
msgstr "Zorionak, zure kontua sortu da!" msgstr "Zorionak, zure kontua sortu da!"
#: libs/localization.py:50 #: libs/localization.py:55
msgid "Your first and last name have not been changed." msgid "Your first and last name have not been changed."
msgstr "Zure izen-abizenak ez dira aldatu." msgstr "Zure izen-abizenak ez dira aldatu."
#: libs/localization.py:51 #: libs/localization.py:56
msgid "Your firstname is a bit short, don't you think?" msgid "Your firstname is a bit short, don't you think?"
msgstr "Zure izena labur-xamarra da, ez duzu uste?" msgstr "Zure izena labur-xamarra da, ez duzu uste?"
#: libs/localization.py:52 #: libs/localization.py:57
msgid "Your surname is a bit short, don't you think?" msgid "Your surname is a bit short, don't you think?"
msgstr "Zure abizena labur-xamarra da, ez duzu uste?" msgstr "Zure abizena labur-xamarra da, ez duzu uste?"
#: libs/localization.py:53 #: libs/localization.py:58
msgid "Your first and last name have been successfully updated." msgid "Your first and last name have been successfully updated."
msgstr "Zure izen-abizenak ongi eguneratu dira." msgstr "Zure izen-abizenak ongi eguneratu dira."
#: libs/localization.py:54 #: libs/localization.py:59
msgid "Invalid email address. Please try again." msgid "Invalid email address. Please try again."
msgstr "Baliogabeko email helbidea. Saia zaitez berriz, mesedez." msgstr "Baliogabeko email helbidea. Saia zaitez berriz, mesedez."
#: libs/localization.py:55 #: libs/localization.py:60
msgid "Email address has not been changed." msgid "Email address has not been changed."
msgstr "Email helbidea ez da aldatu." msgstr "Email helbidea ez da aldatu."
#: libs/localization.py:56 #: libs/localization.py:61
msgid "Your email has been successfully updated." msgid "Your email has been successfully updated."
msgstr "Zure emaila ongi eguneratu da." msgstr "Zure emaila ongi eguneratu da."
#: libs/localization.py:57 #: libs/localization.py:62
msgid "The password entered is the same as the current password." msgid "The password entered is the same as the current password."
msgstr "Sartutako pasahitza egungo pasahitzaren berdina da." msgstr "Sartutako pasahitza egungo pasahitzaren berdina da."
#: libs/localization.py:58 #: libs/localization.py:63
msgid "Password has been changed!" msgid "Password has been changed!"
msgstr "Pasahitza eguneratua izan da!" msgstr "Pasahitza eguneratua izan da!"
#: libs/localization.py:59 #: libs/localization.py:64
msgid "Please, type your username for account deletion." msgid "Please, type your username for account deletion."
msgstr "Kontua ezabatzeko idatzi zure erabiltzaile izena, mesedez." msgstr "Kontua ezabatzeko idatzi zure erabiltzaile izena, mesedez."
#: libs/localization.py:60 #: libs/localization.py:65
msgid "Account successfully deleted!" msgid "Account successfully deleted!"
msgstr "Kontua ongi ezabatu da!" msgstr "Kontua ongi ezabatu da!"
#: libs/localization.py:61 #: libs/localization.py:66
msgid "Username or password is incorrect!" msgid "Username or password is incorrect!"
msgstr "Erabiltzaile izena edo pasahitza okerrak dira!" msgstr "Erabiltzaile izena edo pasahitza okerrak dira!"
#: libs/localization.py:62 #: libs/localization.py:67
msgid "Unable to connect to the remote server." msgid "Unable to connect to the remote server."
msgstr "Ezinezkoa urruneko zerbitzara konektatzea." msgstr "Ezinezkoa urruneko zerbitzara konektatzea."
#: libs/localization.py:63 #: libs/localization.py:68
msgid "" msgid ""
"Encountered an unexpected error while communicating with the remote server." "Encountered an unexpected error while communicating with the remote server."
msgstr "Ezusteko errore bat gertatu da urruneko zerbitzariarekin komunikatzean." msgstr "Ezusteko errore bat gertatu da urruneko zerbitzariarekin komunikatzean."
#: libs/localization.py:64 #: libs/localization.py:69
msgid "User already exists." msgid "User already exists."
msgstr "Erabiltzaile hori existitzen da." msgstr "Erabiltzaile hori existitzen da."
#: libs/localization.py:65 #: libs/localization.py:70
msgid "Email already exists." msgid "Email already exists."
msgstr "Email hori existitzen da." msgstr "Email hori existitzen da."
#: libs/localization.py:66 #: libs/localization.py:71
msgid "Forgot your password? Please try again." msgid "Forgot your password? Please try again."
msgstr "Zure pasahitza ahaztu duzu? Saia zeitez berriz, mesedez." msgstr "Zure pasahitza ahaztu duzu? Saia zeitez berriz, mesedez."
#: libs/localization.py:67 #: libs/localization.py:72
msgid "The session has expired." msgid "The session has expired."
msgstr "Saioa iraungi egin da." msgstr "Saioa iraungi egin da."
#: libs/localization.py:68 #: libs/localization.py:73
msgid "Registration is currently closed. We apologize for the inconvenience." msgid "Registration is currently closed. We apologize for the inconvenience."
msgstr "Izen-ematea itxita dago une honetan. Barkatu eragozpenak." msgstr "Izen-ematea itxita dago une honetan. Barkatu eragozpenak."

View File

@ -6,38 +6,33 @@
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="robots" content="noindex, nofollow"> <meta name="robots" content="noindex, nofollow">
<title>{{ str['edit-email'] }}</title> <title>{{ str['logs'] }}</title>
<link rel="stylesheet" href="{{ url('static', filename='style.css') }}"> <link rel="stylesheet" href="{{ url('static', filename='style.css') }}">
</head> </head>
<body> <body>
<main> <main>
<h1>{{ str['edit-email'] }}Erregistroak</h1> <h1>{{ str['logs'] }}</h1>
<form name="editEmailForm" method="post" action="/edit_email">
<label for="email">{{ str['email'] }}</label>
<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>
<button class="green" type="submit">{{ str['update'] }}</button>
</div>
</form>
<div class="logs"> <div class="logs">
<div class="last-login"> <div class="last-login">
<h5>Last login</h5> <h5>{{ str['last-login'] }}</h5>
<p>{{ data['ip'] }}</p> <div class="last-login-info">
<p>{{ data['lastLogin'] }}</p> <p>{{ data['ip'] }}</p>
<p class="date">{{ data['lastLogin'] }}</p>
</div>
</div> </div>
<div class="device-list"> <div class="device-list">
<h5>Devices</h5> <h5>{{ str['devices'] }}</h5>
<li>PC / Linux / Firefox 102.0</li> %for device in data['devices']:
<li>Samsung A5 2016 / Android 10 / Chrome</li> <li>{{ device }}</li>
<li>Iphone 5S / Iphone 11 / Safari 12</li> %end
</div> </div>
<div class="form-buttons">
<a href="/user"><button class="green" type="button">{{ str['back'] }}</button></a>
</div>
</div> </div>
%for type, text, animation in get('alerts', []): %for type, text, animation in get('alerts', []):

View File

@ -127,6 +127,28 @@ button.red:hover{
border-color: #C92F1E; border-color: #C92F1E;
} }
.last-login-info {
background-color: #efefef;
/*background-image: linear-gradient(#fcfcfc, #f5f5f5);*/
background-image: linear-gradient(#f9e028, #ffd966);
padding-top: 1px;
padding-bottom: 1px;
border-radius: 0.2rem;
text-align: center;
}
.date {
font-weight: 100;
font-size: 0.8em;
}
.device-list li{
background-color: #efefef;
background-image: linear-gradient(#fcfcfc, #f6f6f6);
list-style: none;
font-size: 0.7em;
margin-bottom: 2px;
padding: 2px;
border-radius: 0.2rem;
}
/*alerts*/ /*alerts*/
.alerts { .alerts {

View File

@ -53,12 +53,12 @@
<div class="grid-item"> <div class="grid-item">
<div class="account"> <div class="account">
<h5>Erregistroak</h5> <h5>{{ str['logs'] }}</h5>
</div> </div>
</div> </div>
<div class="grid-item"> <div class="grid-item">
<a href="/logs">ikusi</a> <a href="/logs">{{ str['show'] }}</a>
</div> </div>