On Fri, Mar 17, 2006 at 08:35:36AM -0500, Stephan Richter wrote:
> On Friday 17 March 2006 07:35, Albertas Agejevas wrote:
> > dateformat = zope.schema.Choice(
> > title=_("Date Format"),
> > description=_("Date Format"),
> > vocabulary=vocabulary([("%m/%d/%y", _("MM/DD/YY")),
> > ("%Y-%m-%d", _("YYYY-MM-DD")),
> > ("%d %B, %Y", _("Day Month, Year"))]))
>
> Shrug, why don't we use Zope 3's locale support here? In the form above, the
> month names will not be localized. This is clearly a localization bug.
I guess the people that wrote this didn't know about Zope 3 locale
support. Perhaps I didn't either at the time, as I see I replied to the
rev 3033 checkin, but didn't point towards zope.i18n.
There also was a time when it was OK to use %B, because the language and
the locale was set in schooltool.conf. Now we support automatic
browser language negotiation (we do, don't we?), and you are right --
in that case month names will be localized incorrectly.
Actually, now we never call locale.setlocale, so strftime('%B') will
never work right!
OTOH if we always use zope's locale time formatters, then the users will
not be able to pick a preferred date format when it differs from the
one negotiated by the browser. Hm..
Filed as http://issues.schooltool.org/issue478
Marius Gedminas
--
Hanlon's Razor:
Never attribute to malice that which is adequately explained
by stupidity.
signature.asc
Description: Digital signature
_______________________________________________ Schooltool mailing list [email protected] http://lists.schooltool.org/mailman/listinfo/schooltool
