Re: [Zope] Products have incorrect "home" attribute

2006-01-18 Thread Martijn Pieters
On 1/18/06, Andreas Jung <[EMAIL PROTECTED]> wrote: > What and where is the 'home' attribute? In lib/python/App/Product.py line 549: product.home=home 'home' is the product path as determined by OFS.Application.install_product; it looks, from a cursory glance, that this should be reset eve

Re: [Zope] Products have incorrect "home" attribute

2006-01-18 Thread Luca Olivetti
En/na Andreas Jung ha escrit: --On 18. Januar 2006 08:19:25 +0100 Martijn Pieters <[EMAIL PROTECTED]> wrote: On 1/18/06, Andreas Jung <[EMAIL PROTECTED]> wrote: What and where is the 'home' attribute? In lib/python/App/Product.py line 549: product.home=home 'home' is the product

Re: [Zope] Products have incorrect "home" attribute

2006-01-18 Thread Martijn Pieters
On 1/18/06, Luca Olivetti <[EMAIL PROTECTED]> wrote: > I asked the same question a couple of days ago (see "wrong directoy in > Control_Panel.Products..home") and no, they aren't reset at zope > restart, and deleting the pyc files doesn't help either. Strange. If you are comfortable with the p

Re: [Zope] five i18n

2006-01-18 Thread Jürgen Herrmann
does the zope/five/i18n machinery tell anything about it's startup phase (finding message catalogs etc.) in the logs or while watching runzope output? i don't see anything here, and still didn't get it to work. - what are the preconditions to get it working? i use plain zope page templates (no cmf

Re: [Zope] five i18n

2006-01-18 Thread Lennart Regebro
On 1/18/06, Jürgen Herrmann <[EMAIL PROTECTED]> wrote: > does the zope/five/i18n machinery tell anything about it's startup > phase (finding message catalogs etc.) in the logs or while watching > runzope output? Nope. It would probably be good if the registerTranslations statement printed logs of

Re: [Zope] five i18n

2006-01-18 Thread Jürgen Herrmann
On Wed, January 18, 2006 14:28, Lennart Regebro wrote: > On 1/18/06, Jürgen Herrmann <[EMAIL PROTECTED]> wrote: >> does the zope/five/i18n machinery tell anything about it's startup >> phase (finding message catalogs etc.) in the logs or while watching >> runzope output? > > Nope. It would probably

Re: [Zope] five i18n

2006-01-18 Thread Jürgen Herrmann
just tried this: hacked in a MyLanguages in five's i18n.py: class MyLanguages(object): """ fake """ implements(IUserPreferredLanguages) def __init__(self, context): self.context = context def getPreferredLanguages(self): return ('DE') and in my overrides.zcml ad

Re: [Zope] five i18n (addendum)

2006-01-18 Thread Jürgen Herrmann
i added a print statement in registerTranslations() and it shows me that it finds my message catalogs. On Wed, January 18, 2006 15:27, Jürgen Herrmann wrote: > just tried this: > > hacked in a MyLanguages in five's i18n.py: > > class MyLanguages(object): > """ fake """ > implements(IUserPr

Re: [Zope] five i18n

2006-01-18 Thread Lennart Regebro
On 1/18/06, Jürgen Herrmann <[EMAIL PROTECTED]> wrote: > 2. does the translation also work with page template files? Yes. The work either when you use i18n.translate() from python, or when you do i18n:something in ZPT. -- Lennart Regebro, Nuxeo http://www.nuxeo.com/ CPS Content Management

Re: [Zope] five i18n

2006-01-18 Thread Martijn Faassen
Lennart Regebro wrote: On 1/18/06, Jürgen Herrmann <[EMAIL PROTECTED]> wrote: - how can i set the target language for the translation in the zpt? That's tricky! :) You need either Localizer or the plone tool for that now, I think. But it's mentioned in the documentation. By default it just

Re: [Zope] five i18n

2006-01-18 Thread Martijn Faassen
Jürgen Herrmann wrote: just tried this: hacked in a MyLanguages in five's i18n.py: class MyLanguages(object): """ fake """ implements(IUserPreferredLanguages) def __init__(self, context): self.context = context def getPreferredLanguages(self): return ('DE') an

[Zope] Newbee interfaces and implementations

2006-01-18 Thread Roman Klesel
Hello, I'm in the process of learning to develop fs-zope-products. The developers guide recommends to write interfaces and implement them in classes. Now my question: When I have an interface: DoThings with several methods: doThis() doThat() doThattoo() ... and I have an implementation: Do

Re: [Zope] Products have incorrect "home" attribute

2006-01-18 Thread Martijn Pieters
On 1/18/06, Andreas Jung <[EMAIL PROTECTED]> wrote: > huuh...never seen that...looks like a culprit...who actually uses that > information? Isn't package_home() doing the same? package_home serves a different use-case, I think; you use it within a Product to determine paths to templates and such.

Re: [Zope] five i18n

2006-01-18 Thread Jürgen Herrmann
me again :) some more things i found out: 1. MyLanguages is instantiated on every http request but regardless of what i return (['DE'] or ['de']) i always get the english translation. weird?! 2. seems that only page templates served through an http request trigger the i18n stuff at all. if so, ho

Re: [Zope] Newbee interfaces and implementations

2006-01-18 Thread bruno desthuilliers
Roman Klesel wrote: > Hello, > > I'm in the process of learning to develop fs-zope-products. > > The developers guide recommends to write interfaces and implement them in > classes. Now my question: > > When I have an interface: > > DoThings > > with several methods: > > doThis() > doThat()

Re: [Zope] Newbee interfaces and implementations

2006-01-18 Thread Roman Klesel
bruno desthuilliers schrieb: > Looks like you're newbie to OO too !-) > > A class defines a type. You then need to have an instance of that type > (like, say, 42 is an instance of type integer and 'foo' is an instance > of type string). > Yes, true! :-) > (Interfaces (I mean, 'explicit' interf

[Zope] Re: Products have incorrect "home" attribute

2006-01-18 Thread George Lee
> I asked the same question a couple of days ago (see "wrong directoy in > Control_Panel.Products..home") and no, they aren't reset at zope > restart, and deleting the pyc files doesn't help either. Thanks, didn't see the previous conversation. =) I'll do the delete the Products objects tri

[Zope] [Fwd: Zope fails on large task?]

2006-01-18 Thread Jim Fulton
-- Jim Fulton mailto:[EMAIL PROTECTED] Python Powered! CTO (540) 361-1714http://www.python.org Zope Corporation http://www.zope.com http://www.zope.org --- Begin Message --- I have a quite complicated data collection and reporting system base

[Zope] Re: Newbee interfaces and implementations

2006-01-18 Thread George Lee
> So you recommend that I should just skip them as long as I'm on Zope2? > > I would be happy with that. I find them confusing when they don't > really interface with but just document my methods. Some of the reasons interfaces can be helpful are (1) for documentation purposes and clarity for cod

Re: [Zope] ANN: ZSyncer 0.7.1-beta1 released

2006-01-18 Thread Dieter Maurer
Paul Winkler wrote at 2006-1-17 15:52 -0500: > ... >> An alternative would be a persistent subobject of the synchronized >> object (such that its modification does not modify the >> "bobobase_modification_time" of the primary object). > >That's not good: unless i find a suitable core zope class to

Re: [Zope] Products have incorrect "home" attribute

2006-01-18 Thread Dieter Maurer
Martijn Pieters wrote at 2006-1-18 08:19 +0100: > ... >It should be perfectly safe to delete the Products from your Control >Panel Products folder and restart Zope to have them recreated though. >If you don't trust this procedure, back up the ZODB, but from my >reading this should happen every time

Re: [Zope] Newbee interfaces and implementations

2006-01-18 Thread bruno modulix
Roman Klesel a écrit : bruno desthuilliers schrieb: Looks like you're newbie to OO too !-) A class defines a type. You then need to have an instance of that type (like, say, 42 is an instance of type integer and 'foo' is an instance of type string). Yes, true! :-) !-) > (Interfaces (I

Re: [Zope] Products have incorrect "home" attribute

2006-01-18 Thread Martijn Pieters
On 1/18/06, Dieter Maurer <[EMAIL PROTECTED]> wrote: > >If you don't trust this procedure, back up the ZODB, but from my > >reading this should happen every time you start Zope anyway. > > Please don't: it would make running from a read only storage > much more difficult Indeed. Had I the time

[Zope] zeopack: No handlers could be found for logger "ZEO.zrpc"

2006-01-18 Thread Cameron Beattie
When I run the following: python /usr/lib/zope/bin/zeopack.py -d 20 -h localhost -p 8100 I get an error: No handlers could be found for logger "ZEO.zrpc" I have searched around and found a similar message at http://mail.zope.org/pipermail/zope-dev/2005-December/026097.html (relating to zeoup.p