Code

Opened 6 years ago

Closed 6 years ago

Last modified 3 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: UI/UX:

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 garcia_marc 6 years ago.
Patch setting the dates for chinese

Download all attachments as: .zip

Change History (10)

comment:1 Changed 6 years ago by mtredinnick

  • milestone set to 1.0
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted

#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 6 years ago by mtredinnick

  • Component changed from django-admin.py to Translations

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

Changed 6 years ago by garcia_marc

Patch setting the dates for chinese

comment:3 Changed 6 years ago by garcia_marc

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

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

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

comment:6 Changed 6 years ago by mtredinnick

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

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

(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 6 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.
Gang

comment:9 Changed 3 years ago by jacob

  • milestone 1.0 deleted

Milestone 1.0 deleted

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.