Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Mikolaï Krol
erp5
Commits
0e1d5c6d
Commit
0e1d5c6d
authored
Feb 19, 2016
by
Tristan Cavelier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_core: fix naming convention "be triggered on" is invalid
parent
d12a8100
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
+8
-4
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/ERP5Site_checkNamingConventions.xml
...ortal_skins/erp5_core/ERP5Site_checkNamingConventions.xml
+8
-4
No files found.
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/ERP5Site_checkNamingConventions.xml
View file @
0e1d5c6d
...
@@ -96,11 +96,13 @@ CLOSED_CLASS_WORD_LIST = """\n
...
@@ -96,11 +96,13 @@ CLOSED_CLASS_WORD_LIST = """\n
well what whatever when where whereas whether which while whilst who whoever\n
well what whatever when where whereas whether which while whilst who whoever\n
whom whose with within without worth would yes you your yours yourself\n
whom whose with within without worth would yes you your yours yourself\n
""".split()\n
""".split()\n
CLOSED_CLASS_WORD_LIST += (\n
CLOSED_CLASS_WORD_SET = set(CLOSED_CLASS_WORD_LIST)\n
assert len(CLOSED_CLASS_WORD_SET) == len(CLOSED_CLASS_WORD_LIST)\n
SENTENCE_PART_LIST = (\n
"doesn\'t",\n
"doesn\'t",\n
\n
\n
"according to", "ahead of", "apart from", "as long as", "as opposed to",\n
"according to", "ahead of", "apart from", "as long as", "as opposed to",\n
"away from", "by means of", "by way of", "contrary to", "depending on",\n
"away from", "b
e triggered on", "b
y means of", "by way of", "contrary to", "depending on",\n
"due to", "each other", "even if", "even though", "even when", "given that",\n
"due to", "each other", "even if", "even though", "even when", "given that",\n
"in accordance with", "in addition to", "in case", "in charge of",\n
"in accordance with", "in addition to", "in case", "in charge of",\n
"in conjunction with", "in connection with", "in favour of", "in front of",\n
"in conjunction with", "in connection with", "in favour of", "in front of",\n
...
@@ -111,8 +113,8 @@ CLOSED_CLASS_WORD_LIST += (\n
...
@@ -111,8 +113,8 @@ CLOSED_CLASS_WORD_LIST += (\n
"provided that", "relative to", "so long as", "subject to", "with regard to",\n
"provided that", "relative to", "so long as", "subject to", "with regard to",\n
"with respect to",\n
"with respect to",\n
)\n
)\n
CLOSED_CLASS_WORD_SET = set(CLOSED_CLASS_WORD
_LIST)\n
SENTENCE_PART_SET = set(SENTENCE_PART
_LIST)\n
assert len(
CLOSED_CLASS_WORD_SET) == len(CLOSED_CLASS_WORD
_LIST)\n
assert len(
SENTENCE_PART_SET) == len(SENTENCE_PART
_LIST)\n
\n
\n
# List of allowed characters, usefull to detect non-english strings\n
# List of allowed characters, usefull to detect non-english strings\n
ALLOWED_CHARS = set("abcdefghijklmnopqrstuvwxyz0123456789%/. ()-_?&\'#,;")\n
ALLOWED_CHARS = set("abcdefghijklmnopqrstuvwxyz0123456789%/. ()-_?&\'#,;")\n
...
@@ -172,6 +174,8 @@ def checkTitle(path, id, title, field=None, form=None):\n
...
@@ -172,6 +174,8 @@ def checkTitle(path, id, title, field=None, form=None):\n
for c in title:\n
for c in title:\n
if c.lower() not in ALLOWED_CHARS:\n
if c.lower() not in ALLOWED_CHARS:\n
return "%s : %s : %r character not allowed\\n" % (path, id, c)\n
return "%s : %s : %r character not allowed\\n" % (path, id, c)\n
\n
title = re.sub(re.compile(r"\\b(" + "|".join(re.escape(x) for x in SENTENCE_PART_SET) + r")\\b"), "", title)\n
\n
\n
word_list = title.split(\' \')\n
word_list = title.split(\' \')\n
for word in word_list:\n
for word in word_list:\n
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment