[Erp5-report] r7651 - /erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal...

nobody at svn.erp5.org nobody at svn.erp5.org
Thu Jun 8 17:08:15 CEST 2006


Author: kevin
Date: Thu Jun  8 17:08:13 2006
New Revision: 7651

URL: http://svn.erp5.org?rev=7651&view=rev
Log:
Update ERP5Site_checkNamingConventions Todo list.

Modified:
    erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/ERP5Site_checkNamingConventions.xml

Modified: erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/ERP5Site_checkNamingConventions.xml
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/ERP5Site_checkNamingConventions.xml?rev=7651&r1=7650&r2=7651&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/ERP5Site_checkNamingConventions.xml (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/ERP5Site_checkNamingConventions.xml Thu Jun  8 17:08:13 2006
@@ -79,16 +79,20 @@
 # - Check language dependencies (e.g. "Account Of" should not be allowed, because it cannot be\n
 #   translated naturally for other languages).\n
 # - Check skin names.\n
-\n
-ABBRIVIATION_WORD_LIST = (\'ID\', \'URL\', \'VAT\', \'FAX\', \'GAP\', \'IBAN\', \'BBAN\', \'EAN\', \'BOM\', \'BIC\', \'CSV\', \'UBM\', \'VPN\')\n
+# - Check script names (from skin folders and workflows).\n
+\n
+ABBRIVIATION_WORD_LIST = ( \'ID\', \'URL\', \'VAT\', \'FAX\', \'GAP\', \'IBAN\', \'BBAN\', \'EAN\', \'BOM\', \'BIC\'\n
+                         , \'CSV\', \'SVN\', \'UBM\', \'VPN\', \'CAD\', \'ERP5\'\n
+                         )\n
 ABBRIVIATION_WORD_DICT = dict([(word, 1) for word in ABBRIVIATION_WORD_LIST])\n
 \n
 # List of words that do not need to be titlecased\n
-LOWERCASE_WORD_LIST = (\'g\', \'cm\', \'%\', \'/\', \'...\')\n
+LOWERCASE_WORD_LIST = (\'g\', \'cm\', \'kg\', \'%\', \'/\', \'...\')\n
 LOWERCASE_WORD_DICT = dict([(word, 1) for word in LOWERCASE_WORD_LIST])\n
 \n
 # List of allowed characters, usefull to detect non-english strings\n
-ALLOWED_CHARS = \'abcdefghijklmnopqrstuvwxyz0123456789%/. ()-\'\n
+ALLOWED_CHARS = \'abcdefghijklmnopqrstuvwxyz0123456789%/. ()-_?&\'\n
+\n
 \n
 \n
 def checkField(folder, form, field):\n
@@ -128,10 +132,10 @@
 \n
     if word.upper() in ABBRIVIATION_WORD_DICT:\n
       if not word.isupper():\n
-        error_message += \'%s : %s : %r is not uppper case even though it is an abbriviation\\n\' % (path, id, word)\n
+        error_message += \'%s : %s : %r is not upper case even though it is an abbriviation\\n\' % (path, id, word)\n
     elif word.endswith(\'s\') and word[:-1].upper() in ABBRIVIATION_WORD_DICT:\n
       if not word[:-1].isupper():\n
-        error_message += \'%s : %s : %r is not uppper case even though it is an abbriviation\\n\' % (path, id, word)\n
+        error_message += \'%s : %s : %r is not upper case even though it is an abbriviation\\n\' % (path, id, word)\n
     else:\n
       if not word.istitle() and word not in LOWERCASE_WORD_DICT:\n
         error_message += \'%s : %s : %r is not titlecased\\n\' % (path, id, word)\n
@@ -140,7 +144,9 @@
   return error_message\n
 \n
 \n
+\n
 message_list = []\n
+\n
 \n
 # Test portal_skins content\n
 for folder in context.portal_skins.objectValues(spec=(\'Folder\',)):\n
@@ -160,15 +166,28 @@
         if message:\n
           message_list.append(message)\n
 \n
-# Test workflow states\n
+\n
+# Test worflow related stuff\n
 for wf in context.portal_workflow.objectValues():\n
+\n
+  # Test workflow states\n
   wf_states = wf.states\n
+  message = \'\'\n
   if wf_states not in (None, (), [], \'\'):\n
-    message = \'\'\n
     for state in wf_states.objectValues() :\n
       message += checkTitle(\'/\'.join([\'portal_workflow\', wf.id, \'states\', state.id]), \'title\', state.title)\n
     if message:\n
       message_list.append(message)\n
+\n
+#   # Test workflow states\n
+#   wf_scripts = wf.scripts\n
+#   message = \'\'\n
+#   if wf_scripts not in (None, (), [], \'\'):\n
+#     for script in wf_scripts.objectValues():\n
+#       message += checkTitle(\'/\'.join([\'portal_workflow\', wf.id, \'scripts\', script.id]), \'id\', script.id)\n
+#     if message:\n
+#       message_list.append(message)\n
+\n
 \n
 # Test portal types\n
 for ptype in context.portal_types.objectValues():\n
@@ -194,6 +213,7 @@
       else:\n
         print "<br/>"\n
   return printed\n
+\n
 \n
 return ("%d problems found :\\n\\n" % len(message_list)) + \'\\n\'.join(message_list)\n
 




More information about the Erp5-report mailing list