Opened 16 years ago

Closed 16 years ago

Last modified 13 years ago

#8541 closed (fixed)

DATE_WITH_TIME_FULL in django 1.0 beta zh_CN

Reported by: est Owned by: nobody
Component: Translations Version: dev
Severity: Keywords: admin, i18n, zh-CN
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

settings.LANGUAGE_CODE = 'zh-cn'

When viewing some model's history in auto-Admin interface, the date time display is

SunPMChina Standard TimeE_340China Standard Time19_China Standard Time0八月E_八月1221304880TrueTrue

django/conf/locale/zh_CN/LC_MESSAGES/django.po

#: contrib/admin/templates/admin/object_history.html:26
msgid "DATE_WITH_TIME_FULL"
msgstr "DATE_WITH_TIME_FULL"

This is obviously wrong

When I changed it to Y-m-d H:M:S

it displays

2008-08-24 19:八月:th

Which is also wrong.

Is there a way to change it to: "2008-08-25 23:49:21"? Which is the most common way ppl see datetime here in China. I do not know how to write date/time strings corretly sorry :-(

I see there's a similar ticket here http://code.djangoproject.com/ticket/880

Attachments (1)

8541.diff (1.2 KB ) - added by Marc Garcia 16 years ago.
Patch setting the dates for chinese

Download all attachments as: .zip

Change History (10)

comment:1 by Malcolm Tredinnick, 16 years ago

milestone: 1.0
Triage Stage: UnreviewedAccepted

#8550 mentioned the same problem for DATETIME_FORMAT. Looks like a number of the technical messages ids are translated incorrectly for Chinese. The way to fix this is for somebody to fix the PO file. First, they should read the discussion of technical message ids in the internationalisation documentation (search for "DATETIME_FORMAT" to find the right place) and then translate appropriately.

comment:2 by Malcolm Tredinnick, 16 years ago

Component: django-admin.pyTranslations

Moving to translation component, since it's a localisation issue, not a bug in the code.

by Marc Garcia, 16 years ago

Attachment: 8541.diff added

Patch setting the dates for chinese

comment:3 by Marc Garcia, 16 years ago

I attached a patch with the formats for dates/times in Chinese. Could anybody (fluent in Chinese) check it? I don't know if used formats are the best ones to use.

Anyway, I think that there is a bug in the code. Dates should be displayed in English locale unless the current locale has one, so those strange string are a buggy behavior.

comment:4 by Malcolm Tredinnick, 16 years ago

Looking a bit more closely, this might be a bit of a non-issue. DATE_WITH_TIME_FULL is no longer used anywhere in Django (after [8485] -- see ticket #7946 that Marc opened).

comment:5 by Malcolm Tredinnick, 16 years ago

(hit <enter> too quickly) The idea is to close this ticket once we commit the translation update.

comment:6 by Malcolm Tredinnick, 16 years ago

I'm going to commit this, since it shouldn't make things any worse than they are now and will help a little bit. Hopefully a Chinese speaker can do a full translation update before 1.0.

comment:7 by Malcolm Tredinnick, 16 years ago

Resolution: fixed
Status: newclosed

(In [8713]) Fixed #8541 -- An attempt at translating the technical messages IDs for zh_CN from garcia_marc.
This fixes the obvious problem, but a full translation update is needed from a
Chinese speaker here.

comment:8 by situ, 16 years ago

I found this ticket when searching a solution to my zh_CN problem. I can help to translate messages in django/conf/locale/zh_CN/LC_MESSAGES/django.po. Could you show me the proper way to do the job? I am not familiar with patch/diff tools. Can I just attach a 'django.po' as an attachment? Thanks.
Gang

comment:9 by Jacob, 13 years ago

milestone: 1.0

Milestone 1.0 deleted

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