[wp-polyglots] number_format_i18n and floating point numbers

Jovan Kostovski chombium at gmail.com
Mon Dec 21 11:07:56 UTC 2009


Hi,

I opened this ticket after consulting the list about this function
http://lists.automattic.com/pipermail/wp-polyglots/2009-August/003578.html

Before sending that message to the list couldn't find any explanation
why the value
should be always set to zero, except that there was a "default value = 0" in the
translation file.

On Mon, Dec 21, 2009 at 10:09 AM, Nikolay Bachiyski <nb at nikolay.bg> wrote:
> On Mon, Dec 21, 2009 at 10:42, Peter Westwood <peter.westwood at ftwr.co.uk> wrote:
>> ...
>> Looking at these three things I am unsure as to why the first one needs to
>> be translatable - looking through the repo I think everyone has it currently
>> set to 0 because otherwise all the numbers will display as floats not
>> integers.
>>
>> In there a reason why this needs to be translated?
>>
>
> I haven't seen a place, where it's used.
>
>> I would have thought that just having a default behaviour for floats or even
>> relying on the value the caller provides to the function (which also
>> effectively defaults to 0) to be specified when they want to show a float
>> would be good enough.
>>
>> What are your thoughts?
>
> We should remove the translation and set it ti 0. If, at some point,
> we need to format floats, we will make a new function just for floats
> and it may use a specific locale setting.

Removing this three variables would be good thing to do, because they
are not used.

I think you can close this ticket.

BR Jovan


More information about the wp-polyglots mailing list