Re: Problems with string representation of thousand and fraction separator
Reply #6 –
Unfortunately I do not think it so easy. The LOCO_INFO string needs to produce a string that will be accepted by sprintf, currently the English translation of this string is:%s\nCost: %d$ (%1.2f$/km)\nPower: %dkW, %dkm/h\nWeight: %dt\n
In order to take advantage of the number_to_string/money_to_string methods, the variables filling the positions in the string need to be converted to strings prior to the sprintf call, and all existing translations need to be updated to use %s instead of the various numeral representations. And when preconverting the numbers to strings, the right number of decimal precision needs to be set, variables need to be cast I think (the two methods need a double while the methods obtaining the values to be output returns int:s of varying types) etc. In short, it is not something that is inherently difficult, it will just require quite a lot of manual (or semi-manual) tweaking to ensure that nothing gets lost; so I think it is post-103 material.
But then, I am not a c++-programmer...