Code

Opened 9 years ago

Closed 8 years ago

Last modified 7 years ago

#109 closed defect (fixed)

Patch: Customizing Date(Time)Field displays

Reported by: Manuzhai Owned by: anonymous
Component: contrib.admin Version:
Severity: blocker Keywords:
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

In the admin interface, dates are displayed as July 11, 2005, 8:39 p.m., while I'd at the least prefer to have a 24-hour format for the time. I think there should be options DATE_FORMAT, TIME_FORMAT and DATETIME_FORMAT which take care of the default formatting for these fields.

Attachments (2)

custom-datetime-1.diff (1.1 KB) - added by Manuzhai 9 years ago.
Handling a customizable datetime-formatting.
custom-datetime-2.diff (1.2 KB) - added by Manuzhai 9 years ago.
Setting the default datetime-formatting

Download all attachments as: .zip

Change History (33)

Changed 9 years ago by Manuzhai

Handling a customizable datetime-formatting.

Changed 9 years ago by Manuzhai

Setting the default datetime-formatting

comment:1 Changed 9 years ago by Manuzhai

Ahh, sorry, that second patch also contains my other changes to the global_settings. Oh well, you get my drift, it's quite a trivial patch anyway.

comment:2 Changed 9 years ago by Manuzhai

  • Summary changed from Customizing Date(Time)Field displays to Patch: Customizing Date(Time)Field displays

Please comment on this?

comment:3 Changed 9 years ago by adrian

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

(In [1115]) Fixed #109 -- Created DATE_FORMAT, DATETIME_FORMAT and TIME_FORMAT settings.

comment:4 Changed 9 years ago by anonymous

  • Resolution fixed deleted
  • Status changed from closed to reopened

Please keep in mind that these need to be translateable - the problem is, they depend on the language the user chooses, not on some base setting. That's why I changed the code in i18n to have date:_("DATE_WITH_TIME_FULL") in there, so that the actual date format was pulled from the .po (and I added the english default format to the en-.po and the d.m.y format to all other languages).

comment:5 Changed 9 years ago by Nebojša Đorđević - nesh <nesh@…>

Any progress with this? When DATE_FORMAT, DATETIME_FORMAT and TIME_FORMAT will be translatable?

comment:6 Changed 9 years ago by hugo

  • Owner changed from adrian to hugo
  • Status changed from reopened to new

You could try to use gettext_lazy('DATE_TIME_FULL') (or any other technical message IDs for which you need to put in translations into the translation file) on them. gettext_lazy constructs a translation promise that is realized (= translated) when the value is used as a string. This works quite often automatically.

I use the same technology for translating model names and field names. If that works, please update the ticket so I know that I can do the needed work. I am a bit out-of-the-loop due to my hotel not having net access, but will be able to check into this after the weekend.

comment:7 Changed 9 years ago by hugo

  • Status changed from new to assigned

comment:8 Changed 9 years ago by hugo

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

(In [1208]) fixes #109 - added translation possibilities for date and time formats (and updated translation files for the new message IDs)

comment:9 Changed 8 years ago by Kaka17169

  • Component Admin interface deleted
  • priority normal deleted
  • Resolution fixed deleted
  • Severity normal deleted
  • Status changed from closed to reopened
  • Type defect deleted

comment:10 Changed 8 years ago by Kaka99803

  • Owner changed from hugo to anonymous
  • Status changed from reopened to new

comment:11 Changed 8 years ago by anonymous

  • Component set to Admin interface
  • priority set to highest
  • Resolution set to fixed
  • Severity set to blocker
  • Status changed from new to closed
  • Type set to defect

Trac spam

comment:12 Changed 8 years ago by Kaka11861

  • Component Admin interface deleted
  • priority highest deleted
  • Resolution fixed deleted
  • Severity blocker deleted
  • Status changed from closed to reopened
  • Type defect deleted

comment:13 Changed 8 years ago by mtredinnick

  • Component set to Admin interface
  • priority set to highest
  • Resolution set to fixed
  • Severity set to blocker
  • Status changed from reopened to closed
  • Type set to defect

spam.

comment:14 Changed 8 years ago by Kaka81238

  • Component Admin interface deleted
  • priority highest deleted
  • Resolution fixed deleted
  • Severity blocker deleted
  • Status changed from closed to reopened
  • Type defect deleted

comment:15 Changed 8 years ago by Kaka84298

  • Status changed from reopened to new

comment:16 Changed 8 years ago by SmileyChris

  • Component set to Admin interface
  • priority set to highest
  • Resolution set to fixed
  • Severity set to blocker
  • Status changed from new to closed
  • Type set to defect

spam

comment:17 Changed 8 years ago by anonymous

  • Component changed from Admin interface to Contrib apps
  • milestone set to Version 1.0
  • priority changed from highest to normal
  • Severity changed from blocker to minor
  • Type changed from defect to task
  • Version set to 0.9

comment:18 Changed 8 years ago by Kaka73660

  • Component Contrib apps deleted
  • milestone Version 1.0 deleted
  • priority normal deleted
  • Resolution fixed deleted
  • Severity minor deleted
  • Status changed from closed to reopened
  • Type task deleted
  • Version 0.9 deleted

comment:19 Changed 8 years ago by anonymous

  • Component set to Admin interface
  • priority set to highest
  • Resolution set to fixed
  • Severity set to blocker
  • Status changed from reopened to closed
  • Type set to defect

comment:20 Changed 8 years ago by anonymous

  • priority changed from highest to normal
  • Severity changed from blocker to normal

comment:21 Changed 8 years ago by Kaka23606

  • Component Admin interface deleted
  • priority normal deleted
  • Resolution fixed deleted
  • Severity normal deleted
  • Status changed from closed to reopened
  • Type defect deleted

comment:22 Changed 8 years ago by adrian

  • Component set to Admin interface
  • priority set to highest
  • Resolution set to fixed
  • Severity set to blocker
  • Status changed from reopened to closed
  • Type set to defect

comment:23 Changed 8 years ago by Kaka47380

  • Component Admin interface deleted
  • priority highest deleted
  • Resolution fixed deleted
  • Severity blocker deleted
  • Status changed from closed to reopened
  • Type defect deleted

comment:24 Changed 8 years ago by Kaka38874

  • Status changed from reopened to new

comment:25 Changed 8 years ago by adrian

  • Component set to Admin interface
  • priority set to highest
  • Resolution set to fixed
  • Severity set to blocker
  • Status changed from new to closed
  • Type set to defect

comment:26 Changed 8 years ago by Kaka86958

  • Component Admin interface deleted
  • priority highest deleted
  • Resolution fixed deleted
  • Severity blocker deleted
  • Status changed from closed to reopened
  • Type defect deleted

comment:27 Changed 8 years ago by Kaka59626

  • Status changed from reopened to new

comment:28 Changed 8 years ago by anonymous

  • Component set to Admin interface
  • priority set to highest
  • Severity set to blocker
  • Type set to defect

comment:29 Changed 8 years ago by Tom Tobin <korpios@…>

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

Revert spam.

comment:30 Changed 8 years ago by Kaka24474

  • Cc boss added
  • Component changed from Admin interface to boss
  • Keywords boss added
  • milestone set to boss
  • priority changed from highest to boss
  • Resolution fixed deleted
  • Severity changed from blocker to boss
  • Status changed from closed to reopened
  • Type changed from defect to boss
  • Version set to boss

comment:31 Changed 8 years ago by anonymous

  • Cc boss removed
  • Component changed from boss to Admin interface
  • Keywords boss removed
  • milestone boss deleted
  • priority changed from boss to highest
  • Resolution set to fixed
  • Severity changed from boss to blocker
  • Status changed from reopened to closed
  • Type changed from boss to defect
  • Version boss deleted

persistant spam

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.