Opened 8 years ago

Closed 7 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: UI/UX:

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@…> 8 years ago.
django.po (5.6 KB) - added by Bastian Kleineidam <calvin@…> 8 years ago.
translation of datetime error messages (wrt. Python 2.4.4)
datetime_gettext.py (1.8 KB) - added by Bastian Kleineidam <calvin@…> 8 years ago.
dummy translations for datetime error messages

Download all attachments as: .zip

Change History (6)

Changed 8 years ago by Bastian Kleineidam <calvin@…>

Changed 8 years ago by Bastian Kleineidam <calvin@…>

translation of datetime error messages (wrt. Python 2.4.4)

Changed 8 years ago by Bastian Kleineidam <calvin@…>

dummy translations for datetime error messages

comment:1 Changed 8 years ago by mtredinnick

  • Patch needs improvement set
  • Triage Stage changed from Unreviewed to Accepted

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 Changed 8 years ago by mtredinnick

Changeset in the last comment should be [4702].

comment:3 Changed 7 years ago by mtredinnick

  • Resolution set to fixed
  • Status changed from new to closed

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