Re: [Zope] Re: request.locale - do we have this in 2.9.4?

2006-09-07 Thread Maciej Wisniowski
Sure. As I said earlier, we are happy to accept patches :) I've written simple path that, at last, causes DateDisplayWidget doesn't raise exceptions and has minimalistic locale aware date formatting (according to docs about time module and strftime function with %x and %X). I've added

Re: [Zope] Re: request.locale - do we have this in 2.9.4?

2006-09-07 Thread Maciej Wisniowski
msgid = _('-MM-DD') res = translate(msgid, context=self.request, default=msgid) return renderElement(span, contents=escape(res), cssClass=self.cssClass) Eh.. some lines disappeared ;) from the above code. Should be something like: from zope.i18nmessageid

Re: [Zope] Re: request.locale - do we have this in 2.9.4?

2006-09-07 Thread Chris Withers
Philipp von Weitershausen wrote: Funny, I've never used either in 6 years of zoping ;-) Me neither, but are we prepared to break the apps of the people who do? I'd assert that no-one does... (Btw, just thought of another one possible name clash: 'response') no-one uses that is Zope 2

Re: [Zope] Re: request.locale - do we have this in 2.9.4?

2006-09-07 Thread Philipp von Weitershausen
Chris Withers wrote: (Btw, just thought of another one possible name clash: 'response') no-one uses that is Zope 2 land 'cos of RESPONSE... Well. Could be that someone uses 'response' as a form variable, as in the response to a question in a QandA system, perhaps. The sad thing about this

Re: [Zope] Re: request.locale - do we have this in 2.9.4?

2006-09-07 Thread Dieter Maurer
Philipp von Weitershausen wrote at 2006-9-7 15:08 +0200: Chris Withers wrote: (Btw, just thought of another one possible name clash: 'response') no-one uses that is Zope 2 land 'cos of RESPONSE... Well. Could be that someone uses 'response' as a form variable, as in the response to a

Re: [Zope] Re: request.locale - do we have this in 2.9.4?

2006-09-07 Thread Philipp von Weitershausen
Dieter Maurer wrote: Philipp von Weitershausen wrote at 2006-9-7 15:08 +0200: Chris Withers wrote: (Btw, just thought of another one possible name clash: 'response') no-one uses that is Zope 2 land 'cos of RESPONSE... Well. Could be that someone uses 'response' as a form variable, as in the

Re: [Zope] Re: request.locale - do we have this in 2.9.4?

2006-09-06 Thread Chris Withers
Philipp von Weitershausen wrote: Practically, it will very rarely hinder you to add attributes (such as locale) to the request. I think locale and debug are just common enough to be form variables. Funny, I've never used either in 6 years of zoping ;-) You'd be surprised (I was too). Plus,

Re: [Zope] Re: request.locale - do we have this in 2.9.4?

2006-09-06 Thread Philipp von Weitershausen
Chris Withers wrote: Philipp von Weitershausen wrote: Practically, it will very rarely hinder you to add attributes (such as locale) to the request. I think locale and debug are just common enough to be form variables. Funny, I've never used either in 6 years of zoping ;-) Me neither, but

[Zope] Re: request.locale - do we have this in 2.9.4?

2006-09-05 Thread Philipp von Weitershausen
Martijn Pieters wrote: On 9/5/06, Maciej Wisniowski [EMAIL PROTECTED] wrote: I'm using Zope 2.9.4 with Five1.4 (linux box). I'm trying to use DateDisplayWidget (from /zope/app/form/browser/textwidgets.py) [snip] So is this something with my Zope that I don't have request.locale or is that a

Re: [Zope] Re: request.locale - do we have this in 2.9.4?

2006-09-05 Thread Martijn Pieters
On 9/5/06, Philipp von Weitershausen [EMAIL PROTECTED] wrote: Maciej Wisniowski wrote: I consider this a feature request but not as a bug. Ehm... I'm not sure whether we understand each other. I mean the bug There is no bug. Sure there is. The Five integration includes code that expects

Re: [Zope] Re: request.locale - do we have this in 2.9.4?

2006-09-05 Thread Maciej Wisniowski
DateDisplayWidget expects an IBrowserRequest. Zope 2's request only pretends to be an IBrowserRequest. At the current state, it can't implement the whole interface. That's a known issue, but we can't do anything about it, at least not in DateDisplayWidget (and numerous other places where

Re: [Zope] Re: request.locale - do we have this in 2.9.4?

2006-09-05 Thread Philipp von Weitershausen
Maciej Wisniowski wrote: DateDisplayWidget expects an IBrowserRequest. Zope 2's request only pretends to be an IBrowserRequest. At the current state, it can't implement the whole interface. That's a known issue, but we can't do anything about it, at least not in DateDisplayWidget (and

Re: [Zope] Re: request.locale - do we have this in 2.9.4?

2006-09-05 Thread Dieter Maurer
Philipp von Weitershausen wrote at 2006-9-5 16:28 +0200: Maciej Wisniowski wrote: I consider this a feature request but not as a bug. Ehm... I'm not sure whether we understand each other. I mean the bug There is no bug. Seems a funny interpretation of no bug for me... is that

Re: [Zope] Re: request.locale - do we have this in 2.9.4?

2006-09-05 Thread Dieter Maurer
Philipp von Weitershausen wrote at 2006-9-5 16:44 +0200: ... It's an issue, not a bug. According to Wikipedia: A software bug is an error, flaw, mistake, failure, or fault in a computer program that prevents it from working as intended, or produces an incorrect result. A request

Re: [Zope] Re: request.locale - do we have this in 2.9.4?

2006-09-05 Thread Philipp von Weitershausen
Dieter Maurer wrote: Philipp von Weitershausen wrote at 2006-9-5 16:28 +0200: Maciej Wisniowski wrote: I consider this a feature request but not as a bug. Ehm... I'm not sure whether we understand each other. I mean the bug There is no bug. Seems a funny interpretation of no bug for

Re: [Zope] Re: request.locale - do we have this in 2.9.4?

2006-09-05 Thread Philipp von Weitershausen
Dieter Maurer wrote: Philipp von Weitershausen wrote at 2006-9-5 16:44 +0200: ... It's an issue, not a bug. According to Wikipedia: A software bug is an error, flaw, mistake, failure, or fault in a computer program that prevents it from working as intended, or produces an

Re: [Zope] Re: request.locale - do we have this in 2.9.4?

2006-09-05 Thread Maciej Wisniowski
I'll call this an issue for now, but I won't argue semantics here. All I can say is that the Five project's promises were never that everything from Zope 3 works instantly. And it has also been Five's policy to make a quick lie here and there just to get things going. Five usually gives you

Re: [Zope] Re: request.locale - do we have this in 2.9.4?

2006-09-05 Thread Dieter Maurer
Philipp von Weitershausen wrote at 2006-9-5 20:57 +0200: ... Note that I'm well aware of this issue and have thought hard about it. I think the only long term solution out of this mess is to get rid of the __getattr__ spelling once and for all. The __getattr__ may be a stumbling block in

Re: [Zope] Re: request.locale - do we have this in 2.9.4?

2006-09-05 Thread Philipp von Weitershausen
Dieter Maurer wrote: Philipp von Weitershausen wrote at 2006-9-5 20:57 +0200: ... Note that I'm well aware of this issue and have thought hard about it. I think the only long term solution out of this mess is to get rid of the __getattr__ spelling once and for all. The __getattr__ may be a

Re: [Zope] Re: request.locale - do we have this in 2.9.4?

2006-09-05 Thread Philipp von Weitershausen
Maciej Wisniowski wrote: I'll call this an issue for now, but I won't argue semantics here. All I can say is that the Five project's promises were never that everything from Zope 3 works instantly. And it has also been Five's policy to make a quick lie here and there just to get things