D13172: Add AFNumber_Format and l10n AFSimple_Calculate

Andre Heinecke noreply at phabricator.kde.org
Mon May 28 15:10:03 UTC 2018


aheinecke added inline comments.

INLINE COMMENTS

> aacid wrote in builtin.js:91
> Is AFNumber_Format always for currencies? The name seems to make it more about numbers but then the parameters confuse me a little 😆
> 
> So i am wondering if we should be always calling toCurrency() or maybe only when strCurrency is passed? and if not using a different formatting function that is not for currency?

No, using to currency is just a trick! :-) The aim is to use a nice function that offers a number format with separators, and decimal handling with rounding and precision.

If sepStyle is 0 then we just remove the currency seperators.

If you have a suggestion for a Qt function that better matches the behavior I'm all for it. But from reading the AF_NumberFormat docs I thought" ok QLocale::toCurrency is the best match" and we can just remove the seperators if sepstyle is zero.

REPOSITORY
  R223 Okular

REVISION DETAIL
  https://phabricator.kde.org/D13172

To: aheinecke, aacid
Cc: okular-devel, ngraham, aacid
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/okular-devel/attachments/20180528/13622152/attachment.html>


More information about the Okular-devel mailing list