Added locales and locales extraction scripts
authorThierry Florac <tflorac@ulthar.net>
Fri, 14 Aug 2009 23:50:20 +0200
changeset 12 2956fca1709a
parent 11 89da289790ea
child 13 6eddd17108b1
Added locales and locales extraction scripts
bin/i18nextract.py
bin/locales
ztfy/utils/configure.zcml
ztfy/utils/locales/fr/LC_MESSAGES/ztfy.utils.mo
ztfy/utils/locales/fr/LC_MESSAGES/ztfy.utils.po
ztfy/utils/locales/ztfy.utils.pot
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bin/i18nextract.py	Fri Aug 14 23:50:20 2009 +0200
@@ -0,0 +1,156 @@
+#!/var/local/ztfy/bin/python2.4
+
+import os
+import sys
+sys.path[0:0] = [
+  '/var/local/ztfy/ztfy.app/src',
+  '/var/local/ztfy/ztfy.utils',
+  '/var/local/ztfy/ztfy.monitor',
+  '/var/local/ztfy/ztfy.jqueryui',
+  '/var/local/ztfy/ztfy.skin',
+  '/var/local/ztfy/ztfy.i18n',
+  '/var/local/ztfy/ztfy.workflow',
+  '/var/local/ztfy/ztfy.file',
+  '/var/local/ztfy/ztfy.extfile',
+  '/var/local/ztfy/ztfy.gallery',
+  '/var/local/ztfy/eggs/zope.app.apidoc-3.4.3-py2.4.egg',
+  '/var/local/ztfy/eggs/zope.app.securitypolicy-3.4.6-py2.4.egg',
+  '/var/local/ztfy/eggs/z3c.evalexception-2.0-py2.4.egg',
+  '/var/local/ztfy/eggs/Paste-1.7.2-py2.4.egg',
+  '/var/local/ztfy/eggs/setuptools-0.6c9-py2.4.egg',
+  '/var/local/ztfy/eggs/PasteScript-1.7.3-py2.4.egg',
+  '/var/local/ztfy/eggs/PasteDeploy-1.3.3-py2.4.egg',
+  '/var/local/ztfy/eggs/zope.security-3.4.1-py2.4-linux-i686.egg',
+  '/var/local/ztfy/eggs/zope.securitypolicy-3.4.1-py2.4.egg',
+  '/var/local/ztfy/eggs/zope.schema-3.4.0-py2.4.egg',
+  '/var/local/ztfy/eggs/zope.location-3.4.0-py2.4.egg',
+  '/var/local/ztfy/eggs/zope.interface-3.4.1-py2.4-linux-i686.egg',
+  '/var/local/ztfy/eggs/zope.i18nmessageid-3.4.3-py2.4-linux-i686.egg',
+  '/var/local/ztfy/eggs/zope.i18n-3.4.0-py2.4.egg',
+  '/var/local/ztfy/eggs/zope.exceptions-3.4.0-py2.4.egg',
+  '/var/local/ztfy/eggs/zope.configuration-3.4.0-py2.4.egg',
+  '/var/local/ztfy/eggs/zope.component-3.4.0-py2.4.egg',
+  '/var/local/ztfy/eggs/zope.app.security-3.5.2-py2.4.egg',
+  '/var/local/ztfy/eggs/zope.app.form-3.4.1-py2.4.egg',
+  '/var/local/ztfy/eggs/zope.annotation-3.4.1-py2.4.egg',
+  '/var/local/ztfy/eggs/zope.traversing-3.4.1-py2.4.egg',
+  '/var/local/ztfy/eggs/zope.testing-3.5.6-py2.4.egg',
+  '/var/local/ztfy/eggs/zope.testbrowser-3.4.2-py2.4.egg',
+  '/var/local/ztfy/eggs/zope.publisher-3.4.6-py2.4.egg',
+  '/var/local/ztfy/eggs/zope.proxy-3.4.2-py2.4-linux-i686.egg',
+  '/var/local/ztfy/eggs/zope.deprecation-3.4.0-py2.4.egg',
+  '/var/local/ztfy/eggs/zope.cachedescriptors-3.4.1-py2.4.egg',
+  '/var/local/ztfy/eggs/zope.app.tree-3.4.0-py2.4.egg',
+  '/var/local/ztfy/eggs/zope.app.testing-3.4.3-py2.4.egg',
+  '/var/local/ztfy/eggs/zope.app.skins-3.4.0-py2.4.egg',
+  '/var/local/ztfy/eggs/zope.app.renderer-3.4.0-py2.4.egg',
+  '/var/local/ztfy/eggs/zope.app.publisher-3.4.1-py2.4.egg',
+  '/var/local/ztfy/eggs/zope.app.preference-3.4.1-py2.4.egg',
+  '/var/local/ztfy/eggs/zope.app.onlinehelp-3.4.1-py2.4.egg',
+  '/var/local/ztfy/eggs/zope.app.container-3.5.6-py2.4-linux-i686.egg',
+  '/var/local/ztfy/eggs/zope.app.component-3.4.1-py2.4.egg',
+  '/var/local/ztfy/eggs/zope.app.basicskin-3.4.0-py2.4.egg',
+  '/var/local/ztfy/eggs/zope.app.appsetup-3.4.1-py2.4.egg',
+  '/var/local/ztfy/eggs/zope.app.catalog-3.5.1-py2.4.egg',
+  '/var/local/ztfy/eggs/zope.app.keyreference-3.4.1-py2.4.egg',
+  '/var/local/ztfy/eggs/zope.app.intid-3.4.1-py2.4.egg',
+  '/var/local/ztfy/eggs/zope.app.session-3.5.1-py2.4.egg',
+  '/var/local/ztfy/eggs/zope.app.authentication-3.4.4-py2.4.egg',
+  '/var/local/ztfy/eggs/zope.formlib-3.4.0-py2.4.egg',
+  '/var/local/ztfy/eggs/zope.copypastemove-3.4.0-py2.4.egg',
+  '/var/local/ztfy/eggs/zope.app.zcmlfiles-3.4.3-py2.4.egg',
+  '/var/local/ztfy/eggs/zope.app.wsgi-3.4.1-py2.4.egg',
+  '/var/local/ztfy/eggs/zdaemon-2.0.2-py2.4.egg',
+  '/var/local/ztfy/eggs/ZConfig-2.5.1-py2.4.egg',
+  '/var/local/ztfy/eggs/ZODB3-3.8.1-py2.4-linux-i686.egg',
+  '/var/local/ztfy/eggs/zope.deferredimport-3.4.0-py2.4.egg',
+  '/var/local/ztfy/eggs/pytz-2007k-py2.4.egg',
+  '/var/local/ztfy/eggs/zope.event-3.4.0-py2.4.egg',
+  '/var/local/ztfy/eggs/zope.hookable-3.4.0-py2.4-linux-i686.egg',
+  '/var/local/ztfy/eggs/zope.app.pagetemplate-3.4.1-py2.4.egg',
+  '/var/local/ztfy/eggs/zope.app.applicationcontrol-3.4.3-py2.4.egg',
+  '/var/local/ztfy/eggs/ClientForm-0.2.9-py2.4.egg',
+  '/var/local/ztfy/eggs/mechanize-0.1.7b-py2.4.egg',
+  '/var/local/ztfy/eggs/zope.app.zapi-3.4.0-py2.4.egg',
+  '/var/local/ztfy/eggs/zope.app.rotterdam-3.4.1-py2.4.egg',
+  '/var/local/ztfy/eggs/zope.app.folder-3.4.0-py2.4.egg',
+  '/var/local/ztfy/eggs/zope.app.publication-3.4.3-py2.4.egg',
+  '/var/local/ztfy/eggs/zope.app.dependable-3.4.0-py2.4.egg',
+  '/var/local/ztfy/eggs/zope.app.debug-3.4.1-py2.4.egg',
+  '/var/local/ztfy/eggs/zope.structuredtext-3.4.0-py2.4.egg',
+  '/var/local/ztfy/eggs/docutils-0.4-py2.4.egg',
+  '/var/local/ztfy/eggs/zope.pagetemplate-3.4.0-py2.4.egg',
+  '/var/local/ztfy/eggs/zope.datetime-3.4.0-py2.4.egg',
+  '/var/local/ztfy/eggs/zope.contenttype-3.4.0-py2.4.egg',
+  '/var/local/ztfy/eggs/zope.app.file-3.4.4-py2.4.egg',
+  '/var/local/ztfy/eggs/zope.app.broken-3.4.0-py2.4.egg',
+  '/var/local/ztfy/eggs/zope.dublincore-3.4.0-py2.4.egg',
+  '/var/local/ztfy/eggs/zope.size-3.4.0-py2.4.egg',
+  '/var/local/ztfy/eggs/zope.filerepresentation-3.4.0-py2.4.egg',
+  '/var/local/ztfy/eggs/zope.lifecycleevent-3.4.0-py2.4.egg',
+  '/var/local/ztfy/eggs/zope.dottedname-3.4.2-py2.4.egg',
+  '/var/local/ztfy/eggs/zope.thread-3.4-py2.4.egg',
+  '/var/local/ztfy/eggs/zope.app.interface-3.4.0-py2.4.egg',
+  '/var/local/ztfy/eggs/zope.error-3.5.1-py2.4.egg',
+  '/var/local/ztfy/eggs/zope.index-3.4.1-py2.4.egg',
+  '/var/local/ztfy/eggs/zope.session-3.4.1-py2.4.egg',
+  '/var/local/ztfy/eggs/zope.minmax-1.1.0-py2.4.egg',
+  '/var/local/ztfy/eggs/zope.app.http-3.4.1-py2.4.egg',
+  '/var/local/ztfy/eggs/zope.app.principalannotation-3.4.0-py2.4.egg',
+  '/var/local/ztfy/eggs/zope.app.schema-3.4.0-py2.4.egg',
+  '/var/local/ztfy/eggs/zope.app.zopeappgenerations-3.4.0-py2.4.egg',
+  '/var/local/ztfy/eggs/zope.app.locales-3.4.5-py2.4.egg',
+  '/var/local/ztfy/eggs/zope.app.i18n-3.4.4-py2.4.egg',
+  '/var/local/ztfy/eggs/zope.app.generations-3.4.1-py2.4.egg',
+  '/var/local/ztfy/eggs/zope.app.content-3.4.0-py2.4.egg',
+  '/var/local/ztfy/eggs/zope.modulealias-3.4.0-py2.4.egg',
+  '/var/local/ztfy/eggs/zope.tales-3.4.0-py2.4.egg',
+  '/var/local/ztfy/eggs/zope.app.exception-3.4.1-py2.4.egg',
+  '/var/local/ztfy/eggs/zope.app.error-3.5.1-py2.4.egg',
+  '/var/local/ztfy/eggs/zope.tal-3.4.1-py2.4.egg',
+  '/var/local/ztfy/eggs/zodbcode-3.4.0-py2.4.egg',
+  '/var/local/ztfy/eggs/RestrictedPython-3.4.2-py2.4.egg',
+  '/var/local/ztfy/eggs/zope.paste-0.3-py2.4.egg',
+  '/var/local/ztfy/eggs/zope.viewlet-3.4.2-py2.4.egg',
+  '/var/local/ztfy/eggs/zope.contentprovider-3.4.0-py2.4.egg',
+  '/var/local/ztfy/eggs/lxml-1.3.6-py2.4-linux-i686.egg',
+  '/var/local/ztfy/eggs/threadframe-0.2-py2.4-linux-i686.egg',
+  '/var/local/ztfy/eggs/zc.monitor-0.1.2-py2.4.egg',
+  '/var/local/ztfy/eggs/zc.ngi-1.0.1-py2.4.egg',
+  '/var/local/ztfy/eggs/zc.z3monitor-0.7.0-py2.4.egg',
+  '/var/local/ztfy/eggs/zc.resourcelibrary-1.0.0-py2.4.egg',
+  '/var/local/ztfy/eggs/z3c.language.negotiator-1.0.1-py2.4.egg',
+  '/var/local/ztfy/eggs/z3c.language.session-1.0.1-py2.4.egg',
+  '/var/local/ztfy/eggs/z3c.language.switch-1.0.1-py2.4.egg',
+  '/var/local/ztfy/eggs/z3c.layer-0.2.3-py2.4.egg',
+  '/var/local/ztfy/eggs/z3c.widget-0.1.7-py2.4.egg',
+  '/var/local/ztfy/eggs/z3c.form-1.8.0-py2.4.egg',
+  '/var/local/ztfy/eggs/z3c.formui-1.4.1-py2.4.egg',
+  '/var/local/ztfy/eggs/z3c.formjs-0.3.0-py2.4.egg',
+  '/var/local/ztfy/eggs/z3c.macro-1.1.0-py2.4.egg',
+  '/var/local/ztfy/eggs/z3c.template-1.1-py2.4.egg',
+  '/var/local/ztfy/eggs/z3c.menu-0.2.0-py2.4.egg',
+  '/var/local/ztfy/eggs/z3c.json-0.5.1-py2.4.egg',
+  '/var/local/ztfy/eggs/z3c.jsonrpc-0.5.1-py2.4.egg',
+  '/var/local/ztfy/eggs/z3c.viewlet-1.0.0-py2.4.egg',
+  '/var/local/ztfy/eggs/z3c.i18n-0.1.1-py2.4.egg',
+  '/var/local/ztfy/eggs/z3c.traverser-0.2.1-py2.4.egg',
+  '/var/local/ztfy/eggs/z3c.schema-0.1_r73916-py2.4.egg',
+  '/var/local/ztfy/eggs/z3c.javascript-0.2_r80712-py2.4.egg',
+  '/var/local/ztfy/eggs/z3c.pagelet-1.0.2-py2.4.egg',
+  '/var/local/ztfy/eggs/z3c.resourceinclude-0.2.2-py2.4.egg',
+  '/var/local/ztfy/eggs/z3c.pt-0.6.1-py2.4.egg',
+  '/var/local/ztfy/eggs/jquery.layer-1.0.0-py2.4.egg',
+  ]
+
+from zope.app.locales import extract
+
+basedir = os.path.realpath(os.path.join(os.path.dirname(__file__),
+                                        '../ztfy/utils'))
+sitedir = os.path.realpath(os.path.join(os.path.dirname(__file__),
+                                        '../../ztfy.app/site.zcml'))
+
+extract.main(argv = [ '-p', basedir,
+                      '-s', sitedir,
+                      '-d', 'ztfy.utils',
+                      '-o', os.path.join(basedir,'locales') ])
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bin/locales	Fri Aug 14 23:50:20 2009 +0200
@@ -0,0 +1,7 @@
+#!/bin/bash
+
+BASDIR=`dirname $0`
+LOCDIR=${BASDIR}/../ztfy/utils/locales
+
+${BASDIR}/i18nextract.py
+msgmerge ${LOCDIR}/fr/LC_MESSAGES/ztfy.utils.po ${LOCDIR}/ztfy.utils.pot -o ${LOCDIR}/fr/LC_MESSAGES/ztfy.utils.po
--- a/ztfy/utils/configure.zcml	Fri Aug 14 01:02:19 2009 +0200
+++ b/ztfy/utils/configure.zcml	Fri Aug 14 23:50:20 2009 +0200
@@ -1,7 +1,10 @@
 <configure
-	xmlns="http://namespaces.zope.org/zope" 
+	xmlns="http://namespaces.zope.org/zope"
+	xmlns:i18n="http://namespaces.zope.org/i18n"
 	i18n_domain="ztfy.utils">
 
+	<i18n:registerTranslations directory="locales" />
+
 	<adapter
 		factory=".timezone.tzinfo" />
 
Binary file ztfy/utils/locales/fr/LC_MESSAGES/ztfy.utils.mo has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/ztfy/utils/locales/fr/LC_MESSAGES/ztfy.utils.po	Fri Aug 14 23:50:20 2009 +0200
@@ -0,0 +1,29 @@
+# #############################################################################
+#
+# 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: Fri Aug 14 23:45:48 2009\n"
+"PO-Revision-Date: 2009-08-14 18:14+0200\n"
+"Last-Translator: Thierry Florac <tflorac@ulthar.net>\n"
+"Language-Team: French <traduc@traduc.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"
+"Plural-Forms: nplurals=2; plural=(n > 1);\n"
+
+#: s/request.py:39
+msgid "No Request in interaction !"
+msgstr "Pas de requĂȘte en cours !"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/ztfy/utils/locales/ztfy.utils.pot	Fri Aug 14 23:50:20 2009 +0200
@@ -0,0 +1,29 @@
+##############################################################################
+#
+# 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: Fri Aug 14 23:45:48 2009\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: Zope 3 Developers <zope3-dev@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"
+
+#: s/request.py:39
+msgid "No Request in interaction !"
+msgstr ""
+