Bugfix in the system for refreshing layouts, and removed generation of '_valid' i18n labels, that almost doubled the size of po files and are almost never needed.

This commit is contained in:
Gaetan Delannay 2010-11-16 15:32:47 +01:00
parent 3fd2d62b30
commit cccdc12372
6 changed files with 15 additions and 16 deletions

View file

@ -749,11 +749,11 @@ class Type:
return validValue
else:
if not validValue:
return obj.translate('%s_valid' % self.labelId)
return obj.translate('field_invalid')
except Exception, e:
return str(e)
except:
return obj.translate('%s_valid' % self.labelId)
return obj.translate('field_invalid')
else:
# It is a regular expression
if not self.validator.match(value):
@ -766,7 +766,7 @@ class Type:
elif self.validator == String.ALPHANUMERIC:
return obj.translate('bad_alphanumeric')
else:
return obj.translate('%s_valid' % self.labelId)
return obj.translate('field_invalid')
def store(self, obj, value):
'''Stores the p_value (produced by m_getStorableValue) that complies to