Re: [Zope-dev] Bug day and developer meeting today at 15:00 UTC
Hi, On 10/26/2010 09:14 AM, Christian Theune wrote: > Hi, > > Today is a bug day and the weekly developer meeting. > > I haven't managed to write up the log from last week, but basically Jim, > me, and some others talked about about the need for being able to > communicate/document architecture/design decisions well - we didn't find > the grand solution, though. ;) > > Today, we'll meet, as always, in #z...@freenode at 15:00 UTC. This week my job of summarizing is suprisingly easy: nothing to summarize as I was the only attendee of the meeting. So, just in case: if you're not happy with the topics I propose, please feel free to suggest others or just walk in. I'm happy to provide the regular space (and time) and am open to any issues regarding zope-dev. Christian -- Christian Theune · c...@gocept.com gocept gmbh & co. kg · forsterstraße 29 · 06112 halle (saale) · germany http://gocept.com · tel +49 345 1229889 0 · fax +49 345 1229889 1 Zope and Plone consulting and development ___ Zope-Dev maillist - Zope-Dev@zope.org https://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] zope.18n:translate() keyword arguments versus MessageID attributes
On 10/27/2010 08:44 AM, Michael Howitz wrote: > Am 26.10.2010 um 16:13 schrieb Tres Seaver: >> -BEGIN PGP SIGNED MESSAGE- >> Hash: SHA1 >> >> On 10/26/2010 09:36 AM, Christian Theune wrote: >>> Hi, >>> >>> I've fiddled a bit with >>> https://bugs.edge.launchpad.net/zope.i18n/+bug/592753 and ended up with >>> an unclear situation: >>> >>> The ``translate'' methods of both zope.i18n and ITranslationDomain have >>> optional parameters for the domain/default/mapping attributes of a >>> message ID. >>> >>> The message ID attributes always override the parameters but it is not >>> said why. (I probed the tests and they at least verify that this is the >>> case but don't state motivation.) >>> >>> As I had to chase this down for quite a while when I originally tried to >>> call zope.i18n.translate() directly (for providing translated emails) it >>> took me quite a while to understand what's going on. >>> >>> I see two possibilities for improving the situation: >>> >>> - don't implicitly ignore the parameters, but raise an exception if >>>both a message id and at least one of the parameters (domain/default >>>/mapping) is given and write some documentation that explains the >>>situation (what is happening and why) >>> >>> or >>> >>> - make the parameters take precedence over the message id attributes >>> >>> So - why not do the latter? >> >> I prefer the latter, and don't think we need a deprecation cycle for it: >> if the call site is passing in a mapping, that is presumably more >> specific than anything stored in the catalog. I can't see how we would >> break anything here, as nobody is likely to have actually used the >> feature (since it is effectively a no-op). > > +1 But the `mapping` attribute should update the existing mapping of the > message ID as this would allow to have a partial mapping stored on the > message ID and add the other part when translating. Does this use case really appear that often? I see that there isn't much danger to doing that as the mappings shouldn't be too large anyway and the code that processes them doesn't allow for control structures based on their values so having superfluous values wouldn't hurt and this behaviour would keep old code working. OTOH can you make a feature request for this so I can deal with it separately? Christian -- Christian Theune · c...@gocept.com gocept gmbh & co. kg · forsterstraße 29 · 06112 halle (saale) · germany http://gocept.com · tel +49 345 1229889 0 · fax +49 345 1229889 1 Zope and Plone consulting and development ___ Zope-Dev maillist - Zope-Dev@zope.org https://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] zope.18n:translate() keyword arguments versus MessageID attributes
Am 26.10.2010 um 16:13 schrieb Tres Seaver: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > On 10/26/2010 09:36 AM, Christian Theune wrote: >> Hi, >> >> I've fiddled a bit with >> https://bugs.edge.launchpad.net/zope.i18n/+bug/592753 and ended up with >> an unclear situation: >> >> The ``translate'' methods of both zope.i18n and ITranslationDomain have >> optional parameters for the domain/default/mapping attributes of a >> message ID. >> >> The message ID attributes always override the parameters but it is not >> said why. (I probed the tests and they at least verify that this is the >> case but don't state motivation.) >> >> As I had to chase this down for quite a while when I originally tried to >> call zope.i18n.translate() directly (for providing translated emails) it >> took me quite a while to understand what's going on. >> >> I see two possibilities for improving the situation: >> >> - don't implicitly ignore the parameters, but raise an exception if >> both a message id and at least one of the parameters (domain/default >> /mapping) is given and write some documentation that explains the >> situation (what is happening and why) >> >> or >> >> - make the parameters take precedence over the message id attributes >> >> So - why not do the latter? > > I prefer the latter, and don't think we need a deprecation cycle for it: > if the call site is passing in a mapping, that is presumably more > specific than anything stored in the catalog. I can't see how we would > break anything here, as nobody is likely to have actually used the > feature (since it is effectively a no-op). +1 But the `mapping` attribute should update the existing mapping of the message ID as this would allow to have a partial mapping stored on the message ID and add the other part when translating. Creating new message IDs from existing message IDs should behave the same way: police_and_dog = _('${a} + ${b} = ${c}', mapping=dict(a='police', c='police dog')) police_dog = _(police_and_dog, mapping=dict(b='dog')) Currently the mapping for `police_dog` is ignored but I think it should update the mapping of `police_and_dog` in the new message ID. Currently you have to do the following to achieve the same: mapping = police_and_dog.mapping.copy() mapping.update(dict(b='dog')) police_dog = _(unicode(police_and_dog), mapping=mapping) Yours sincerely, -- Michael Howitz · m...@gocept.com · software developer gocept gmbh & co. kg · forsterstraße 29 · 06112 halle (saale) · germany http://gocept.com · tel +49 345 1229889 8 · fax +49 345 1229889 1 Zope and Plone consulting and development ___ Zope-Dev maillist - Zope-Dev@zope.org https://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] My bug day wrap-up
Am 26.10.2010, 16:20 Uhr, schrieb Christian Theune : > So, what's up for everyone else who joined the bug day? I've just submitted a change to that old chestnut https://bugs.launchpad.net/zope2/+bug/143873 If ACCEPT_CHARSET isn't present or empty we set UTF-8. The W3C spec is the browser is happy to take anything and UTF-8 is the only charset that we can all use. I'm now going to skulk over to the CMF and see if I can fix the breakage introduced by Laurence's recent merge of his branch. Charlie -- Charlie Clark Managing Director Clark Consulting & Research German Office Helmholtzstr. 20 Düsseldorf D- 40215 Tel: +49-211-600-3657 Mobile: +49-178-782-6226 ___ Zope-Dev maillist - Zope-Dev@zope.org https://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope )
[Zope-dev] My bug day wrap-up
Hi, here's a quick wrap-up of what I did to zope.i18n today: - I merged the duplicate bugs asking for ngettext support. - I started working on Sphinx documentation by taking Tres' example from zope.event, playing with it, and start pulling in some API documentation. It's really nowhere useful yet, but hey, it's a start. - I merged a (long missing) NAME_RE change from zope.tal.taldefs to zope.i18n. I'm feeling somewhat uncomfortable with having to just blindly copy it over: neither packages test for the change and I was unable to locate where it came from as it seemed to have happened during the large rename/restructure back in 2003. So, what's up for everyone else who joined the bug day? Christian -- Christian Theune · c...@gocept.com gocept gmbh & co. kg · forsterstraße 29 · 06112 halle (saale) · germany http://gocept.com · tel +49 345 1229889 0 · fax +49 345 1229889 1 Zope and Plone consulting and development ___ Zope-Dev maillist - Zope-Dev@zope.org https://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] zope.18n:translate() keyword arguments versus MessageID attributes
Am 26.10.2010, 16:13 Uhr, schrieb Tres Seaver : > I prefer the latter, and don't think we need a deprecation cycle for it: > if the call site is passing in a mapping, that is presumably more > specific than anything stored in the catalog. I can't see how we would > break anything here, as nobody is likely to have actually used the > feature (since it is effectively a no-op). +1 Some additional justification - it's inconsistent to have different behaviour for message id's and local strings plus it basically defeats the purpose of domains if you can't override the system values in the application. Charlie -- Charlie Clark Managing Director Clark Consulting & Research German Office Helmholtzstr. 20 Düsseldorf D- 40215 Tel: +49-211-600-3657 Mobile: +49-178-782-6226 ___ Zope-Dev maillist - Zope-Dev@zope.org https://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] zope.18n:translate() keyword arguments versus MessageID attributes
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 10/26/2010 09:36 AM, Christian Theune wrote: > Hi, > > I've fiddled a bit with > https://bugs.edge.launchpad.net/zope.i18n/+bug/592753 and ended up with > an unclear situation: > > The ``translate'' methods of both zope.i18n and ITranslationDomain have > optional parameters for the domain/default/mapping attributes of a > message ID. > > The message ID attributes always override the parameters but it is not > said why. (I probed the tests and they at least verify that this is the > case but don't state motivation.) > > As I had to chase this down for quite a while when I originally tried to > call zope.i18n.translate() directly (for providing translated emails) it > took me quite a while to understand what's going on. > > I see two possibilities for improving the situation: > > - don't implicitly ignore the parameters, but raise an exception if >both a message id and at least one of the parameters (domain/default >/mapping) is given and write some documentation that explains the >situation (what is happening and why) > > or > > - make the parameters take precendence over the message id attributes > > So - why not do the latter? I prefer the latter, and don't think we need a deprecation cycle for it: if the call site is passing in a mapping, that is presumably more specific than anything stored in the catalog. I can't see how we would break anything here, as nobody is likely to have actually used the feature (since it is effectively a no-op). Tres. - -- === Tres Seaver +1 540-429-0999 tsea...@palladion.com Palladion Software "Excellence by Design"http://palladion.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkzG4hgACgkQ+gerLs4ltQ5d0wCgmalGkBVV+TJmXCk4KqiXlM7c 2LQAoNn6oKRQnCACRxzqitdAYnEoUro9 =Kn2D -END PGP SIGNATURE- ___ Zope-Dev maillist - Zope-Dev@zope.org https://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope )
[Zope-dev] zope.18n:translate() keyword arguments versus MessageID attributes
Hi, I've fiddled a bit with https://bugs.edge.launchpad.net/zope.i18n/+bug/592753 and ended up with an unclear situation: The ``translate'' methods of both zope.i18n and ITranslationDomain have optional parameters for the domain/default/mapping attributes of a message ID. The message ID attributes always override the parameters but it is not said why. (I probed the tests and they at least verify that this is the case but don't state motivation.) As I had to chase this down for quite a while when I originally tried to call zope.i18n.translate() directly (for providing translated emails) it took me quite a while to understand what's going on. I see two possibilities for improving the situation: - don't implicitly ignore the parameters, but raise an exception if both a message id and at least one of the parameters (domain/default /mapping) is given and write some documentation that explains the situation (what is happening and why) or - make the parameters take precendence over the message id attributes So - why not do the latter? Christian -- Christian Theune · c...@gocept.com gocept gmbh & co. kg · forsterstraße 29 · 06112 halle (saale) · germany http://gocept.com · tel +49 345 1229889 0 · fax +49 345 1229889 1 Zope and Plone consulting and development ___ Zope-Dev maillist - Zope-Dev@zope.org https://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope )
[Zope-dev] Zope Tests: 67 OK, 14 Failed, 1 Unknown
Summary of messages to the zope-tests list. Period Mon Oct 25 12:00:00 2010 UTC to Tue Oct 26 12:00:00 2010 UTC. There were 82 messages: 6 from Zope Tests, 4 from buildbot at pov.lt, 19 from buildbot at winbot.zope.org, 11 from ccomb at free.fr, 42 from jdriessen at thehealthagency.com. Test failures - Subject: FAILED : Zope Buildbot / zope2.13-py2.7 slave-ubuntu32 From: jdriessen at thehealthagency.com Date: Mon Oct 25 09:16:35 EDT 2010 URL: http://mail.zope.org/pipermail/zope-tests/2010-October/022259.html Subject: FAILED : Zope Buildbot / zope2.14-py2.7 slave-ubuntu32 From: jdriessen at thehealthagency.com Date: Mon Oct 25 09:20:03 EDT 2010 URL: http://mail.zope.org/pipermail/zope-tests/2010-October/022261.html Subject: FAILED : Zope Buildbot / zopetoolkit-py2.7 slave-ubuntu32 From: jdriessen at thehealthagency.com Date: Mon Oct 25 09:51:51 EDT 2010 URL: http://mail.zope.org/pipermail/zope-tests/2010-October/022267.html Subject: FAILED : Zope Buildbot / zope2.13-py2.7 slave-ubuntu64 From: jdriessen at thehealthagency.com Date: Mon Oct 25 10:13:11 EDT 2010 URL: http://mail.zope.org/pipermail/zope-tests/2010-October/022273.html Subject: FAILED : Zope Buildbot / zope2.14-py2.7 slave-ubuntu64 From: jdriessen at thehealthagency.com Date: Mon Oct 25 10:16:35 EDT 2010 URL: http://mail.zope.org/pipermail/zope-tests/2010-October/022276.html Subject: FAILED : Zope Buildbot / zope2.13_win-py2.6 slave-win From: jdriessen at thehealthagency.com Date: Mon Oct 25 10:32:31 EDT 2010 URL: http://mail.zope.org/pipermail/zope-tests/2010-October/022281.html Subject: FAILED : Zope Buildbot / zopetoolkit-py2.6 slave-ubuntu64 From: jdriessen at thehealthagency.com Date: Mon Oct 25 11:01:43 EDT 2010 URL: http://mail.zope.org/pipermail/zope-tests/2010-October/022287.html Subject: FAILED : Zope Buildbot / zopetoolkit-py2.7 slave-ubuntu64 From: jdriessen at thehealthagency.com Date: Mon Oct 25 11:05:26 EDT 2010 URL: http://mail.zope.org/pipermail/zope-tests/2010-October/022289.html Subject: FAILED : Zope Buildbot / zopetoolkit-1.0_win-py2.6 slave-win From: jdriessen at thehealthagency.com Date: Mon Oct 25 11:38:27 EDT 2010 URL: http://mail.zope.org/pipermail/zope-tests/2010-October/022294.html Subject: FAILED : Zope Buildbot / zopetoolkit_win-py2.6 slave-win From: jdriessen at thehealthagency.com Date: Mon Oct 25 11:49:48 EDT 2010 URL: http://mail.zope.org/pipermail/zope-tests/2010-October/022295.html Subject: FAILED : winbot / ztk_10 py_244_win32 From: buildbot at winbot.zope.org Date: Mon Oct 25 17:05:44 EDT 2010 URL: http://mail.zope.org/pipermail/zope-tests/2010-October/022304.html Subject: FAILED : winbot / zc_buildout_dev py_254_win32 From: buildbot at winbot.zope.org Date: Mon Oct 25 17:42:01 EDT 2010 URL: http://mail.zope.org/pipermail/zope-tests/2010-October/022308.html Subject: FAILED : winbot / zc_buildout_dev py_270_win32 From: buildbot at winbot.zope.org Date: Mon Oct 25 18:15:24 EDT 2010 URL: http://mail.zope.org/pipermail/zope-tests/2010-October/022311.html Subject: FAILED : winbot / ZODB_dev py_270_win32 From: buildbot at winbot.zope.org Date: Mon Oct 25 22:14:17 EDT 2010 URL: http://mail.zope.org/pipermail/zope-tests/2010-October/022334.html Unknown --- Subject: UNKNOWN : Zope Buildbot / zopetoolkit-1.0_win-py2.5 slave-win From: jdriessen at thehealthagency.com Date: Mon Oct 25 11:36:01 EDT 2010 URL: http://mail.zope.org/pipermail/zope-tests/2010-October/022293.html Tests passed OK --- Subject: OK : Zope Buildbot / zope2.12-py2.6 slave-ubuntu32 From: jdriessen at thehealthagency.com Date: Mon Oct 25 09:12:48 EDT 2010 URL: http://mail.zope.org/pipermail/zope-tests/2010-October/022257.html Subject: OK : Zope Buildbot / zope2.13-py2.6 slave-ubuntu32 From: jdriessen at thehealthagency.com Date: Mon Oct 25 09:14:39 EDT 2010 URL: http://mail.zope.org/pipermail/zope-tests/2010-October/022258.html Subject: OK : Zope Buildbot / zope2.14-py2.6 slave-ubuntu32 From: jdriessen at thehealthagency.com Date: Mon Oct 25 09:18:19 EDT 2010 URL: http://mail.zope.org/pipermail/zope-tests/2010-October/022260.html Subject: OK : Zope Buildbot / zopetoolkit-1.0-py2.4 slave-ubuntu32 From: jdriessen at thehealthagency.com Date: Mon Oct 25 09:26:18 EDT 2010 URL: http://mail.zope.org/pipermail/zope-tests/2010-October/022262.html Subject: OK : Zope Buildbot / zopetoolkit-1.0-py2.5 slave-ubuntu32 From: jdriessen at thehealthagency.com Date: Mon Oct 25 09:32:53 EDT 2010 URL: http://mail.zope.org/pipermail/zope-tests/2010-October/022263.html Subject: OK : Zope Buildbot / zopetoolkit-1.0-py2.6 slave-ubuntu32 From: jdriessen at thehealthagency.com Date: Mon Oct 25 09:39:05 EDT 2010 URL: http://mail.zope.org/pipermail/zope-tests/2010-October/022264.html Subject: OK : Zope Buildbot / zopetoolkit-py2.5 slave-ubuntu32 From: jdriessen at thehealthagency.com Date: Mon Oct 25 09:43:21 EDT 2010 URL: http://mail.zope.org/pipermail/zope-tests/2010-October/022265.html Subject: OK : Zope Buildbot / zop
Re: [Zope-dev] Zope2 and devmode ZCML feature
Am 26.10.2010, 12:12 Uhr, schrieb Sylvain Viollon : > As far as I know it is not available in Zope 2 (where only > Globals.DevelopmentMode, or App.config.getConfiguration()... is > available). > I don't think it is very difficult to add and I know that would make > my code much more readable. As we are supposed to be able to use development mode anyway this makes sense so +1 from me. Charlie -- Charlie Clark Managing Director Clark Consulting & Research German Office Helmholtzstr. 20 Düsseldorf D- 40215 Tel: +49-211-600-3657 Mobile: +49-178-782-6226 ___ Zope-Dev maillist - Zope-Dev@zope.org https://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope )
[Zope-dev] Zope2 and devmode ZCML feature
Hello, In Zope 3 / BlueBream / Grok there is a ZCML feature devmode, that can let your register things only for development or production. As far as I know it is not available in Zope 2 (where only Globals.DevelopmentMode, or App.config.getConfiguration()... is available). I don't think it is very difficult to add and I know that would make my code much more readable. Regards, Sylvain, -- Sylvain Viollon -- Infrae t +31 10 243 7051 -- http://infrae.com Hoevestraat 10 3033GC Rotterdam -- The Netherlands ___ Zope-Dev maillist - Zope-Dev@zope.org https://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope )
[Zope-dev] Bug day and developer meeting today at 15:00 UTC
Hi, Today is a bug day and the weekly developer meeting. I haven't managed to write up the log from last week, but basically Jim, me, and some others talked about about the need for being able to communicate/document architecture/design decisions well - we didn't find the grand solution, though. ;) Today, we'll meet, as always, in #z...@freenode at 15:00 UTC. Topics will be: - Follow-up on summit goals - The bicycle toolkit Christian ___ Zope-Dev maillist - Zope-Dev@zope.org https://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope )