Commit f448002f authored by Arnaud Fontaine's avatar Arnaud Fontaine

Fix error message of StringAttributeMatch Constraint incorrectly renamed after...

Fix error message of StringAttributeMatch Constraint incorrectly renamed after migration to ZODB (78e2ae32).
parent f25d13c5
......@@ -39,9 +39,7 @@ class StringAttributeMatchConstraint(PropertyExistenceConstraint):
regular expression.
"""
property_sheets = PropertyExistenceConstraint.property_sheets + \
(PropertySheet.StringAttributeMatchConstraint,)
_message_id_tuple = ('message_attribute_match',)
(PropertySheet.StringAttributeMatchConstraint,)
def _checkConsistency(self, obj, fixit=0):
"""Check the object's consistency.
......@@ -62,8 +60,10 @@ class StringAttributeMatchConstraint(PropertyExistenceConstraint):
# Generate error
error_list.append(self._generateError(
obj,
self._getMessage("message_attribute_match"),
self._getMessage("message_attribute_does_not_match"),
mapping=dict(attribute_name=property_id,
attribute_value=repr(current_value),
regular_expression=repr(regular_expression))))
return error_list
_message_id_tuple = ('message_attribute_does_not_match',)
......@@ -107,8 +107,7 @@
<value>
<list>
<string>my_message_no_such_property</string>
<string>my_message_property_not_set</string>
<string>my_message_attribute_match</string>
<string>my_message_attribute_does_not_match</string>
</list>
</value>
</item>
......
......@@ -17,7 +17,7 @@
</item>
<item>
<key> <string>id</string> </key>
<value> <string>my_message_attribute_match</string> </value>
<value> <string>my_message_attribute_does_not_match</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
......@@ -90,7 +90,7 @@
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Error Message if Property Matchs the Regexp</string> </value>
<value> <string>Error Message if Property does not Match the Regexp</string> </value>
</item>
</dictionary>
</value>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list>
<string>display_width</string>
<string>title</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>my_message_property_not_set</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>display_width</string> </key>
<value> <int>20</int> </value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_string_field</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewFieldLibrary</string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string>Click to edit the target</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Error Message if Property is not Set</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
2012-09-04 arnaud.fontaine
* message_attribute_does_not_match was incorrectly renamed to message_attribute_match when migrating StringAttributeMatch constraint from filesystem to ZODB.
2012-07-20 tatuya
* Set max_row 0 on IdTool_zGetValueList so that we can get all the records of portal_ids table when there are more than 1000 id_group.
......
41081
\ No newline at end of file
41082
\ No newline at end of file
......@@ -22,7 +22,7 @@
</item>
<item>
<key> <string>id</string> </key>
<value> <string>message_attribute_match_property</string> </value>
<value> <string>message_attribute_does_not_match_property</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
......@@ -30,7 +30,7 @@
</item>
<item>
<key> <string>property_default</string> </key>
<value> <string>python: \'Attribute ${attribute_name} is ${attribute_value} and matches ${regular_expression}\'</string> </value>
<value> <string>python: \'Attribute ${attribute_name} is ${attribute_value} and does not match ${regular_expression}\'</string> </value>
</item>
</dictionary>
</pickle>
......
2012-09-04 arnaud.fontaine
* message_attribute_does_not_match was incorrectly renamed to message_attribute_match when migrating StringAttributeMatch constraint from filesystem to ZODB.
2012-03-07 arnaud.fontaine
* Add property to define preferred source code editor to Preference Property Sheets.
......
60
\ No newline at end of file
61
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment