Page MenuHomePhabricator

More control over NOSEP parameter of formatnum (treat thousands separators and decimals separately)
Open, Needs TriagePublicFeature

Description

Feature summary (what you would like to be able to do and where):

I want to have formatted decimal separators, but no thousands separators.

Use case(s) (list the steps that you performed to discover that problem, and describe the actual underlying problem which you want to solve. Do not describe only a solution):

formatnum is a great tool for reducing translation work, but it is too opinionated. In TDF wiki, we use it heavily in our LibreOffice Calc function articles. The problem is that Calc formulas containing formatnums can not be pasted as-is into Calc. Due to a strange decision to convert hyphens into Unicode minuses, I have been forced to create a JavaScript widget to convert them back into hyphens.

However, the matter of thousands separators is more serious. It is a bridge too far for me to implement a Calc formula parser in JavaScript in order to undo the thousands separators.

Benefits (why should this be implemented?):

If this is not implemented, our translators will have to manually localise thousands of numbers, which seems like a cruel task to force upon them.