Fixes in i18n and added installation instructions in README.md
This commit is contained in:
parent
d65309caf7
commit
e013657963
4 changed files with 198 additions and 63 deletions
|
|
@ -4,11 +4,27 @@ from paramecio.citoplasma.i18n import I18n
|
|||
|
||||
class IntegerField(PhangoField):
|
||||
|
||||
"""Class that figure an integer sql type field.
|
||||
|
||||
Args:
|
||||
name (str): The name of new field
|
||||
size (int): The size of the new field in database. By default 11.
|
||||
required (bool): Boolean for define if
|
||||
|
||||
"""
|
||||
|
||||
def __init__(self, name, size=11, required=False):
|
||||
super(IntegerField, self).__init__(name, size, required)
|
||||
|
||||
def check(self, value):
|
||||
|
||||
"""Method for check if value is integer
|
||||
|
||||
Args:
|
||||
value (int): The value to check
|
||||
|
||||
"""
|
||||
|
||||
self.error=False
|
||||
self.txt_error=''
|
||||
|
||||
|
|
@ -28,23 +44,53 @@ class IntegerField(PhangoField):
|
|||
return value
|
||||
|
||||
def get_type_sql(self):
|
||||
|
||||
"""Method for return the sql code for this type
|
||||
|
||||
"""
|
||||
|
||||
return 'INT('+str(self.size)+') NOT NULL DEFAULT "0"'
|
||||
|
||||
class BigIntegerField(IntegerField):
|
||||
|
||||
"""Class that figure an big integer sql type field.
|
||||
|
||||
Only change the sql type with respect to IntegerField
|
||||
|
||||
"""
|
||||
|
||||
def get_type_sql(self):
|
||||
|
||||
"""Method for return the sql code for this type
|
||||
|
||||
"""
|
||||
|
||||
return 'BIGINT('+str(self.size)+') NOT NULL DEFAULT "0"'
|
||||
|
||||
|
||||
class FloatField(PhangoField):
|
||||
|
||||
"""Class that figure an float sql type field.
|
||||
|
||||
Args:
|
||||
name (str): The name of new field
|
||||
size (int): The size of the new field in database. By default 11.
|
||||
required (bool): Boolean for define if
|
||||
|
||||
"""
|
||||
|
||||
def __init__(self, name, size=11, required=False):
|
||||
super(FloatField, self).__init__(name, size, required)
|
||||
|
||||
def check(self, value):
|
||||
|
||||
"""Method for check if value is integer
|
||||
|
||||
Args:
|
||||
value (float): The value to check
|
||||
|
||||
"""
|
||||
|
||||
self.error=False
|
||||
self.txt_error=''
|
||||
|
||||
|
|
@ -82,12 +128,11 @@ class TextField(PhangoField):
|
|||
def __init__(self, name, required=False):
|
||||
super().__init__(name, 11, required)
|
||||
|
||||
#def check(self, value):
|
||||
|
||||
#value=super().check(value).replace('"', '"').replace('<', '<').replace('
|
||||
|
||||
|
||||
def get_type_sql(self):
|
||||
|
||||
"""Method for return the sql code for this type
|
||||
|
||||
"""
|
||||
|
||||
return 'TEXT NOT NULL'
|
||||
|
||||
|
|
@ -121,6 +166,10 @@ class ForeignKeyField(IntegerField):
|
|||
return value
|
||||
|
||||
def get_type_sql(self):
|
||||
|
||||
"""Method for return the sql code for this type
|
||||
|
||||
"""
|
||||
|
||||
return 'INT NULL'
|
||||
|
||||
|
|
@ -160,6 +209,10 @@ class BooleanField(IntegerField):
|
|||
return value
|
||||
|
||||
def get_type_sql(self):
|
||||
|
||||
"""Method for return the sql code for this type
|
||||
|
||||
"""
|
||||
|
||||
return 'BOOLEAN NOT NULL DEFAULT "0"'
|
||||
|
||||
|
|
|
|||
|
|
@ -4,37 +4,53 @@ from paramecio.citoplasma.i18n import I18n
|
|||
|
||||
I18n.l['en-US']={'admin': {}}
|
||||
|
||||
I18n.l['en-US']['admin']['welcome_to_paramecio']='Welcome to Paramecio Admin!!!'
|
||||
|
||||
I18n.l['en-US']['admin']['administrator']='Administrator'
|
||||
I18n.l['en-US']['admin']['sign_up']='Paramecio Sign up'
|
||||
|
||||
I18n.l['en-US']['admin']['remember_login']='Remember login?'
|
||||
|
||||
I18n.l['en-US']['admin']['send_email']='Email for recovery your password'
|
||||
|
||||
I18n.l['en-US']['admin']['administrator']='Administrator'
|
||||
|
||||
I18n.l['en-US']['admin']['login']='Paramecio Login'
|
||||
|
||||
I18n.l['en-US']['admin']['remember_tries']='Remember that only have 3 attempts'
|
||||
|
||||
I18n.l['en-US']['admin']['welcome_to_paramecio']='Welcome to Paramecio Admin!!!'
|
||||
|
||||
I18n.l['en-US']['admin']['applications']='Applications'
|
||||
|
||||
I18n.l['en-US']['admin']['recovery_password']='Recovery password?'
|
||||
|
||||
I18n.l['en-US']['admin']['send_password_email']='Your new password'
|
||||
|
||||
I18n.l['en-US']['admin']['selected_privileges']='Selected privileges'
|
||||
|
||||
I18n.l['en-US']['admin']['without_privileges']='Without privileges'
|
||||
|
||||
I18n.l['en-US']['admin']['sign_up']='Paramecio Sign up'
|
||||
|
||||
I18n.l['en-US']['admin']['applications']='Applications'
|
||||
|
||||
I18n.l['es-ES']={'admin': {}}
|
||||
|
||||
I18n.l['es-ES']['admin']['welcome_to_paramecio']='Welcome to Paramecio Admin!!!'
|
||||
I18n.l['es-ES']['admin']['sign_up']='Registrarse en Paramecio'
|
||||
|
||||
I18n.l['es-ES']['admin']['remember_login']='¿Recordad login?'
|
||||
|
||||
I18n.l['es-ES']['admin']['send_email']='Email para recuperar tu contraseña'
|
||||
|
||||
I18n.l['es-ES']['admin']['administrator']='Administrador'
|
||||
|
||||
I18n.l['es-ES']['admin']['remember_login']='Remember login?'
|
||||
I18n.l['es-ES']['admin']['login']='Login Paramecio'
|
||||
|
||||
I18n.l['es-ES']['admin']['login']='Paramecio Login'
|
||||
I18n.l['es-ES']['admin']['remember_tries']='Recuerda que sólo tienes 3 intentos'
|
||||
|
||||
I18n.l['es-ES']['admin']['selected_privileges']='Selected privileges'
|
||||
|
||||
I18n.l['es-ES']['admin']['without_privileges']='Without privileges'
|
||||
|
||||
I18n.l['es-ES']['admin']['sign_up']='Paramecio Sign up'
|
||||
I18n.l['es-ES']['admin']['welcome_to_paramecio']='Bienvenido a Paramecio Framework!!!'
|
||||
|
||||
I18n.l['es-ES']['admin']['applications']='Aplicaciones'
|
||||
|
||||
I18n.l['es-ES']['admin']['recovery_password']='¿Recuperar password?'
|
||||
|
||||
I18n.l['es-ES']['admin']['send_password_email']='Tu nuevo password'
|
||||
|
||||
I18n.l['es-ES']['admin']['selected_privileges']='Privilegios seleccionados'
|
||||
|
||||
I18n.l['es-ES']['admin']['without_privileges']='Sin privilegios'
|
||||
|
||||
|
|
|
|||
|
|
@ -6,79 +6,91 @@ I18n.l['en-US']={'common': {}}
|
|||
|
||||
I18n.l['en-US']['common']['delete']='Delete'
|
||||
|
||||
I18n.l['en-US']['common']['password_no_match']='Passwords doesn't match'
|
||||
|
||||
I18n.l['en-US']['common']['error_login']='Error, wrong username or password'
|
||||
I18n.l['en-US']['common']['sign_up']='Sign up'
|
||||
|
||||
I18n.l['en-US']['common']['yes']='Yes'
|
||||
|
||||
I18n.l['en-US']['common']['task_successful']='Task successful'
|
||||
|
||||
I18n.l['en-US']['common']['error_passwords_no_match']='Error: passwords doesn't match'
|
||||
|
||||
I18n.l['en-US']['common']['options']='Options'
|
||||
I18n.l['en-US']['common']['recovery_password']='Recovery password'
|
||||
|
||||
I18n.l['en-US']['common']['add_new_item']='Add new item'
|
||||
|
||||
I18n.l['en-US']['common']['add_item']='Add new item'
|
||||
|
||||
I18n.l['en-US']['common']['home']='Home'
|
||||
|
||||
I18n.l['en-US']['common']['search']='Search'
|
||||
|
||||
I18n.l['en-US']['common']['error_username_or_password_exists']='Error: username or email exists in database'
|
||||
|
||||
I18n.l['en-US']['common']['no']='No'
|
||||
|
||||
I18n.l['en-US']['common']['login']='Login'
|
||||
|
||||
I18n.l['en-US']['common']['edit_new_item']='Edit item'
|
||||
|
||||
I18n.l['en-US']['common']['sign_up']='Sign up'
|
||||
I18n.l['en-US']['common']['error_passwords_no_match']='Error: passwords doesn\'t match'
|
||||
|
||||
I18n.l['en-US']['common']['last']='Last'
|
||||
|
||||
I18n.l['en-US']['common']['edit']='Edit'
|
||||
I18n.l['en-US']['common']['add_item']='Add new item'
|
||||
|
||||
I18n.l['en-US']['common']['no']='No'
|
||||
|
||||
I18n.l['en-US']['common']['delete_item_you_sure']='Are you sure for delete this item?'
|
||||
|
||||
I18n.l['en-US']['common']['task_successful']='Task successful'
|
||||
|
||||
I18n.l['en-US']['common']['login']='Login'
|
||||
|
||||
I18n.l['en-US']['common']['repeat_password']='Repeat Password'
|
||||
|
||||
I18n.l['en-US']['common']['pages']='Pages'
|
||||
|
||||
I18n.l['en-US']['common']['edit_new_item']='Edit item'
|
||||
|
||||
I18n.l['en-US']['common']['error_username_or_password_exists']='Error: username or email exists in database'
|
||||
|
||||
I18n.l['en-US']['common']['edit']='Edit'
|
||||
|
||||
I18n.l['en-US']['common']['options']='Options'
|
||||
|
||||
I18n.l['en-US']['common']['error_login']='Error, wrong username or password'
|
||||
|
||||
I18n.l['en-US']['common']['home']='Home'
|
||||
|
||||
I18n.l['en-US']['common']['password_no_match']='Passwords doesn\'t match'
|
||||
|
||||
I18n.l['es-ES']={'common': {}}
|
||||
|
||||
I18n.l['es-ES']['common']['delete']='Delete'
|
||||
I18n.l['es-ES']['common']['delete']='Borrar'
|
||||
|
||||
I18n.l['es-ES']['common']['password_no_match']='Passwords doesn't match'
|
||||
I18n.l['es-ES']['common']['sign_up']='Registrarse'
|
||||
|
||||
I18n.l['es-ES']['common']['error_login']='Error, wrong username or password'
|
||||
I18n.l['es-ES']['common']['yes']='Sí'
|
||||
|
||||
I18n.l['es-ES']['common']['yes']='Yes'
|
||||
I18n.l['es-ES']['common']['recovery_password']='Recuperar contraseña'
|
||||
|
||||
I18n.l['es-ES']['common']['task_successful']='Task successful'
|
||||
I18n.l['es-ES']['common']['add_new_item']='Añadir nuevo elemento'
|
||||
|
||||
I18n.l['es-ES']['common']['error_passwords_no_match']='Error: passwords doesn't match'
|
||||
I18n.l['es-ES']['common']['search']='Buscar'
|
||||
|
||||
I18n.l['es-ES']['common']['options']='Options'
|
||||
I18n.l['es-ES']['common']['error_passwords_no_match']='Error: contraseñas no coinciden'
|
||||
|
||||
I18n.l['es-ES']['common']['add_new_item']='Add new item'
|
||||
I18n.l['es-ES']['common']['last']='Último'
|
||||
|
||||
I18n.l['es-ES']['common']['add_item']='Add new item'
|
||||
|
||||
I18n.l['es-ES']['common']['home']='Home'
|
||||
|
||||
I18n.l['es-ES']['common']['search']='Search'
|
||||
|
||||
I18n.l['es-ES']['common']['error_username_or_password_exists']='Error: username or email exists in database'
|
||||
I18n.l['es-ES']['common']['add_item']='Añadir elemento'
|
||||
|
||||
I18n.l['es-ES']['common']['no']='No'
|
||||
|
||||
I18n.l['es-ES']['common']['login']='Login'
|
||||
I18n.l['es-ES']['common']['delete_item_you_sure']='¿Estás seguro de que deseas borrar este elemento?'
|
||||
|
||||
I18n.l['es-ES']['common']['edit_new_item']='Edit item'
|
||||
I18n.l['es-ES']['common']['task_successful']='Tarea realizada con éxito'
|
||||
|
||||
I18n.l['es-ES']['common']['sign_up']='Sign up'
|
||||
I18n.l['es-ES']['common']['login']='Autenticación'
|
||||
|
||||
I18n.l['es-ES']['common']['last']='Last'
|
||||
I18n.l['es-ES']['common']['repeat_password']='Repetir contraseña'
|
||||
|
||||
I18n.l['es-ES']['common']['edit']='Edit'
|
||||
I18n.l['es-ES']['common']['pages']='Paginas'
|
||||
|
||||
I18n.l['es-ES']['common']['repeat_password']='Repeat Password'
|
||||
I18n.l['es-ES']['common']['edit_new_item']='Editar elemento'
|
||||
|
||||
I18n.l['es-ES']['common']['error_username_or_password_exists']='Error: nombre de usuario o email no existen en la base de datos'
|
||||
|
||||
I18n.l['es-ES']['common']['edit']='Editar'
|
||||
|
||||
I18n.l['es-ES']['common']['options']='Opciones'
|
||||
|
||||
I18n.l['es-ES']['common']['error_login']='Error, nombre de usuario o password equivocado'
|
||||
|
||||
I18n.l['es-ES']['common']['home']='Home'
|
||||
|
||||
I18n.l['es-ES']['common']['password_no_match']='Contraseñas no coinciden'
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue