Commit 38d728d2 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 9fda5829
...@@ -41,8 +41,6 @@ class StringAttributeMatchConstraint(PropertyExistenceConstraint): ...@@ -41,8 +41,6 @@ class StringAttributeMatchConstraint(PropertyExistenceConstraint):
property_sheets = PropertyExistenceConstraint.property_sheets + \ property_sheets = PropertyExistenceConstraint.property_sheets + \
(PropertySheet.StringAttributeMatchConstraint,) (PropertySheet.StringAttributeMatchConstraint,)
_message_id_tuple = ('message_attribute_match',)
def _checkConsistency(self, obj, fixit=0): def _checkConsistency(self, obj, fixit=0):
"""Check the object's consistency. """Check the object's consistency.
Check that each attribute matches the regular expression. Check that each attribute matches the regular expression.
...@@ -62,8 +60,10 @@ class StringAttributeMatchConstraint(PropertyExistenceConstraint): ...@@ -62,8 +60,10 @@ class StringAttributeMatchConstraint(PropertyExistenceConstraint):
# Generate error # Generate error
error_list.append(self._generateError( error_list.append(self._generateError(
obj, obj,
self._getMessage("message_attribute_match"), self._getMessage("message_attribute_does_not_match"),
mapping=dict(attribute_name=property_id, mapping=dict(attribute_name=property_id,
attribute_value=repr(current_value), attribute_value=repr(current_value),
regular_expression=repr(regular_expression)))) regular_expression=repr(regular_expression))))
return error_list return error_list
_message_id_tuple = ('message_attribute_does_not_match',)
...@@ -107,8 +107,7 @@ ...@@ -107,8 +107,7 @@
<value> <value>
<list> <list>
<string>my_message_no_such_property</string> <string>my_message_no_such_property</string>
<string>my_message_property_not_set</string> <string>my_message_attribute_does_not_match</string>
<string>my_message_attribute_match</string>
</list> </list>
</value> </value>
</item> </item>
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
</item> </item>
<item> <item>
<key> <string>id</string> </key> <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>
<item> <item>
<key> <string>message_values</string> </key> <key> <string>message_values</string> </key>
...@@ -90,7 +90,7 @@ ...@@ -90,7 +90,7 @@
</item> </item>
<item> <item>
<key> <string>title</string> </key> <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> </item>
</dictionary> </dictionary>
</value> </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 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. * 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.
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
</item> </item>
<item> <item>
<key> <string>id</string> </key> <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>
<item> <item>
<key> <string>portal_type</string> </key> <key> <string>portal_type</string> </key>
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
</item> </item>
<item> <item>
<key> <string>property_default</string> </key> <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> </item>
</dictionary> </dictionary>
</pickle> </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 2012-03-07 arnaud.fontaine
* Add property to define preferred source code editor to Preference Property Sheets. * Add property to define preferred source code editor to Preference Property Sheets.
......
60 61
\ No newline at end of file \ 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