diff --git a/app.py b/app.py index 80bcc63..91a9e57 100644 --- a/app.py +++ b/app.py @@ -32,7 +32,7 @@ import logging from os import getenv, environ, path from libs import flist, slist from libs.localization import * -from libs.helper import * +from libs.helper import tools import random from user_agents import parse from datetime import datetime @@ -120,7 +120,6 @@ def get_index(): @post('/user') def post_user(): form = request.forms.getunicode - tools = Tools() def error(msg): return index_tpl(alerts=[('error', msg, 'fadeOut')], str=i18n.str) @@ -151,7 +150,6 @@ def post_signup(): form = request.forms.getunicode isFake = False - tools = Tools() db = 'data/invite-codes.db' def auto_complete(arg): @@ -214,7 +212,6 @@ def post_signup(): @post('/edit_fullname') def post_edit_fullname(): form = request.forms.getunicode - tools = Tools() try: username = newSession().get()['username'] @@ -247,7 +244,6 @@ def post_edit_fullname(): @post('/edit_email') def post_edit_email(): form = request.forms.getunicode - tools = Tools() try: username = newSession().get()['username'] @@ -272,7 +268,6 @@ def post_edit_email(): @post('/change_pwd') def post_change_pwd(): form = request.forms.getunicode - tools = Tools() try: username=newSession().get()['username'] @@ -305,7 +300,6 @@ def post_change_pwd(): @post('/delete') def post_delete(): form = request.forms.getunicode - tools = Tools() def error(msg): return delete_tpl(alerts=[('error', msg, 'fadeOut')], str=i18n.str) diff --git a/libs/helper.py b/libs/helper.py index 019c4f4..2edf5c3 100644 --- a/libs/helper.py +++ b/libs/helper.py @@ -42,3 +42,5 @@ class Tools(): def pwd_validation(self, e): regex = r'^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*#?&])[A-Za-z\d@$!#%*?&]{8,18}$' return(bool(re.fullmatch(regex, e))) + +tools = Tools() diff --git a/libs/localization.py b/libs/localization.py index 4335c66..2f4ff93 100644 --- a/libs/localization.py +++ b/libs/localization.py @@ -36,6 +36,10 @@ class LocalizeTo(object): str_21 = _("Change your password") str_22 = _("Delete your account") str_23 = _("Welcome") + str_24 = _("Logs") + str_25 = _("Last login") + str_26 = _("Devices") + str_27 = _("show") #messages msg_00 = _("The session was closed.") @@ -68,5 +72,10 @@ class LocalizeTo(object): msg_27 = _("The session has expired.") 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) diff --git a/locales/base.pot b/locales/base.pot index 8c10719..1418d44 100644 --- a/locales/base.pot +++ b/locales/base.pot @@ -9,7 +9,7 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \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 \n" "Language-Team: LANGUAGE \n" "Language: \n" @@ -17,213 +17,232 @@ msgstr "" "Content-Type: text/plain; charset=CHARSET\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 -msgid "Surname" -msgstr "" +msgid "User" +msgstr "User" #: libs/localization.py:16 -msgid "Password" -msgstr "" +msgid "Username" +msgstr "Username" #: libs/localization.py:17 -msgid "Old password" -msgstr "" +msgid "Firstname" +msgstr "Firstname" #: libs/localization.py:18 -msgid "New password" -msgstr "" +msgid "Surname" +msgstr "Surname" #: libs/localization.py:19 -msgid "Confirm password" -msgstr "" +msgid "Password" +msgstr "Password" #: libs/localization.py:20 -msgid "Email" -msgstr "" +msgid "Old password" +msgstr "Old password" #: libs/localization.py:21 -msgid "edit" -msgstr "" +msgid "New password" +msgstr "New password" #: libs/localization.py:22 -msgid "Login" -msgstr "" +msgid "Confirm password" +msgstr "Confirm password" #: libs/localization.py:23 -msgid "Logout" -msgstr "" +msgid "Email" +msgstr "Email" #: libs/localization.py:24 -msgid "Delete" -msgstr "" +msgid "edit" +msgstr "edit" #: libs/localization.py:25 -msgid "Sign Up" -msgstr "" +msgid "Login" +msgstr "Login" #: libs/localization.py:26 -msgid "Back" -msgstr "" +msgid "Logout" +msgstr "Logout" #: libs/localization.py:27 -msgid "Update" -msgstr "" +msgid "Delete" +msgstr "Delete" #: libs/localization.py:28 -msgid "Or Sign In" -msgstr "" +msgid "Sign Up" +msgstr "Sign Up" #: libs/localization.py:29 -msgid "Or Sign Up" -msgstr "" +msgid "Back" +msgstr "Back" #: libs/localization.py:30 -msgid "Invite code" -msgstr "" +msgid "Update" +msgstr "Update" #: libs/localization.py:31 -msgid "Edit your fullname" -msgstr "" +msgid "Or Sign In" +msgstr "Or Sign In" #: libs/localization.py:32 -msgid "Edit your email" -msgstr "" +msgid "Or Sign Up" +msgstr "Or Sign Up" #: libs/localization.py:33 -msgid "Change your password" -msgstr "" +msgid "Invite code" +msgstr "Invite code" #: libs/localization.py:34 -msgid "Delete your account" -msgstr "" +msgid "Edit your fullname" +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" -msgstr "" +msgstr "Welcome" + +#: libs/localization.py:39 +msgid "Logs" +msgstr "Logs" #: libs/localization.py:40 -msgid "The session was closed." -msgstr "" +msgid "Last login" +msgstr "Last login" + +#: libs/localization.py:41 +msgid "Devices" +msgstr "Devices" #: libs/localization.py:42 -msgid "Username must be at least 3 characters long!" -msgstr "" - -#: 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 "" +msgid "show" +msgstr "show" #: libs/localization.py:45 -msgid "Not allowed characters for the surname field." -msgstr "" - -#: libs/localization.py:46 -msgid "The code is invalid or has expired." -msgstr "" +msgid "The session was closed." +msgstr "The session was closed." #: libs/localization.py:47 -msgid "Passwords do not match!" -msgstr "" +msgid "Username must be at least 3 characters long!" +msgstr "Username must be at least 3 characters long!" #: 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 "" "The password must contain at least 8 characters, at least one number, " "a capital letter and a special character." msgstr "" - -#: libs/localization.py:49 -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 "" +"The password must contain at least 8 characters, at least one number, " +"a capital letter and a special character." #: libs/localization.py:54 -msgid "Invalid email address. Please try again." -msgstr "" +msgid "Congratulations, your account has been created!" +msgstr "Congratulations, your account has been created!" #: libs/localization.py:55 -msgid "Email address has not been changed." -msgstr "" +msgid "Your first and last name have not been changed." +msgstr "Your first and last name have not been changed." #: libs/localization.py:56 -msgid "Your email has been successfully updated." -msgstr "" +msgid "Your firstname is a bit short, don't you think?" +msgstr "Your firstname is a bit short, don't you think?" #: libs/localization.py:57 -msgid "The password entered is the same as the current password." -msgstr "" +msgid "Your surname is a bit short, don't you think?" +msgstr "Your surname is a bit short, don't you think?" #: libs/localization.py:58 -msgid "Password has been changed!" -msgstr "" +msgid "Your first and last name have been successfully updated." +msgstr "Your first and last name have been successfully updated." #: libs/localization.py:59 -msgid "Please, type your username for account deletion." -msgstr "" +msgid "Invalid email address. Please try again." +msgstr "Invalid email address. Please try again." #: libs/localization.py:60 -msgid "Account successfully deleted!" -msgstr "" +msgid "Email address has not been changed." +msgstr "Email address has not been changed." #: libs/localization.py:61 -msgid "Username or password is incorrect!" -msgstr "" +msgid "Your email has been successfully updated." +msgstr "Your email has been successfully updated." #: libs/localization.py:62 -msgid "Unable to connect to the remote server." -msgstr "" +msgid "The password entered is the same as the current password." +msgstr "The password entered is the same as the current password." #: 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 "" "Encountered an unexpected error while communicating with the remote server." msgstr "" +"Encountered an unexpected error while communicating with the remote server." -#: libs/localization.py:64 +#: libs/localization.py:69 msgid "User already exists." -msgstr "" +msgstr "User already exists." -#: libs/localization.py:65 +#: libs/localization.py:70 msgid "Email already exists." -msgstr "" +msgstr "Email already exists." -#: libs/localization.py:66 +#: libs/localization.py:71 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." -msgstr "" +msgstr "The session has expired." -#: libs/localization.py:68 +#: libs/localization.py:73 msgid "Registration is currently closed. We apologize for the inconvenience." -msgstr "" \ No newline at end of file +msgstr "Registration is currently closed. We apologize for the inconvenience." diff --git a/locales/en/LC_MESSAGES/base.mo b/locales/en/LC_MESSAGES/base.mo index a26a2ba..e5a39ae 100644 Binary files a/locales/en/LC_MESSAGES/base.mo and b/locales/en/LC_MESSAGES/base.mo differ diff --git a/locales/en/LC_MESSAGES/base.po b/locales/en/LC_MESSAGES/base.po index bc0d35b..7243488 100644 --- a/locales/en/LC_MESSAGES/base.po +++ b/locales/en/LC_MESSAGES/base.po @@ -8,140 +8,156 @@ msgstr "" "Project-Id-Version: 0.0.1\n" "Report-Msgid-Bugs-To: \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 \n" "Language-Team: LANGUAGE \n" -"Language: eu\n" +"Language: en\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Generator: Poedit 2.3\n" -#: libs/localization.py:12 +#: libs/localization.py:15 msgid "User" msgstr "User" -#: libs/localization.py:13 +#: libs/localization.py:16 msgid "Username" msgstr "Username" -#: libs/localization.py:14 +#: libs/localization.py:17 msgid "Firstname" msgstr "Firstname" -#: libs/localization.py:15 +#: libs/localization.py:18 msgid "Surname" msgstr "Surname" -#: libs/localization.py:16 +#: libs/localization.py:19 msgid "Password" msgstr "Password" -#: libs/localization.py:17 +#: libs/localization.py:20 msgid "Old password" msgstr "Old password" -#: libs/localization.py:18 +#: libs/localization.py:21 msgid "New password" msgstr "New password" -#: libs/localization.py:19 +#: libs/localization.py:22 msgid "Confirm password" msgstr "Confirm password" -#: libs/localization.py:20 +#: libs/localization.py:23 msgid "Email" msgstr "Email" -#: libs/localization.py:21 +#: libs/localization.py:24 msgid "edit" msgstr "edit" -#: libs/localization.py:22 +#: libs/localization.py:25 msgid "Login" msgstr "Login" -#: libs/localization.py:23 +#: libs/localization.py:26 msgid "Logout" msgstr "Logout" -#: libs/localization.py:24 +#: libs/localization.py:27 msgid "Delete" msgstr "Delete" -#: libs/localization.py:25 +#: libs/localization.py:28 msgid "Sign Up" msgstr "Sign Up" -#: libs/localization.py:26 +#: libs/localization.py:29 msgid "Back" msgstr "Back" -#: libs/localization.py:27 +#: libs/localization.py:30 msgid "Update" msgstr "Update" -#: libs/localization.py:28 +#: libs/localization.py:31 msgid "Or Sign In" msgstr "Or Sign In" -#: libs/localization.py:29 +#: libs/localization.py:32 msgid "Or Sign Up" msgstr "Or Sign Up" -#: libs/localization.py:30 +#: libs/localization.py:33 msgid "Invite code" msgstr "Invite code" -#: libs/localization.py:31 +#: libs/localization.py:34 msgid "Edit your fullname" msgstr "Edit your fullname" -#: libs/localization.py:32 +#: libs/localization.py:35 msgid "Edit your email" msgstr "Edit your email" -#: libs/localization.py:33 +#: libs/localization.py:36 msgid "Change your password" msgstr "Change your password" -#: libs/localization.py:34 +#: libs/localization.py:37 msgid "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" msgstr "Welcome" +#: libs/localization.py:39 +msgid "Logs" +msgstr "Logs" + #: 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." msgstr "The session was closed." -#: libs/localization.py:42 +#: libs/localization.py:47 msgid "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." msgstr "Not allowed characters for the username field." -#: libs/localization.py:44 +#: libs/localization.py:49 msgid "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." msgstr "Not allowed characters for the surname field." -#: libs/localization.py:46 +#: libs/localization.py:51 msgid "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!" msgstr "Passwords do not match!" -#: libs/localization.py:48 +#: libs/localization.py:53 msgid "" "The password must contain at least 8 characters, at least one number, " "a capital letter and a special character." @@ -149,84 +165,84 @@ msgstr "" "The password must contain at least 8 characters, at least one number, " "a capital letter and a special character." -#: libs/localization.py:49 +#: libs/localization.py:54 msgid "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." 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?" 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?" 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." 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." msgstr "Invalid email address. Please try again." -#: libs/localization.py:55 +#: libs/localization.py:60 msgid "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." 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." msgstr "The password entered is the same as the current password." -#: libs/localization.py:58 +#: libs/localization.py:63 msgid "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." msgstr "Please, type your username for account deletion." -#: libs/localization.py:60 +#: libs/localization.py:65 msgid "Account successfully deleted!" msgstr "Account successfully deleted!" -#: libs/localization.py:61 +#: libs/localization.py:66 msgid "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." msgstr "Unable to connect to the remote server." -#: libs/localization.py:63 +#: libs/localization.py:68 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:64 +#: libs/localization.py:69 msgid "User already exists." msgstr "User already exists." -#: libs/localization.py:65 +#: libs/localization.py:70 msgid "Email already exists." msgstr "Email already exists." -#: libs/localization.py:66 +#: libs/localization.py:71 msgid "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." msgstr "The session has expired." -#: libs/localization.py:68 +#: libs/localization.py:73 msgid "Registration is currently closed. We apologize for the inconvenience." -msgstr "Registration is currently closed. We apologize for the inconvenience." \ No newline at end of file +msgstr "Registration is currently closed. We apologize for the inconvenience." diff --git a/locales/eu/LC_MESSAGES/base.mo b/locales/eu/LC_MESSAGES/base.mo index fee4351..0c4c6fd 100644 Binary files a/locales/eu/LC_MESSAGES/base.mo and b/locales/eu/LC_MESSAGES/base.mo differ diff --git a/locales/eu/LC_MESSAGES/base.po b/locales/eu/LC_MESSAGES/base.po index 3aa33ca..9b4dac2 100644 --- a/locales/eu/LC_MESSAGES/base.po +++ b/locales/eu/LC_MESSAGES/base.po @@ -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-25 17:10+0200\n" +"PO-Revision-Date: 2023-04-07 13:27+0200\n" "Last-Translator: Aitzol Berasategi \n" "Language-Team: LANGUAGE \n" "Language: eu\n" @@ -17,131 +17,147 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "X-Generator: Poedit 2.3\n" -#: libs/localization.py:12 +#: libs/localization.py:15 msgid "User" msgstr "Erabiltzailea" -#: libs/localization.py:13 +#: libs/localization.py:16 msgid "Username" msgstr "Erabiltzailea" -#: libs/localization.py:14 +#: libs/localization.py:17 msgid "Firstname" msgstr "Izena" -#: libs/localization.py:15 +#: libs/localization.py:18 msgid "Surname" msgstr "Abizena" -#: libs/localization.py:16 +#: libs/localization.py:19 msgid "Password" msgstr "Pasahitza" -#: libs/localization.py:17 +#: libs/localization.py:20 msgid "Old password" msgstr "Pasahitz zaharra" -#: libs/localization.py:18 +#: libs/localization.py:21 msgid "New password" msgstr "Pasahitz berria" -#: libs/localization.py:19 +#: libs/localization.py:22 msgid "Confirm password" msgstr "Pasahitza berretsi" -#: libs/localization.py:20 +#: libs/localization.py:23 msgid "Email" msgstr "Emaila" -#: libs/localization.py:21 +#: libs/localization.py:24 msgid "edit" msgstr "editatu" -#: libs/localization.py:22 +#: libs/localization.py:25 msgid "Login" msgstr "Saioa hasi" -#: libs/localization.py:23 +#: libs/localization.py:26 msgid "Logout" msgstr "Saioa itxi" -#: libs/localization.py:24 +#: libs/localization.py:27 msgid "Delete" msgstr "Ezabatu" -#: libs/localization.py:25 +#: libs/localization.py:28 msgid "Sign Up" msgstr "Kontua sortu" -#: libs/localization.py:26 +#: libs/localization.py:29 msgid "Back" msgstr "Itzuli" -#: libs/localization.py:27 +#: libs/localization.py:30 msgid "Update" msgstr "Eguneratu" -#: libs/localization.py:28 +#: libs/localization.py:31 msgid "Or Sign In" msgstr "Edo Saioa hasi" -#: libs/localization.py:29 +#: libs/localization.py:32 msgid "Or Sign Up" msgstr "Edo Kontua sortu" -#: libs/localization.py:30 +#: libs/localization.py:33 msgid "Invite code" msgstr "Gonbidapen kodea" -#: libs/localization.py:31 +#: libs/localization.py:34 msgid "Edit your fullname" msgstr "Izen-abizenak editatu" -#: libs/localization.py:32 +#: libs/localization.py:35 msgid "Edit your email" msgstr "Email helbidea editatu" -#: libs/localization.py:33 +#: libs/localization.py:36 msgid "Change your password" msgstr "Pasahitza eguneratu" -#: libs/localization.py:34 +#: libs/localization.py:37 msgid "Delete your account" msgstr "Kontua ezabatu" -#: libs/localization.py:35 libs/localization.py:41 +#: libs/localization.py:38 libs/localization.py:46 msgid "Welcome" msgstr "Ongi etorri" +#: libs/localization.py:39 +msgid "Logs" +msgstr "Erregistroak" + #: 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." msgstr "Saioa itxi da." -#: libs/localization.py:42 +#: libs/localization.py:47 msgid "Username must be at least 3 characters long!" 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." msgstr "Erabiltzaile-izenaren eremurako onartzen ez diren karaktereak." -#: libs/localization.py:44 +#: libs/localization.py:49 msgid "Not allowed characters for the firstname field." msgstr "Izenaren eremurako onartzen ez diren karaktereak." -#: libs/localization.py:45 +#: libs/localization.py:50 msgid "Not allowed characters for the surname field." msgstr "Abizenaren eremurako onartzen ez diren karaktereak." -#: libs/localization.py:46 +#: libs/localization.py:51 msgid "The code is invalid or has expired." msgstr "Kodea baliogabea da edo iraungi egin da." -#: libs/localization.py:47 +#: libs/localization.py:52 msgid "Passwords do not match!" msgstr "Pasahitzak ez datoz bat!" -#: libs/localization.py:48 +#: libs/localization.py:53 msgid "" "The password must contain at least 8 characters, at least one number, " "a capital letter and a special character." @@ -149,83 +165,83 @@ msgstr "" "Pasahitzak gutxienez 8 karaktere izan behar ditu, zenbaki bat, hizki larri bat " "eta karaktere berezi bat." -#: libs/localization.py:49 +#: libs/localization.py:54 msgid "Congratulations, your account has been created!" msgstr "Zorionak, zure kontua sortu da!" -#: libs/localization.py:50 +#: libs/localization.py:55 msgid "Your first and last name have not been changed." 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?" 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?" 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." msgstr "Zure izen-abizenak ongi eguneratu dira." -#: libs/localization.py:54 +#: libs/localization.py:59 msgid "Invalid email address. Please try again." msgstr "Baliogabeko email helbidea. Saia zaitez berriz, mesedez." -#: libs/localization.py:55 +#: libs/localization.py:60 msgid "Email address has not been changed." msgstr "Email helbidea ez da aldatu." -#: libs/localization.py:56 +#: libs/localization.py:61 msgid "Your email has been successfully updated." 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." msgstr "Sartutako pasahitza egungo pasahitzaren berdina da." -#: libs/localization.py:58 +#: libs/localization.py:63 msgid "Password has been changed!" msgstr "Pasahitza eguneratua izan da!" -#: libs/localization.py:59 +#: libs/localization.py:64 msgid "Please, type your username for account deletion." msgstr "Kontua ezabatzeko idatzi zure erabiltzaile izena, mesedez." -#: libs/localization.py:60 +#: libs/localization.py:65 msgid "Account successfully deleted!" msgstr "Kontua ongi ezabatu da!" -#: libs/localization.py:61 +#: libs/localization.py:66 msgid "Username or password is incorrect!" msgstr "Erabiltzaile izena edo pasahitza okerrak dira!" -#: libs/localization.py:62 +#: libs/localization.py:67 msgid "Unable to connect to the remote server." msgstr "Ezinezkoa urruneko zerbitzara konektatzea." -#: libs/localization.py:63 +#: libs/localization.py:68 msgid "" "Encountered an unexpected error while communicating with the remote server." msgstr "Ezusteko errore bat gertatu da urruneko zerbitzariarekin komunikatzean." -#: libs/localization.py:64 +#: libs/localization.py:69 msgid "User already exists." msgstr "Erabiltzaile hori existitzen da." -#: libs/localization.py:65 +#: libs/localization.py:70 msgid "Email already exists." msgstr "Email hori existitzen da." -#: libs/localization.py:66 +#: libs/localization.py:71 msgid "Forgot your password? Please try again." msgstr "Zure pasahitza ahaztu duzu? Saia zeitez berriz, mesedez." -#: libs/localization.py:67 +#: libs/localization.py:72 msgid "The session has expired." msgstr "Saioa iraungi egin da." -#: libs/localization.py:68 +#: libs/localization.py:73 msgid "Registration is currently closed. We apologize for the inconvenience." -msgstr "Izen-ematea itxita dago une honetan. Barkatu eragozpenak." \ No newline at end of file +msgstr "Izen-ematea itxita dago une honetan. Barkatu eragozpenak." diff --git a/logs.tpl b/logs.tpl index 0cd9129..68d6b36 100644 --- a/logs.tpl +++ b/logs.tpl @@ -6,38 +6,33 @@ - {{ str['edit-email'] }} + {{ str['logs'] }}
-

{{ str['edit-email'] }}Erregistroak

+

{{ str['logs'] }}

-
- - - - -
- - -
- -
-
Devices
-
  • PC / Linux / Firefox 102.0
  • -
  • Samsung A5 2016 / Android 10 / Chrome
  • -
  • Iphone 5S / Iphone 11 / Safari 12
  • +
    {{ str['devices'] }}
    + %for device in data['devices']: +
  • {{ device }}
  • + %end
    + +
    %for type, text, animation in get('alerts', []): diff --git a/static/style.css b/static/style.css index e94b364..44df97f 100644 --- a/static/style.css +++ b/static/style.css @@ -127,6 +127,28 @@ button.red:hover{ 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 { diff --git a/user.tpl b/user.tpl index 105f7af..13a7471 100644 --- a/user.tpl +++ b/user.tpl @@ -53,12 +53,12 @@