Commit 7669068c authored by Hanno Schlichting's avatar Hanno Schlichting

No longer depend on `zope.app.locales`. Zope2 uses almost none of the...

No longer depend on `zope.app.locales`. Zope2 uses almost none of the translations provided in the package and is not required for most projects. The decision to include locales is left to the application developer now.
parent 4d7bd5ab
......@@ -11,6 +11,10 @@ Trunk (unreleased)
Restructuring
+++++++++++++
- No longer depend on `zope.app.locales`. Zope2 uses almost none of the
translations provided in the package and is not required for most projects.
The decision to include locales is left to the application developer now.
- Removed the dependency on `zope.app.testing` in favor of providing a more
minimal placeless setup as part of ZopeTestCase for our own tests.
......
......@@ -147,7 +147,6 @@ params = dict(name='Zope2',
'zope.app.component',
'zope.app.container',
'zope.app.form',
'zope.app.locales',
'zope.app.pagetemplate',
'zope.app.publication',
'zope.app.publisher',
......
......@@ -480,89 +480,6 @@ that the edit form works:
...
i18n:
-----
Let's set up a German testbrowser:
>>> from Products.Five.testbrowser import Browser
>>> browser = Browser()
>>> browser.addHeader('Accept-Language', 'de')
>>> browser.addHeader('Authorization', 'Basic manager:r00t')
And now the add form in German:
>>> browser.open("http://localhost/test_folder_1_/ftf/+/addfieldcontent.html")
>>> print browser.contents
<html>
...Felderinhalt hinzuf...
...Eine kurz...Titel...
...Eine ausf...Beschreibung...
...Irgendeine Zahl...
...Irgendeine Liste...
...hinzuf...
...Auffrischen...
...Hinzuf...
...Objektname...
The same with an input error:
>>> ctl = browser.getControl(name="field.somenumber")
>>> ctl.value = '0'
>>> browser.getControl(name="UPDATE_SUBMIT").click()
>>> print browser.contents
<html>
...Felderinhalt hinzuf...
...Ein Fehler ist aufgetreten...
...Es gab <strong>1</strong> Eingabefehler...
...Eine kurz...Titel...
...Erforderliche Eingabe fehlt...
...Eine ausf...Beschreibung...
...Irgendeine Zahl...
...Irgendeine Liste...
...hinzuf...
...Auffrischen...
...Hinzuf...
...Objektname...
And now the translated edit form:
>>> from Products.Five.form.tests.schemacontent import \
... manage_addFieldContent
>>> dummy = manage_addFieldContent(self.folder.ftf, 'i18ntest', 'titel')
>>> browser.open("http://localhost/test_folder_1_/ftf/i18ntest/edit.html")
>>> print browser.contents
<html>
...Felderinhalt bearbeiten...
...Eine kurz...Titel...
...Eine ausf...Beschreibung...
...Irgendeine Zahl...
...Irgendeine Liste...
...hinzuf...
...Auffrischen...
...Abschicken...
Again with an input error:
>>> ctl = browser.getControl(name="field.title")
>>> ctl.value = ''
>>> browser.getControl(name="UPDATE_SUBMIT").click()
>>> print browser.contents
<html>
...Felderinhalt bearbeiten...
...Ein Fehler ist aufgetreten...
...Es gab <strong>1</strong> Eingabefehler...
...Eine kurz...Titel...
...Erforderliche Eingabe fehlt...
...Eine ausf...Beschreibung...
...Irgendeine Zahl...
...Irgendeine Liste...
...hinzuf...
...Auffrischen...
...Abschicken...
Clean up
--------
......
......@@ -20,8 +20,4 @@
factory="zope.publisher.http.HTTPCharsets"
/>
<configure package="zope.app.locales">
<i18n:registerTranslations directory="."/>
</configure>
</configure>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment