[Checkins] SVN: z3ext.cssregistry/trunk/ - Update i18n
Nikolay Kim
fafhrd at datacom.kz
Thu Oct 9 12:22:11 EDT 2008
Log message for revision 91920:
- Update i18n
- Do not use Persistent for registry and property
Changed:
U z3ext.cssregistry/trunk/CHANGES.txt
U z3ext.cssregistry/trunk/buildout.cfg
A z3ext.cssregistry/trunk/i18nall.in
A z3ext.cssregistry/trunk/i18ncheck.in
U z3ext.cssregistry/trunk/setup.py
U z3ext.cssregistry/trunk/src/z3ext/cssregistry/README.txt
U z3ext.cssregistry/trunk/src/z3ext/cssregistry/configlet.zcml
U z3ext.cssregistry/trunk/src/z3ext/cssregistry/configletview.pt
U z3ext.cssregistry/trunk/src/z3ext/cssregistry/configletview.py
U z3ext.cssregistry/trunk/src/z3ext/cssregistry/configure.zcml
D z3ext.cssregistry/trunk/src/z3ext/cssregistry/i18n.py
U z3ext.cssregistry/trunk/src/z3ext/cssregistry/interfaces.py
A z3ext.cssregistry/trunk/src/z3ext/cssregistry/locales/
A z3ext.cssregistry/trunk/src/z3ext/cssregistry/locales/z3ext.cssregistry.pot
U z3ext.cssregistry/trunk/src/z3ext/cssregistry/property.py
U z3ext.cssregistry/trunk/src/z3ext/cssregistry/registry.py
U z3ext.cssregistry/trunk/src/z3ext/cssregistry/zcml.py
-=-
Modified: z3ext.cssregistry/trunk/CHANGES.txt
===================================================================
--- z3ext.cssregistry/trunk/CHANGES.txt 2008-10-09 16:21:01 UTC (rev 91919)
+++ z3ext.cssregistry/trunk/CHANGES.txt 2008-10-09 16:22:11 UTC (rev 91920)
@@ -2,6 +2,14 @@
CHANGES
=======
+1.3.0 (2008-10-10)
+------------------
+
+- Update i18n
+
+- Do not use Persistent for registry and property
+
+
1.2.2 (2008-04-01)
------------------
Modified: z3ext.cssregistry/trunk/buildout.cfg
===================================================================
--- z3ext.cssregistry/trunk/buildout.cfg 2008-10-09 16:21:01 UTC (rev 91919)
+++ z3ext.cssregistry/trunk/buildout.cfg 2008-10-09 16:22:11 UTC (rev 91920)
@@ -1,6 +1,7 @@
[buildout]
develop = .
parts = test coverage-test coverage-report
+ i18n- i18nall i18ncheck i18ndude
[test]
recipe = zc.recipe.testrunner
@@ -16,3 +17,48 @@
eggs = z3c.coverage
scripts = coverage=coverage-report
arguments = ('coverage', 'coverage/report')
+
+[i18n-]
+recipe = z3c.recipe.i18n:i18n
+packages = z3ext.cssregistry
+domain = z3ext.cssregistry
+output = ${buildout:directory}/src/z3ext/cssregistry/locales
+eggs = z3ext.cssregistry [test]
+zcml =
+ <configure i18n_domain="zope"
+ xmlns:zcml="http://namespaces.zope.org/zcml"
+ xmlns:browser="http://namespaces.zope.org/browser">
+ <include package="zope.component" file="meta.zcml" />
+ <include package="zope.securitypolicy" file="meta.zcml" />
+ <include package="zope.viewlet" file="meta.zcml" />
+ <include package="zope.app.component" file="meta.zcml" />
+ <include package="zope.app.security" file="meta.zcml" />
+ <include package="zope.app.pagetemplate" file="meta.zcml" />
+
+ <include package="zope.securitypolicy" />
+ <include package="zope.contentprovider" />
+ <include package="zope.app.security" />
+ <include package="zope.app.zcmlfiles" />
+ <include package="zope.app.authentication" />
+
+ <include package="z3c.autoinclude" file="meta.zcml" />
+ <include package="z3ext.layout" file="meta.zcml" />
+ <include package="z3ext.controlpanel" file="meta.zcml" />
+ <include package="z3ext.cssregistry" file="meta.zcml" />
+ <include package="z3ext.cssregistry" />
+ </configure>
+
+[i18nall]
+recipe = buildout_script
+template_dir = ${buildout:directory}/
+template = i18nall.in
+
+[i18ncheck]
+recipe = buildout_script
+template_dir = ${buildout:directory}/
+template = i18ncheck.in
+
+[i18ndude]
+unzip = true
+recipe = zc.recipe.egg
+eggs = i18ndude
Added: z3ext.cssregistry/trunk/i18nall.in
===================================================================
--- z3ext.cssregistry/trunk/i18nall.in (rev 0)
+++ z3ext.cssregistry/trunk/i18nall.in 2008-10-09 16:22:11 UTC (rev 91920)
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+update_egg()
+{
+ echo "Start update $@"
+
+ bin/i18n_${2}_extract && \
+ bin/i18n_${2}_mergeall && \
+ msgfmt ${1}/locales/nl/LC_MESSAGES/${2}.po -o ${1}/locales/nl/LC_MESSAGES/${2}.mo --no-hash && \
+ msgfmt ${1}/locales/en/LC_MESSAGES/${2}.po -o ${1}/locales/en/LC_MESSAGES/${2}.mo --no-hash
+}
+
+update_egg src/z3ext/cssregistry z3ext && \
Property changes on: z3ext.cssregistry/trunk/i18nall.in
___________________________________________________________________
Name: svn:executable
+ *
Added: z3ext.cssregistry/trunk/i18ncheck.in
===================================================================
--- z3ext.cssregistry/trunk/i18ncheck.in (rev 0)
+++ z3ext.cssregistry/trunk/i18ncheck.in 2008-10-09 16:22:11 UTC (rev 91920)
@@ -0,0 +1,4 @@
+#!/bin/sh
+# Startup or shutdown buildbot
+
+bin/i18ndude find-untranslated ./ | grep z3ext.cssregistry | less
Property changes on: z3ext.cssregistry/trunk/i18ncheck.in
___________________________________________________________________
Name: svn:executable
+ *
Modified: z3ext.cssregistry/trunk/setup.py
===================================================================
--- z3ext.cssregistry/trunk/setup.py 2008-10-09 16:21:01 UTC (rev 91919)
+++ z3ext.cssregistry/trunk/setup.py 2008-10-09 16:22:11 UTC (rev 91920)
@@ -21,7 +21,7 @@
def read(*rnames):
return open(os.path.join(os.path.dirname(__file__), *rnames)).read()
-version = '1.2.3dev'
+version = '1.3.0dev'
setup(name='z3ext.cssregistry',
@@ -59,12 +59,18 @@
'zope.component',
'zope.i18nmessageid',
'zope.configuration',
+ 'z3c.autoinclude',
'z3c.zrtresource>=1.1.0',
],
extras_require = dict(test=['zope.app.testing',
'zope.testing',
'zope.publisher',
'zope.traversing',
+ 'zope.securitypolicy',
+ 'zope.app.zcmlfiles',
+ 'z3ext.layout',
+ 'z3ext.controlpanel',
+ 'z3ext.statusmessage',
]),
include_package_data = True,
zip_safe = False,
Modified: z3ext.cssregistry/trunk/src/z3ext/cssregistry/README.txt
===================================================================
--- z3ext.cssregistry/trunk/src/z3ext/cssregistry/README.txt 2008-10-09 16:21:01 UTC (rev 91919)
+++ z3ext.cssregistry/trunk/src/z3ext/cssregistry/README.txt 2008-10-09 16:22:11 UTC (rev 91920)
@@ -187,11 +187,11 @@
>>> for key, prop in registry.items():
... print key, prop
- color1 <z3ext.cssregistry.property.CSSProperty ...>
- color3 <z3ext.cssregistry.property.CSSProperty ...>
- color2 <z3ext.cssregistry.property.CSSProperty ...>
- fontFamilyH2 <z3ext.cssregistry.property.CSSProperty ...>
- fontFamilyH1 <z3ext.cssregistry.property.CSSProperty ...>
+ color1 <z3ext.cssregistry.property.Property ...>
+ color3 <z3ext.cssregistry.property.Property ...>
+ color2 <z3ext.cssregistry.property.Property ...>
+ fontFamilyH2 <z3ext.cssregistry.property.Property ...>
+ fontFamilyH1 <z3ext.cssregistry.property.Property ...>
>>> len(registry)
5
@@ -200,7 +200,7 @@
True
>>> registry.get(u'color1')
- <z3ext.cssregistry.property.CSSProperty ...>
+ <z3ext.cssregistry.property.Property ...>
>>> del registry[u'color1']
>>> registry.keys()
Modified: z3ext.cssregistry/trunk/src/z3ext/cssregistry/configlet.zcml
===================================================================
--- z3ext.cssregistry/trunk/src/z3ext/cssregistry/configlet.zcml 2008-10-09 16:21:01 UTC (rev 91919)
+++ z3ext.cssregistry/trunk/src/z3ext/cssregistry/configlet.zcml 2008-10-09 16:22:11 UTC (rev 91920)
@@ -3,37 +3,35 @@
xmlns:zcml="http://namespaces.zope.org/zcml"
xmlns:z3ext="http://namespaces.zope.org/z3ext"
xmlns:browser="http://namespaces.zope.org/browser"
- i18n_domain="z3ext">
+ zcml:condition="installed z3ext.controlpanel"
+ i18n_domain="z3ext.cssregistry">
- <zcml:configure zcml:condition="installed z3ext.controlpanel">
- <include package="z3ext.controlpanel" file="meta.zcml" />
+ <include package="z3ext.controlpanel" file="meta.zcml" />
- <z3ext:configlet
- name="ui.cssregistry"
- title="CSS Properties"
- description="CSS properties registry configuration."
- schema=".interfaces.ICSSRegistryConfiglet"
- class=".configlet.CSSRegistryConfiglet" />
+ <z3ext:configlet
+ name="ui.cssregistry"
+ title="CSS Properties"
+ description="CSS properties registry configuration."
+ schema=".interfaces.ICSSRegistryConfiglet"
+ class=".configlet.CSSRegistryConfiglet" />
+
+ <adapter factory=".configlet.portalCssRegistry" />
- <adapter factory=".configlet.portalCssRegistry" />
+ <class class=".configlet.CSSRegistryConfiglet">
+ <require
+ permission="zope.Public"
+ attributes="name title"
+ interface="zope.interface.common.mapping.IEnumerableMapping" />
+ <require
+ permission="z3ext.Configure"
+ interface="zope.interface.common.mapping.IWriteMapping" />
+ </class>
+
+ <browser:page
+ name="index.html"
+ for=".interfaces.ICSSRegistryConfiglet"
+ template="configletview.pt"
+ class=".configletview.ViewRegistry"
+ permission="z3ext.Configure" />
- <class class=".configlet.CSSRegistryConfiglet">
- <require
- permission="zope.Public"
- attributes="name title"
- interface="zope.interface.common.mapping.IEnumerableMapping" />
- <require
- permission="z3ext.Configure"
- interface="zope.interface.common.mapping.IWriteMapping" />
- </class>
-
- <browser:page
- name="index.html"
- for=".interfaces.ICSSRegistryConfiglet"
- template="configletview.pt"
- class=".configletview.ViewRegistry"
- permission="z3ext.Configure" />
-
- </zcml:configure>
-
</configure>
Modified: z3ext.cssregistry/trunk/src/z3ext/cssregistry/configletview.pt
===================================================================
--- z3ext.cssregistry/trunk/src/z3ext/cssregistry/configletview.pt 2008-10-09 16:21:01 UTC (rev 91919)
+++ z3ext.cssregistry/trunk/src/z3ext/cssregistry/configletview.pt 2008-10-09 16:22:11 UTC (rev 91920)
@@ -1,17 +1,18 @@
-<form method="post" action="@@index.html" class="z-form" i18n:domain="z3ext">
- <div class="topframe" tal:define="props context/keys">
+<form method="post" action="@@index.html" class="z-form"
+ i18n:domain="z3ext.cssregistry">
+ <div class="z-topframe" tal:define="props context/keys">
<h1 tal:content="context/__title__">Portal CSS properties</h1>
<div class="pageDescription" tal:content="context/__description__"></div>
- <div class="z-field">
+ <div class="z-form-field">
<label i18n:translate="">Status</label>
<div>
<select name="form.enabled">
- <option value="yes"
+ <option value="yes"
tal:attributes="selected context/enabled" i18n:translate="">
Enabled
</option>
- <option value="no"
+ <option value="no"
tal:attributes="selected not:context/enabled" i18n:translate="">
Disabled
</option>
@@ -23,13 +24,13 @@
<tal:block tal:condition="props">
<h2 i18n:translate="">Properties</h2>
- <table class="listing">
+ <table class="z-content-listing">
<tr>
<th> </th>
<th i18n:translate="">Property</th>
<th i18n:translate="">Value</th>
</tr>
- <tr tal:repeat="prop props"
+ <tr tal:repeat="prop props"
tal:attributes="class python:repeat['prop'].even() and 'even' or 'odd'">
<td><input type="checkbox" name="property:list"
tal:attributes="value prop" /></td>
@@ -40,9 +41,9 @@
</tr>
</table>
<div class="z-form-controls">
- <input type="submit" class="z-form-button"
+ <input type="submit" class="z-form-savebutton"
name="form.save" value="Save" i18n:attributes="value" />
- <input type="submit" class="z-form-removebutton"
+ <input type="submit" class="z-form-removebutton"
name="form.remove" value="Remove" i18n:attributes="value" />
</div>
</tal:block>
@@ -50,26 +51,12 @@
<tal:block tal:condition="not:props" i18n:translate="">
There are no any defined properties.
</tal:block>
-
- <tal:block condition="nothing">
- <br /><br />
- <hr />
- <h3 i18n:translate="">Add property</h3>
- <div class="z-field">
- </div>
- <div>
- </div>
- <div class="z-form-controls">
- <input type="submit" class="z-form-addbutton"
- name="form.add" value="Add" i18n:attributes="value" />
- </div>
- </tal:block>
</div>
- <div class="frame">
+ <div class="z-frame">
<h2 i18n:translate="">Add property</h2>
- <div class="z-field">
+ <div class="z-form-field">
<label i18n:translate="">Property name</label>
<div>
@@ -77,7 +64,7 @@
</div>
</div>
- <div class="z-field">
+ <div class="z-form-field">
<label i18n:translate="">Value</label>
<div>
@@ -91,11 +78,12 @@
</div>
</div>
- <div class="frame" tal:define="regs view/listRegistries" tal:condition="regs">
+ <div class="z-frame"
+ tal:define="regs view/listRegistries" tal:condition="regs">
<h2 i18n:translate="">Copy/Update properties from existent registries</h2>
<div> </div>
- <div class="z-field">
+ <div class="z-form-field">
<label i18n:translate="">Registry</label>
<div></div>
<select name="registry:int">
@@ -107,8 +95,8 @@
<div class="z-form-controls">
<input type="submit" class="z-form-button" name="form.copy"
value="Copy" i18n:attributes="value" />
- <input type="submit" class="z-form-standalonebtn" name="form.update"
- value="Update" i18n:attributes="value" />
+ <!--input type="submit" class="z-form-standalonebtn" name="form.update"
+ value="Update" i18n:attributes="value" /-->
</div>
</div>
</form>
Modified: z3ext.cssregistry/trunk/src/z3ext/cssregistry/configletview.py
===================================================================
--- z3ext.cssregistry/trunk/src/z3ext/cssregistry/configletview.py 2008-10-09 16:21:01 UTC (rev 91919)
+++ z3ext.cssregistry/trunk/src/z3ext/cssregistry/configletview.py 2008-10-09 16:22:11 UTC (rev 91920)
@@ -19,10 +19,9 @@
from z3ext.layout.pagelet import BrowserPagelet
from z3ext.statusmessage.interfaces import IStatusMessage
-from z3ext.cssregistry.i18n import _
+from z3ext.cssregistry.property import Property
from z3ext.cssregistry.registry import registries
-from z3ext.cssregistry.property import CSSProperty
-from z3ext.cssregistry.interfaces import ICSSRegistry
+from z3ext.cssregistry.interfaces import _, ICSSRegistry
class ViewRegistry(BrowserPagelet):
@@ -32,7 +31,7 @@
for key, registry in registries.items():
name, layer = key
- regs.append({'name': name or 'Without name',
+ regs.append({'name': name or _('Without name'),
'layer': '%s.%s'%(layer.__module__, layer.__name__),
'registry': registry})
@@ -44,16 +43,13 @@
if 'form.copy' in request:
reg = request.get('registry', None)
- try:
- registry = self.listRegistries()[int(reg)]['registry']
+ registry = self.listRegistries()[int(reg)]['registry']
- for prop, value in registry.items():
- self.context[prop] = value
+ for prop, value in registry.items():
+ self.context[prop] = value
- IStatusMessage(request).add(
- _(u"CSS Registry has been copied."))
- except:
- pass
+ IStatusMessage(request).add(
+ _(u"CSS Registry has been copied."))
if 'form.add' in request:
name = request.get('form.add.name', '').strip()
@@ -61,7 +57,7 @@
IStatusMessage(request).add(
_(u"Can't add property with emtpy name."), 'error')
else:
- self.context[name] = CSSProperty(
+ self.context[name] = Property(
name, request.get('form.add.value', ''))
if 'form.remove' in request:
@@ -70,12 +66,15 @@
IStatusMessage(request).add(_(u"Properties have been removed."))
if 'form.save' in request:
-
for key, value in request.form.items():
if key.startswith('prop-'):
key = key[5:]
- self.context[key].value = value
+ old = self.context[key]
+ property = Property(
+ old.name, value, old.description, old.type)
+ self.context[key] = property
+
if request.get('form.enabled') == 'yes':
self.context.enabled = True
else:
@@ -84,3 +83,4 @@
IStatusMessage(request).add(_(u"Properties have been changed."))
return self.index()
+
Modified: z3ext.cssregistry/trunk/src/z3ext/cssregistry/configure.zcml
===================================================================
--- z3ext.cssregistry/trunk/src/z3ext/cssregistry/configure.zcml 2008-10-09 16:21:01 UTC (rev 91919)
+++ z3ext.cssregistry/trunk/src/z3ext/cssregistry/configure.zcml 2008-10-09 16:22:11 UTC (rev 91920)
@@ -1,7 +1,10 @@
<configure
xmlns="http://namespaces.zope.org/zope"
- i18n_domain="z3ext">
+ xmlns:browser="http://namespaces.zope.org/browser"
+ i18n_domain="z3ext.cssregistry">
+ <includeDependencies package="." />
+
<utility
name="cssregistry"
provides="z3c.zrtresource.interfaces.IZRTCommandFactory"
@@ -14,16 +17,71 @@
interface="zope.interface.common.mapping.IEnumerableMapping" />
</class>
- <class class=".property.CSSProperty">
+ <class class=".property.Property">
<require
permission="zope.Public"
interface=".interfaces.ICSSProperty" />
+ <require
+ permission="zope.Public"
+ set_schema=".interfaces.ICSSProperty" />
+ </class>
+ <class class=".property.CSSProperty">
<require
permission="zope.Public"
+ interface=".interfaces.ICSSProperty" />
+ <require
+ permission="zope.Public"
set_schema=".interfaces.ICSSProperty" />
</class>
+ <!-- default proeprties -->
+ <browser:cssregistry title="Default css properties">
+ <property name="backgroundColor" value="#F8F8F8" />
+ <property name="contentBackgroundColor" value="white" />
+
+ <property name="fontFamily"
+ value="Verdana, Tahoma, Helvetica, Arial, sans-serif" />
+ <property name="headingFontFamily"
+ value="Verdana, Tahoma, Helvetica, Arial, sans-serif" />
+ <property name="monospaceFontFamily"
+ value="Monaco, 'Courier New', Courier, monospace" />
+
+ <property name="fontColor" value="#252525" />
+ <property name="fontBaseSize" value="70%" />
+ <property name="fontSmallSize" value="90%" />
+
+ <property name="linkColor" value="#003C75"/>
+ <property name="linkActiveColor" value="Red" />
+ <property name="linkVisitedColor" value="Purple" />
+
+ <property name="borderWidth" value="1px" />
+ <property name="borderStyle" value="solid" />
+ <property name="borderStyleAnnotations" value="solid" />
+
+ <property name="globalFontColor" value="#71A0CD" />
+ <property name="globalBorderColor" value="#B0C7DD" />
+ <property name="globalBackgroundColor" value="#E2EFFC" />
+ <property name="globalExtraColor" value="#6088AE" />
+ <property name="globalExtraBorderColor" value="#6088AE" />
+
+ <property name="discreetColor" value="#76797C" />
+
+ <property name="contentViewBorderColor" value="#A5A5A5" />
+ <property name="contentViewBackgroundColor" value="#E4E4E4" />
+ <property name="contentViewFontColor" value="#898989" />
+
+ <property name="inputFontColor" value="#252525" />
+
+ <property name="textTransform" value="lowercase" />
+
+ <property name="evenRowBackgroundColor" value="#F3F7FD" />
+ <property name="oddRowBackgroundColor" value="transparent" />
+
+ <property name="notifyBorderColor" value="#ffa500" />
+ <property name="notifyBackgroundColor" value="#ffce7b" />
+ </browser:cssregistry>
+
<include file="configlet.zcml" />
</configure>
Deleted: z3ext.cssregistry/trunk/src/z3ext/cssregistry/i18n.py
===================================================================
--- z3ext.cssregistry/trunk/src/z3ext/cssregistry/i18n.py 2008-10-09 16:21:01 UTC (rev 91919)
+++ z3ext.cssregistry/trunk/src/z3ext/cssregistry/i18n.py 2008-10-09 16:22:11 UTC (rev 91920)
@@ -1,19 +0,0 @@
-##############################################################################
-#
-# Copyright (c) 2007 Zope Corporation and Contributors.
-# All Rights Reserved.
-#
-# This software is subject to the provisions of the Zope Public License,
-# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
-# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-# FOR A PARTICULAR PURPOSE.
-#
-##############################################################################
-""" i18n
-
-$Id$
-"""
-from zope.i18nmessageid import MessageFactory
-_ = MessageFactory('z3ext')
Modified: z3ext.cssregistry/trunk/src/z3ext/cssregistry/interfaces.py
===================================================================
--- z3ext.cssregistry/trunk/src/z3ext/cssregistry/interfaces.py 2008-10-09 16:21:01 UTC (rev 91919)
+++ z3ext.cssregistry/trunk/src/z3ext/cssregistry/interfaces.py 2008-10-09 16:22:11 UTC (rev 91920)
@@ -17,8 +17,9 @@
"""
from zope import schema, interface
from zope.interface.common.mapping import IMapping
+from zope.i18nmessageid import MessageFactory
-from z3ext.cssregistry.i18n import _
+_ = MessageFactory('z3ext.cssregistry')
class ICSSRegistry(IMapping):
Added: z3ext.cssregistry/trunk/src/z3ext/cssregistry/locales/z3ext.cssregistry.pot
===================================================================
--- z3ext.cssregistry/trunk/src/z3ext/cssregistry/locales/z3ext.cssregistry.pot (rev 0)
+++ z3ext.cssregistry/trunk/src/z3ext/cssregistry/locales/z3ext.cssregistry.pot 2008-10-09 16:22:11 UTC (rev 91920)
@@ -0,0 +1,154 @@
+##############################################################################
+#
+# Copyright (c) 2003-2004 Zope Corporation and Contributors.
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+#
+##############################################################################
+msgid ""
+msgstr ""
+"Project-Id-Version: Development/Unknown\n"
+"POT-Creation-Date: Thu Oct 9 22:21:34 2008\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
+"Language-Team: Zope 3 Developers <zope3-dev at zope.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Generated-By: zope/app/locales/extract.py\n"
+
+#: src/z3ext/cssregistry/configlet.zcml:11
+msgid "CSS Properties"
+msgstr ""
+
+#: src/z3ext/cssregistry/configlet.zcml:11
+msgid "CSS properties registry configuration."
+msgstr ""
+
+#: src/z3ext/cssregistry/configletview.pt:15
+msgid "Disabled"
+msgstr ""
+
+#: src/z3ext/cssregistry/configletview.pt:25
+msgid "Properties"
+msgstr ""
+
+#: src/z3ext/cssregistry/configletview.pt:30
+msgid "Property"
+msgstr ""
+
+#: src/z3ext/cssregistry/configletview.pt:44
+msgid "Save"
+msgstr ""
+
+#: src/z3ext/cssregistry/configletview.pt:46
+msgid "Remove"
+msgstr ""
+
+#: src/z3ext/cssregistry/configletview.pt:51
+msgid "There are no any defined properties."
+msgstr ""
+
+#: src/z3ext/cssregistry/configletview.pt:57
+msgid "Add property"
+msgstr ""
+
+#: src/z3ext/cssregistry/configletview.pt:76
+msgid "Add"
+msgstr ""
+
+#: src/z3ext/cssregistry/configletview.pt:8
+msgid "Status"
+msgstr ""
+
+#: src/z3ext/cssregistry/configletview.pt:83
+msgid "Copy/Update properties from existent registries"
+msgstr ""
+
+#: src/z3ext/cssregistry/configletview.pt:87
+msgid "Registry"
+msgstr ""
+
+#: src/z3ext/cssregistry/configletview.pt:96
+msgid "Copy"
+msgstr ""
+
+#: src/z3ext/cssregistry/configletview.py:34
+msgid "Without name"
+msgstr ""
+
+#: src/z3ext/cssregistry/configletview.py:52
+msgid "CSS Registry has been copied."
+msgstr ""
+
+#: src/z3ext/cssregistry/configletview.py:58
+msgid "Can't add property with emtpy name."
+msgstr ""
+
+#: src/z3ext/cssregistry/configletview.py:66
+msgid "Properties have been removed."
+msgstr ""
+
+#: src/z3ext/cssregistry/configletview.py:83
+msgid "Properties have been changed."
+msgstr ""
+
+#: src/z3ext/cssregistry/interfaces.py:30
+#: src/z3ext/cssregistry/interfaces.py:45
+msgid "Name"
+msgstr ""
+
+#: src/z3ext/cssregistry/interfaces.py:31
+msgid "CSS Registry name"
+msgstr ""
+
+#: src/z3ext/cssregistry/interfaces.py:36
+msgid "Title"
+msgstr ""
+
+#: src/z3ext/cssregistry/interfaces.py:37
+msgid "CSS Registry title"
+msgstr ""
+
+#: src/z3ext/cssregistry/interfaces.py:46
+#: src/z3ext/cssregistry/configletview.pt:60
+msgid "Property name"
+msgstr ""
+
+#: src/z3ext/cssregistry/interfaces.py:50
+msgid "Description"
+msgstr ""
+
+#: src/z3ext/cssregistry/interfaces.py:51
+msgid "Property description"
+msgstr ""
+
+#: src/z3ext/cssregistry/interfaces.py:55
+#: src/z3ext/cssregistry/configletview.pt:31
+#: src/z3ext/cssregistry/configletview.pt:68
+msgid "Value"
+msgstr ""
+
+#: src/z3ext/cssregistry/interfaces.py:56
+msgid "Property value"
+msgstr ""
+
+#: src/z3ext/cssregistry/interfaces.py:60
+msgid "Type"
+msgstr ""
+
+#: src/z3ext/cssregistry/interfaces.py:61
+msgid "Property type. (color, font, size)"
+msgstr ""
+
+#: src/z3ext/cssregistry/interfaces.py:82
+#: src/z3ext/cssregistry/configletview.pt:11
+msgid "Enabled"
+msgstr ""
+
Modified: z3ext.cssregistry/trunk/src/z3ext/cssregistry/property.py
===================================================================
--- z3ext.cssregistry/trunk/src/z3ext/cssregistry/property.py 2008-10-09 16:21:01 UTC (rev 91919)
+++ z3ext.cssregistry/trunk/src/z3ext/cssregistry/property.py 2008-10-09 16:22:11 UTC (rev 91920)
@@ -22,7 +22,7 @@
from interfaces import ICSSProperty
-class CSSProperty(Persistent):
+class Property(object):
interface.implements(ICSSProperty)
def __init__(self, name, value, description='', type=''):
@@ -34,3 +34,7 @@
def process(self, text):
regex = re.compile(re.escape(self.name))
return regex.subn(self.value, text)[0]
+
+
+class CSSProperty(Property, Persistent):
+ pass
Modified: z3ext.cssregistry/trunk/src/z3ext/cssregistry/registry.py
===================================================================
--- z3ext.cssregistry/trunk/src/z3ext/cssregistry/registry.py 2008-10-09 16:21:01 UTC (rev 91919)
+++ z3ext.cssregistry/trunk/src/z3ext/cssregistry/registry.py 2008-10-09 16:22:11 UTC (rev 91920)
@@ -16,13 +16,12 @@
$Id$
"""
from zope import interface
-from persistent import Persistent
from interfaces import ICSSRegistry
registries = {}
-class CSSRegistry(Persistent):
+class CSSRegistry(object):
interface.implements(ICSSRegistry)
@property
Modified: z3ext.cssregistry/trunk/src/z3ext/cssregistry/zcml.py
===================================================================
--- z3ext.cssregistry/trunk/src/z3ext/cssregistry/zcml.py 2008-10-09 16:21:01 UTC (rev 91919)
+++ z3ext.cssregistry/trunk/src/z3ext/cssregistry/zcml.py 2008-10-09 16:22:11 UTC (rev 91920)
@@ -20,83 +20,82 @@
from zope.component.zcml import handler
from zope.configuration.fields import GlobalObject
-from i18n import _
-from property import CSSProperty
+from property import Property
from registry import CSSRegistry, registries
-from interfaces import ICSSRegistry, ICSSRegistryLayer
+from interfaces import _, ICSSRegistry, ICSSRegistryLayer
class ICSSRegistryDirective(interface.Interface):
name = schema.TextLine(
- title = _(u'Name'),
- description = _(u'Registry name'),
+ title = u'Name',
+ description = u'Registry name',
required = False)
title = schema.TextLine(
- title = _(u'Title'),
+ title = u'Title',
required = False)
layer = GlobalObject(
- title=_(u"The layer the css registry should be found in"),
- required=False)
+ title = u"The layer the css registry should be found in",
+ required = False)
class ICSSPropertySubDirective(interface.Interface):
name = schema.TextLine(
- title = _(u'Name'),
- description = _(u'Property name'),
+ title = u'Name',
+ description = u'Property name',
required = True)
value = schema.TextLine(
- title = _(u'Value'),
- description = _(u'Property value'),
+ title = u'Value',
+ description = u'Property value',
required = True)
description = schema.TextLine(
- title = _(u'Description'),
- description = _(u'Property description'),
+ title = u'Description',
+ description = u'Property description',
required = False)
type = schema.TextLine(
- title = _(u'Type'),
- description = _(u'Property type. (color, font, size)'),
+ title = u'Type',
+ description = u'Property type. (color, font, size)',
required = False)
-
+
class ICSSPropertyDirective(interface.Interface):
registry = schema.TextLine(
- title = _(u'Registry'),
+ title = u'Registry',
required = False)
layer = GlobalObject(
- title = _(u"The layer the css registry should be found in"),
+ title = u"The layer the css registry should be found in",
required=False)
name = schema.TextLine(
- title = _(u'Name'),
+ title = u'Name',
required = True)
value = schema.TextLine(
- title = _(u'Value'),
+ title = u'Value',
required = True)
description = schema.TextLine(
- title = _(u'Description'),
- description = _(u'Property description'),
+ title = u'Description',
+ description = u'Property description',
required = False)
type = schema.TextLine(
- title = _(u'Type'),
- description = _(u'Property type. (color, font, size)'),
+ title = u'Type',
+ description = u'Property type. (color, font, size)',
required = False)
class Factory(object):
-
+
def __init__(self, registry):
self.registry = registry
@@ -127,10 +126,10 @@
)
def property(self, _context, name, value, description='', type=''):
- self.registry[name] = CSSProperty(name, value, description, type)
+ self.registry[name] = Property(name, value, description, type)
-def csspropertyHandler(_context, name, value, registry='',
+def csspropertyHandler(_context, name, value, registry='',
layer=interface.Interface, description='', type=''):
registry = registries[(registry, layer)]
- registry[name] = CSSProperty(name, value, description, type)
+ registry[name] = Property(name, value, description, type)
More information about the Checkins
mailing list