Re: internationalized sizes

thomas desvenain <[email protected]>
Newsgroups gmane.comp.web.zope.plone.devel
Message-ID <CAFn5D-iujR-U718DWWf06MbV-peO+c7Vu2v7r3HzCHYjtN6_gw@mail.gmail.com>
Hi,
i submited a first pull request related to this feature :
it's just about having a method : toLocalizedSize available in @@plone
view, on the model of toLocalizedTime

this uses zope.size helper bytesDisplay

https://github.com/plone/Products.CMFPlone/pull/74

there, in the next future we'll just have to modify step by step the code
and templates so that we

- use toLocalizedSize this each time we display a size
- add get_size metadata in catalog (the size as an integer) and use
plone.toLocalizedSize(brain.get_size) instead of brain.getObjSize

we may keep getObjSize metadata until a next major release

Thomas



On Mon, Jul 1, 2013 at 10:35 AM, thomas desvenain <
[email protected]> wrote:

>
>
>
> On Mon, Jul 1, 2013 at 6:54 AM, ajung <[email protected]> wrote:
>
>> I have never seen rendered values like "XX KB" in the catalog - are you
>> sure
>> about  your assumption?
>
>
>  Yes, getObjSize stores the unit
>



-- 
Thomas Desvenain

Téléphone : 09 51 37 35 18

------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135031&iu=/4140/ostg.clktrk

_______________________________________________
Plone-developers mailing list
Plone-developers-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/plone-developers
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.