diff --git a/paramecio/i18n/admin.py b/paramecio/i18n/admin.py index a899a71..74bad2f 100644 --- a/paramecio/i18n/admin.py +++ b/paramecio/i18n/admin.py @@ -12,12 +12,6 @@ I18n.l['en-US']['admin']['selected_privileges']='Selected privileges' I18n.l['en-US']['admin']['administrator']='Administrator' -I18n.l['en-US']['admin']['welcome_to_paramecio']='Welcome to Admin!!!' - -I18n.l['en-US']['admin']['send_email']='Email for recovery your password' - -I18n.l['en-US']['admin']['send_password_email']='Your new password' - I18n.l['en-US']['admin']['login']='Login' I18n.l['en-US']['admin']['remember_login']='Remember login?' @@ -26,13 +20,19 @@ I18n.l['en-US']['admin']['recovery_password']='Recovery password?' I18n.l['en-US']['admin']['remember_tries']='Remember that only have 3 attempts' +I18n.l['en-US']['admin']['applications']='Applications' + I18n.l['en-US']['admin']['welcome_to_admin_dashboard']='Welcome to Admin dashboard' I18n.l['en-US']['admin']['from_here_you_can_configure_your_site']='From here you can configure your site' I18n.l['en-US']['admin']['sign_up']='Sign up' -I18n.l['en-US']['admin']['applications']='Applications' +I18n.l['en-US']['admin']['welcome_to_paramecio']='Welcome to Admin!!!' + +I18n.l['en-US']['admin']['send_email']='Email for recovery your password' + +I18n.l['en-US']['admin']['send_password_email']='Your new password' I18n.l['en-US']['admin']['translation_saved_sucessfully']='Translation saved sucessfully' @@ -54,12 +54,6 @@ I18n.l['es-ES']['admin']['selected_privileges']='Privilegios seleccionados' I18n.l['es-ES']['admin']['administrator']='Administrador' -I18n.l['es-ES']['admin']['welcome_to_paramecio']='Bienvenido a Administración' - -I18n.l['es-ES']['admin']['send_email']='Email para recuperar tu contraseña' - -I18n.l['es-ES']['admin']['send_password_email']='Tu nuevo password' - I18n.l['es-ES']['admin']['login']='Login' I18n.l['es-ES']['admin']['remember_login']='¿Recordar login?' @@ -68,13 +62,19 @@ I18n.l['es-ES']['admin']['recovery_password']='¿Recuperar password?' I18n.l['es-ES']['admin']['remember_tries']='Recuerda que sólo tienes 3 intentos' +I18n.l['es-ES']['admin']['applications']='Aplicaciones' + I18n.l['es-ES']['admin']['welcome_to_admin_dashboard']='Bienvenido al panel de administrador' I18n.l['es-ES']['admin']['from_here_you_can_configure_your_site']='Desde aquí puedes configurar tu site' I18n.l['es-ES']['admin']['sign_up']='Registrarse' -I18n.l['es-ES']['admin']['applications']='Aplicaciones' +I18n.l['es-ES']['admin']['welcome_to_paramecio']='Bienvenido a Administración' + +I18n.l['es-ES']['admin']['send_email']='Email para recuperar tu contraseña' + +I18n.l['es-ES']['admin']['send_password_email']='Tu nuevo password' I18n.l['es-ES']['admin']['translation_saved_sucessfully']='Translation saved sucessfully' diff --git a/paramecio/i18n/common.py b/paramecio/i18n/common.py index 3cb8913..24f835b 100644 --- a/paramecio/i18n/common.py +++ b/paramecio/i18n/common.py @@ -6,22 +6,36 @@ I18n.l['en-US']=I18n.l.get('en-US', {}) I18n.l['en-US']['common']=I18n.l['en-US'].get('common', {}) -I18n.l['en-US']['common']['password_no_match']='Passwords doesn\'t match' +I18n.l['en-US']['common']['edit']='Edit' -I18n.l['en-US']['common']['recovery_password']='Recovery password' +I18n.l['en-US']['common']['delete']='Delete' I18n.l['en-US']['common']['error_login']='Error, wrong username or password' I18n.l['en-US']['common']['login']='Login' +I18n.l['en-US']['common']['recovery_password']='Recovery password' + I18n.l['en-US']['common']['sign_up']='Sign up' +I18n.l['en-US']['common']['password_no_match']='Passwords doesn\'t match' + +I18n.l['en-US']['common']['search']='Search' + +I18n.l['en-US']['common']['pages']='Pages' + +I18n.l['en-US']['common']['delete_item_you_sure']='Are you sure for delete this item?' + +I18n.l['en-US']['common']['add_item']='Add new item' + +I18n.l['en-US']['common']['options']='Options' + +I18n.l['en-US']['common']['repeat_password']='Repeat Password' + I18n.l['en-US']['common']['yes']='Yes' I18n.l['en-US']['common']['no']='No' -I18n.l['en-US']['common']['repeat_password']='Repeat Password' - I18n.l['en-US']['common']['error_passwords_no_match']='Error: passwords doesn\'t match' I18n.l['en-US']['common']['error_username_exists']='Error: username already exists' @@ -30,12 +44,6 @@ I18n.l['en-US']['common']['error_email_exists']='Error: this email is already be I18n.l['en-US']['common']['last']='Last' -I18n.l['en-US']['common']['options']='Options' - -I18n.l['en-US']['common']['edit']='Edit' - -I18n.l['en-US']['common']['delete']='Delete' - I18n.l['en-US']['common']['home']='Home' I18n.l['en-US']['common']['add_new_item']='Add new item' @@ -44,34 +52,40 @@ I18n.l['en-US']['common']['edit_new_item']='Edit item' I18n.l['en-US']['common']['task_successful']='Task successful' -I18n.l['en-US']['common']['add_item']='Add new item' - -I18n.l['en-US']['common']['search']='Search' - -I18n.l['en-US']['common']['pages']='Pages' - -I18n.l['en-US']['common']['delete_item_you_sure']='Are you sure for delete this item?' - I18n.l['es-ES']=I18n.l.get('es-ES', {}) I18n.l['es-ES']['common']=I18n.l['es-ES'].get('common', {}) -I18n.l['es-ES']['common']['password_no_match']='Passwords doesn\'t match' +I18n.l['es-ES']['common']['edit']='Edit' -I18n.l['es-ES']['common']['recovery_password']='Recovery password' +I18n.l['es-ES']['common']['delete']='Delete' I18n.l['es-ES']['common']['error_login']='Error, wrong username or password' I18n.l['es-ES']['common']['login']='Login' +I18n.l['es-ES']['common']['recovery_password']='Recovery password' + I18n.l['es-ES']['common']['sign_up']='Sign up' +I18n.l['es-ES']['common']['password_no_match']='Passwords doesn\'t match' + +I18n.l['es-ES']['common']['search']='Search' + +I18n.l['es-ES']['common']['pages']='Pages' + +I18n.l['es-ES']['common']['delete_item_you_sure']='Are you sure for delete this item?' + +I18n.l['es-ES']['common']['add_item']='Add new item' + +I18n.l['es-ES']['common']['options']='Options' + +I18n.l['es-ES']['common']['repeat_password']='Repeat Password' + I18n.l['es-ES']['common']['yes']='Yes' I18n.l['es-ES']['common']['no']='No' -I18n.l['es-ES']['common']['repeat_password']='Repeat Password' - I18n.l['es-ES']['common']['error_passwords_no_match']='Error: passwords doesn\'t match' I18n.l['es-ES']['common']['error_username_exists']='Error: username already exists' @@ -80,12 +94,6 @@ I18n.l['es-ES']['common']['error_email_exists']='Error: this email is already be I18n.l['es-ES']['common']['last']='Last' -I18n.l['es-ES']['common']['options']='Options' - -I18n.l['es-ES']['common']['edit']='Edit' - -I18n.l['es-ES']['common']['delete']='Delete' - I18n.l['es-ES']['common']['home']='Home' I18n.l['es-ES']['common']['add_new_item']='Add new item' @@ -94,11 +102,3 @@ I18n.l['es-ES']['common']['edit_new_item']='Edit item' I18n.l['es-ES']['common']['task_successful']='Task successful' -I18n.l['es-ES']['common']['add_item']='Add new item' - -I18n.l['es-ES']['common']['search']='Search' - -I18n.l['es-ES']['common']['pages']='Pages' - -I18n.l['es-ES']['common']['delete_item_you_sure']='Are you sure for delete this item?' - diff --git a/paramecio/libraries/check_i18n.py b/paramecio/libraries/check_i18n.py index 7d5832b..0f64e66 100644 --- a/paramecio/libraries/check_i18n.py +++ b/paramecio/libraries/check_i18n.py @@ -8,12 +8,12 @@ from importlib import import_module from paramecio.libraries.i18n import I18n from settings import config -pattern=re.compile('^\w+\.(py|html|phtml|js)$') +pattern=re.compile(r'^\w+\.(py|html|phtml|js)$') -ignored=re.compile('^[__|\.].*$') +ignored=re.compile(r'^[__|\.].*$') -lang_p=re.compile("I18n\.lang\('(.*?)',\s+'(.*?)',\s+'(.*?)'\)") -lang_t=re.compile("\${lang\('(.*?)',\s+'(.*?)',\s+'(.*?)'\)\}") +lang_p=re.compile(r"I18n\.lang\('(.*?)',\s+'(.*?)',\s+'(.*?)'\)") +lang_t=re.compile(r"\${lang\('(.*?)',\s+'(.*?)',\s+'(.*?)'\)\}") tmp_lang={} @@ -44,11 +44,11 @@ def start(): module_base=os.path.basename(args.module) - lang_p=re.compile("I18n\.lang\('("+module_base+"?)',\s+'(.*?)',\s+'(.*?)'\)") + lang_p=re.compile(r"I18n\.lang\('("+module_base+"?)',\s+'(.*?)',\s+'(.*?)'\)") #lang_t=re.compile("\${lang\('("+module_base+"?)',\s+'(.*?)',\s+'(.*?)'\)\}") - lang_t=re.compile("lang\('("+module_base+"?)',\s+'(.*?)',\s+'(.*?)'\)") + lang_t=re.compile(r"lang\('("+module_base+"?)',\s+'(.*?)',\s+'(.*?)'\)") - lang_s=re.compile("slang\('(.*?)',\s+'(.*?)'\)" + lang_s=re.compile(r"slang\('(.*?)',\s+'(.*?)'\)") if not os.path.isdir(path): diff --git a/paramecio/libraries/sessionplugin.py b/paramecio/libraries/sessionplugin.py index 0907ca7..ec63835 100644 --- a/paramecio/libraries/sessionplugin.py +++ b/paramecio/libraries/sessionplugin.py @@ -43,7 +43,11 @@ class Session(dict): #if not max_age: response.set_cookie(config.cookie_name, self.safe.dumps(self), path=config.session_opts['session.path'], httponly=True) - + """ + def __del__(self): + self.save() + print('exit') + """ def get_session():