Opened 18 years ago

Closed 16 years ago

#3069 closed defect (fixed)

[patch] fix gettext invocation for invalid dates

Reported by: Bastian Kleineidam <calvin@…> Owned by: nobody
Component: Internationalization Version:
Severity: normal Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: yes
Easy pickings: no UI/UX: no

Description

The string formatting for invalid dates should happen after calling gettext. I also translate the datetime error messages, for which I added a german .po file.

Attachments (3)

django_invalid_date_i18n.diff (542 bytes ) - added by Bastian Kleineidam <calvin@…> 18 years ago.
django.po (5.6 KB ) - added by Bastian Kleineidam <calvin@…> 18 years ago.
translation of datetime error messages (wrt. Python 2.4.4)
datetime_gettext.py (1.8 KB ) - added by Bastian Kleineidam <calvin@…> 18 years ago.
dummy translations for datetime error messages

Download all attachments as: .zip

Change History (6)

by Bastian Kleineidam <calvin@…>, 18 years ago

by Bastian Kleineidam <calvin@…>, 18 years ago

Attachment: django.po added

translation of datetime error messages (wrt. Python 2.4.4)

by Bastian Kleineidam <calvin@…>, 18 years ago

Attachment: datetime_gettext.py added

dummy translations for datetime error messages

comment:1 by Malcolm Tredinnick, 18 years ago

Patch needs improvement: set
Triage Stage: UnreviewedAccepted

I committed the first attachment in [4072]. The second part, the PO file update, should be a separate patch, coordinated with the other German translators.

The third part is something we need to work. We don't want to ask people to have to translate every string from the datetime module, since some of them just will not realistically occur. However, since Python does not come with l10n packages, we do need to translate the likely ones (and find somewhere good to store them). If somebody wants to come up with a slightly reduced, more realistic list of errors to translate, please attach it to this ticket.

comment:2 by Malcolm Tredinnick, 18 years ago

Changeset in the last comment should be [4702].

comment:3 by Malcolm Tredinnick, 16 years ago

Resolution: fixed
Status: newclosed

Closing this off, since we shouldn't be exposing raw Python date errors anywhere. If we are, we should either avoid doing that, or work out the strings that really need translating (I would prefer the former to avoid problems with differing Python versions until Python core sort out their translation issues). In any case, that should be a separate ticket, since the core issues here have been addressed (primarily by the commits above and the removal of django/core/validators.py.

Note: See TracTickets for help on using tickets.
Back to Top