aspotashev added a comment.

  In D22069#485921 <https://phabricator.kde.org/D22069#485921>, @ngraham wrote:
  
  >   Actual   (ki18n("%1").subs(4.2, 5, 'f', 2).toString()): " 4.20"
  >   Expected (QString(" 4,20"))                           : " 4,20"
  >   
  >
  > What am I doing wrong?
  
  
  Oops, I answered without looking at the code.
  
  This subs() call in turn calls QString::arg() overload for double: 
https://doc.qt.io/qt-5/qstring.html#arg-9
  I'm not sure how to interpret this part of Qt documentation, may be the 
authors meant that "%L1 <https://phabricator.kde.org/L1>".subs(4.2, 5, 'f', 2) 
would produce locale-aware " 4.20"/" 4,20" and just "%1".subs(... 'f' ...) 
always uses a decimal **point**.

REPOSITORY
  R249 KI18n

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

To: ngraham, #localization, #frameworks, broulik
Cc: aspotashev, ilic, kde-frameworks-devel, broulik, LeGast00n, michaelh, 
ngraham, bruns

Reply via email to