Opened 14 years ago

Closed 14 years ago

Last modified 12 years ago

#14002 closed (fixed)

filesizeformat filter only supports up to GB

Reported by: Aaron T. Myers Owned by: Aaron T. Myers
Component: Template system Version:
Severity: Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: yes Patch needs improvement: yes
Easy pickings: no UI/UX: no

Description

The product that I work on routinely displays file sizes which are larger than 1 TB, some times larger than 1 PB. The filesizeformat template filter defaults to GB for anything larger than MB. I'd like filesizeformat to support larger sizes.

Attachments (2)

bigger-filesizeformat.diff (1.2 KB ) - added by Aaron T. Myers 14 years ago.
bigger-filesizeformat.2.diff (1.7 KB ) - added by Aaron T. Myers 14 years ago.
New version with tests and addressing review comment.

Download all attachments as: .zip

Change History (12)

by Aaron T. Myers, 14 years ago

Attachment: bigger-filesizeformat.diff added

comment:1 by Alex Gaynor, 14 years ago

2 issues. a) Needs tests, b) for the ugettext call the % operator should be *outside* the call to ugettext, not inside.

comment:2 by Alex Gaynor, 14 years ago

Needs tests: set
Patch needs improvement: set
Triage Stage: UnreviewedAccepted

comment:3 by Aaron T. Myers, 14 years ago

Thanks for the review. New patch forthcoming.

by Aaron T. Myers, 14 years ago

New version with tests and addressing review comment.

comment:4 by Russell Keith-Magee, 14 years ago

milestone: 1.3
Patch needs improvement: unset
Triage Stage: AcceptedReady for checkin

comment:5 by Russell Keith-Magee, 14 years ago

Resolution: fixed
Status: newclosed

(In [13585]) Fixed #14002 -- Updated filesize filter to support terabyte and petabyte file sizes. Thanks to Aaron T. Myers for the patch.

comment:6 by Russell Keith-Magee, 14 years ago

Strictly, the fix is actually in [13584]... but trac seems to be having some trouble with that revision.

comment:7 by Claude Paroz, 14 years ago

There is a problem with the fix, in that units are no more translated. There are missing ugettext calls in BYTE_UNITS tuple. Reopen or open new report?

comment:8 by Russell Keith-Magee, 14 years ago

Patch needs improvement: set
Resolution: fixed
Status: closedreopened

No need for a new ticket; I'll update the code.

comment:9 by Russell Keith-Magee, 14 years ago

Resolution: fixed
Status: reopenedclosed

(In [13594]) Fixed #14002 -- Modified filesize filter to ensure strings are translatable. Thanks to claudep for the report.

comment:10 by Jacob, 12 years ago

milestone: 1.3

Milestone 1.3 deleted

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