Explain difference between js.number.format.separator and js.number.format.delimiter


(Anton) #1

There are currently two translation keys, but it is not clear what is what:

  1. js.number.format.separator
  2. js.number.format.delimiter

Please could you explain clearly how these two are used.


(Rafael dos Santos Silva) #2

One is decimal separator and the other the thousands separator, like this:

U$ 1,000,000.00 (North American Way)
U$ 1.000.000,00 (Brazilian Way)


(Anton) #3

So at the end, what is what? You used thr “separator” word for both cases.


(Rafael dos Santos Silva) #4

The one with DOT on default English will be the decimal because on English DOT is the decimal separator.

The one with a COMMA on default English translation will be the thousands group because on English COMMA is used to group thousands.

Sorry if I’m not making myself clear, I’m a translator too, because english is not my first language :smile:


(Anton) #5

I see. My point is that if it takes so much to explain the meaning, the key names are not good.


(Rafael dos Santos Silva) #6

Yeah, adding decimal and thousands to keys names would be much better.


(Jeff Atwood) #7

PR in this area would be accepted if you have better names, better names for stuff is always a good idea.


(Anton) #8

I don’t do PRs with Ruby, unfortunately, but may propose the following names:

decimal_mark
thousands_separator

This way they are very clear and self-explanatory.

In the mean time, I added explanation in comments to the corresponding keys in Transifex.