[CMF-checkins] SVN: CMF/branches/2.0/CMFDefault/ - some minor i18n
tweaking
Yvo Schubbe
y.2006_ at wcm-solutions.de
Fri Apr 28 07:42:20 EDT 2006
Log message for revision 67715:
- some minor i18n tweaking
Changed:
U CMF/branches/2.0/CMFDefault/locales/cmf_default-manual.pot
U CMF/branches/2.0/CMFDefault/locales/cmf_default.pot
U CMF/branches/2.0/CMFDefault/utils.py
-=-
Modified: CMF/branches/2.0/CMFDefault/locales/cmf_default-manual.pot
===================================================================
--- CMF/branches/2.0/CMFDefault/locales/cmf_default-manual.pot 2006-04-28 11:05:32 UTC (rev 67714)
+++ CMF/branches/2.0/CMFDefault/locales/cmf_default-manual.pot 2006-04-28 11:42:19 UTC (rev 67715)
@@ -1,3 +1,9 @@
+msgid "Found ${count} ${type} matching '${text}'."
+msgstr ""
+
+msgid "Found ${count} ${type}."
+msgstr ""
+
msgid "Next ${count} members"
msgstr ""
Modified: CMF/branches/2.0/CMFDefault/locales/cmf_default.pot
===================================================================
--- CMF/branches/2.0/CMFDefault/locales/cmf_default.pot 2006-04-28 11:05:32 UTC (rev 67714)
+++ CMF/branches/2.0/CMFDefault/locales/cmf_default.pot 2006-04-28 11:42:19 UTC (rev 67715)
@@ -1999,6 +1999,21 @@
msgid "Comments:"
msgstr ""
+#: CMFDefault/utils.py:325
+# Default: ""
+msgid "JavaScript event '${attribute}' not allowed."
+msgstr ""
+
+#: CMFDefault/utils.py:330
+# Default: ""
+msgid "JavaScript URI '${value}' not allowed."
+msgstr ""
+
+#: CMFDefault/utils.py:343
+# Default: ""
+msgid "Dynamic tag '${tag}' not allowed."
+msgstr ""
+
#: CMFTopic/profiles/default/types/Topic.xml:4
msgid "Topic"
msgstr ""
@@ -2027,6 +2042,12 @@
msgid "Query Parameters:"
msgstr ""
+msgid "Found ${count} ${type} matching '${text}'."
+msgstr ""
+
+msgid "Found ${count} ${type}."
+msgstr ""
+
msgid "Next ${count} members"
msgstr ""
Modified: CMF/branches/2.0/CMFDefault/utils.py
===================================================================
--- CMF/branches/2.0/CMFDefault/utils.py 2006-04-28 11:05:32 UTC (rev 67714)
+++ CMF/branches/2.0/CMFDefault/utils.py 2006-04-28 11:42:19 UTC (rev 67715)
@@ -280,6 +280,7 @@
, 'applet' : 1
}
+
class StrippingParser( SGMLParser ):
""" Pass only allowed tags; raise exception for known-bad.
@@ -312,7 +313,6 @@
self.result = "%s&%s%s" % (self.result, name, x)
def unknown_starttag(self, tag, attrs):
-
""" Delete all tags except for legal ones.
"""
if VALID_TAGS.has_key(tag):
@@ -321,11 +321,15 @@
for k, v in attrs:
- if k.lower().startswith( 'on' ):
- raise IllegalHTML, 'Javascipt event "%s" not allowed.' % k
+ if k.lower().startswith('on'):
+ msg = _(u"JavaScript event '${attribute}' not allowed.",
+ mapping={'attribute': k})
+ raise IllegalHTML(msg)
- if v.lower().startswith( 'javascript:' ):
- raise IllegalHTML, 'Javascipt URI "%s" not allowed.' % v
+ if v.lower().startswith('javascript:'):
+ msg = _(u"JavaScript URI '${value}' not allowed.",
+ mapping={'value': v})
+ raise IllegalHTML(msg)
self.result = '%s %s="%s"' % (self.result, k, v)
@@ -335,19 +339,22 @@
else:
self.result = self.result + ' />'
- elif NASTY_TAGS.get( tag ):
- raise IllegalHTML, 'Dynamic tag "%s" not allowed.' % tag
+ elif NASTY_TAGS.get(tag):
+ msg = _(u"Dynamic tag '${tag}' not allowed.",
+ mapping={'tag': tag})
+ raise IllegalHTML(msg)
else:
pass # omit tag
def unknown_endtag(self, tag):
- if VALID_TAGS.get( tag ):
+ if VALID_TAGS.get(tag):
self.result = "%s</%s>" % (self.result, tag)
remTag = '</%s>' % tag
+
security.declarePublic('scrubHTML')
def scrubHTML( html ):
@@ -447,4 +454,4 @@
return GTS.translate('cmf_default', message, context=context)
security.declarePublic('Message')
-Message = MessageFactory('cmf_default')
+Message = _ = MessageFactory('cmf_default')
More information about the CMF-checkins
mailing list