Hi Paul,

The filesizeformat filter doesn't implement the formatting that Belen has 
specified in the specs.  It emits "bytes" and not the IEC 80000-13, IEEE 1541 
and the Metric Interchange Format standard "B" (which I had never seen before 
but is noted in a few places in wikipedia).  

As I sent in email to David and toaster@... I have added a filter to 
projecttags that implements the size formatting requested by Belin in the 
specs.   'filtered_filesizeformat' changes the output of filesizeformat,
- replacing "bytes" with "B", and
- trimming off a trailing ".0"

These are the two additional filter requirements not found in filesizeformat 
filter.

The code is being discussed today at 10am central time (4pm london time) if you 
want to sit in and is in the repo 'lerner/package-detail-views'

-Dave

> -----Original Message-----
> From: [email protected] 
> [mailto:[email protected]] On
> Behalf Of Paul Eggleton
> Sent: Tuesday, January 28, 2014 3:05 AM
> To: Reyna, David
> Cc: [email protected]
> Subject: Re: [Toaster] V2: Commit for recipe detail view ready for review
> 
> Hi David,
> 
> On Monday 27 January 2014 18:01:08 Reyna, David wrote:
> > Belen Barros Pena wrote:
> > > ... package size is being displayed in bytes, instead of being converted
> > > to KB or MB as appropriate.
> > > Any chance we could get that changed?
> >
> > Yes, I will write a custom filter that we can all use for the visual
> > translation.
> 
> FYI, you shouldn't need to write a new filter for this - Django has a built-in
> filter "filesizeformat" that does this:
> 
> https://docs.djangoproject.com/en/1.5/ref/templates/builtins/#filesizeformat
> 
> Cheers,
> Paul
> 
> --
> 
> Paul Eggleton
> Intel Open Source Technology Centre
> _______________________________________________
> toaster mailing list
> [email protected]
> https://lists.yoctoproject.org/listinfo/toaster
_______________________________________________
toaster mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/toaster

Reply via email to