Opened 10 years ago

Closed 10 years ago

Last modified 7 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: master
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


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


#: contrib/admin/templates/admin/object_history.html:26

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

Attachments (1)

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

Download all attachments as: .zip

Change History (10)

comment:1 Changed 10 years ago by Malcolm Tredinnick

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 Changed 10 years ago by Malcolm Tredinnick

Component: django-admin.pyTranslations

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

Changed 10 years ago by Marc Garcia

Attachment: 8541.diff added

Patch setting the dates for chinese

comment:3 Changed 10 years ago by Marc Garcia

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 Changed 10 years ago by Malcolm Tredinnick

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 Changed 10 years ago by Malcolm Tredinnick

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

comment:6 Changed 10 years ago by Malcolm Tredinnick

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 Changed 10 years ago by Malcolm Tredinnick

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 Changed 10 years ago by situ

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.

comment:9 Changed 7 years ago by Jacob

milestone: 1.0

Milestone 1.0 deleted

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