fixed translator

This commit is contained in:
mdipierro
2019-03-03 14:27:12 -08:00
parent 399b57d13e
commit e09655b112
3 changed files with 8 additions and 3 deletions
+3
View File
@@ -49,6 +49,7 @@
'Cannot be empty': 'Non può essere vuoto',
'Change password': 'Cambia Password',
'change password': 'Cambia password',
'Change Password': 'Change Password',
'Check to delete': 'Seleziona per cancellare',
'Clear': 'Resetta',
'Clear CACHE?': 'Resetta CACHE?',
@@ -60,6 +61,7 @@
'Community': 'Community',
'Components and Plugins': 'Componenti and Plugin',
'Config.ini': 'Config.ini',
'Confirm Password': 'Confirm Password',
'contains': 'contiene',
'Controller': 'Controller',
'Copyright': 'Copyright',
@@ -155,6 +157,7 @@
'Lost Password': 'Password Smarrita',
'Lost password?': 'Password smarrita?',
'lost password?': 'dimenticato la password?',
'Lost your password?': 'Lost your password?',
'Main Menu': 'Menu principale',
'Manage %(action)s': 'Manage %(action)s',
'Manage Access Control': 'Manage Access Control',
+2
View File
@@ -3284,6 +3284,8 @@ class SQLFORM(FORM):
if isinstance(kwargs.get(key, None), dict):
if table._tablename in kwargs[key]:
kwargs[key] = kwargs[key][table._tablename]
elif '*' in kwargs[key]:
kwargs[key] = kwargs[key]['*']
else:
del kwargs[key]
check = {}
+3 -3
View File
@@ -3408,7 +3408,7 @@ class IS_FILE(Validator):
try:
string = value.filename
except:
return (value, translator(self.error_message))
return (value, self.translator(self.error_message))
if self.case == 1:
string = string.lower()
elif self.case == 2:
@@ -3420,9 +3420,9 @@ class IS_FILE(Validator):
if dot == -1:
dot = len(string)
if self.filename and not self.match(self.filename, string[:dot]):
return (value, translator(self.error_message))
return (value, self.translator(self.error_message))
elif self.extension and not self.match(self.extension, string[dot + 1:]):
return (value, translator(self.error_message))
return (value, self.translator(self.error_message))
else:
return (value, None)