Closed
Bug 598029
Opened 14 years ago
Closed 14 years ago
Fix "timesince" filter for locales unknown to Django
Categories
(Input :: General, defect, P3)
Input
General
Tracking
(Not tracked)
RESOLVED
FIXED
2.0
People
(Reporter: wenzel, Assigned: wenzel)
References
Details
(Whiteboard: [qa-])
If Django does not know a locale (like fy-NL), the "timesince" filter just shows English on our otherwise localized site. Need to figure out a way to fix this. Either by avoiding the timesince filter altogether and running something of our own (thus making it localizable) or some other method I haven't thought about yet.
Updated•14 years ago
|
Target Milestone: --- → 2.0
Comment 1•14 years ago
|
||
When you import the timesince filter as a helper, can't you monkeypatch something like: defaultfilters._ = uggetext that should force it to use our uggettext from tower, rather than django...
Assignee | ||
Comment 2•14 years ago
|
||
Hm, but that still wouldn't make the strings in "1 week, 4 days ago" show up in our translation file...?
Comment 3•14 years ago
|
||
Hrm, I suppose we can't just add them in somehow?
Updated•14 years ago
|
Priority: -- → P3
Assignee | ||
Updated•14 years ago
|
Assignee: nobody → fwenzel
Assignee | ||
Comment 4•14 years ago
|
||
Chowse also suggested to reduce the complexity of the timesince display to just the largest number ("1 week" as opposed to "1 week, 3 days", and "3 hours" as opposed to "3 hours 12 minutes"). That should greatly reduce the complexity here and make it easily localizable. Chris: Should we go as high as months for the biggest possible interval, or do you want to keep weeks, which would result in displays like "73 weeks ago" when digging back in time?
Comment 5•14 years ago
|
||
(In reply to comment #4) > Chris: Should we go as high as months for the biggest possible interval, or do > you want to keep weeks, which would result in displays like "73 weeks ago" when > digging back in time? Given that feedback seems to have a shelf life of one beta cycle (~30 days), I don't think there's much need to provide more than one-day intervals. I'm also partial to Twitter's approach: after a few days, give an absolute date instead of a relative timestamp. For example, if a comment is more than a week old, just use something like "01 Nov".
Assignee | ||
Comment 6•14 years ago
|
||
Code and test: http://github.com/fwenzel/reporter/commit/0aa0181 The limits are now: < 1 minute: "just now" minutes, hours, and days as expected > 7 days: full localized date, as in: "Aug 28, 2010".
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Assignee | ||
Updated•14 years ago
|
Whiteboard: [qa-]
Updated•13 years ago
|
Component: Input → General
Product: Webtools → Input
You need to log in
before you can comment on or make changes to this bug.
Description
•