[Stoq-devel] Re: [POS-commit] r1122 - stoq/trunk/stoq/domain

Henrique Romano henrique at async.com.br
Fri Sep 2 18:38:33 BRT 2005


Johan Dahlin wrote:

>> Modified: stoq/trunk/stoq/domain/sellable.py
>
>
>>  def get_formated_price(float_value):
>>      conn = get_connection()
>>      precision = sysparam(conn).SELLABLE_PRICE_PRECISION
>> -    money = _('$')
>> -    return '%s %.*f' % (money, int(precision), float_value)
>> +    value = locale.format('%.*f', (int(precision), float_value), 1)
>> +    return '%s %s' % (_('$'), value)
>
>
> Em algums locales (sueco por example) tem o valor antes de simbol de 
> cotação:
>
> 123.23 kr
>
A solução então seria internacionalizar a string para
formatação de valores? Algo como: _("$ %.*f");


--
Henrique



More information about the POS-commit mailing list