tc39 / ecma402

Status, process, and documents for ECMA 402
https://tc39.es/ecma402/
Other
537 stars 107 forks source link

Add binary prefix units #449

Open sffc opened 4 years ago

sffc commented 4 years ago

Binary units such as KiB and MiB reduce ambiguity associated with kB and MB. We have received numerous requests to add them to ECMA-402. This is currently blocked by upstream CLDR not having locale data for these units.

Upstream ticket:

https://unicode-org.atlassian.net/browse/CLDR-13848

Relevant CLDR discussions:

User requests:

@mathiasbynens @markusicu @macchiati

macchiati commented 4 years ago

If we are just adding the prefixes, then the work could be feasible. However, it is very late in the cycle for us to be adding new data for translation, so I will add this to the CLDR agenda tomorrow.

I think it would be bounded to the following (this is the English version): 16 strings per language. Does this look right, Shane?

long

kibi{0} mebi{0} gibi{0} tebi{0} pebi{0} exbi{0} zebi{0} yobe{0}

short

KiB{0} MiB{0} GiB{0} TiB{0} PiB{0} EiB{0} ZiB{0} YiB{0}

Mark

On Mon, Jun 1, 2020 at 8:32 PM Shane F. Carr notifications@github.com wrote:

Binary units such as KiB and MiB reduce ambiguity associated with kB and MB. We have received numerous requests to add them to ECMA-402. This is currently blocked by upstream CLDR not having locale data for these units.

Relevant CLDR discussions:

User requests:

@mathiasbynens https://github.com/mathiasbynens @markusicu https://github.com/markusicu @macchiati https://github.com/macchiati

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/tc39/ecma402/issues/449, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACJLEMFCL7F432OIJ6W57QDRURXDVANCNFSM4NQK42IQ .

macchiati commented 4 years ago

I created a ticket for discussion. Please add comments there: https://unicode-org.atlassian.net/browse/CLDR-13848

Mark

On Tue, Jun 2, 2020 at 2:35 PM Mark Davis ☕️ mark@macchiato.com wrote:

If we are just adding the prefixes, then the work could be feasible. However, it is very late in the cycle for us to be adding new data for translation, so I will add this to the CLDR agenda tomorrow.

I think it would be bounded to the following (this is the English version): 16 strings per language. Does this look right, Shane?

long

kibi{0} mebi{0} gibi{0} tebi{0} pebi{0} exbi{0} zebi{0} yobe{0}

short

KiB{0} MiB{0} GiB{0} TiB{0} PiB{0} EiB{0} ZiB{0} YiB{0}

Mark

On Mon, Jun 1, 2020 at 8:32 PM Shane F. Carr notifications@github.com wrote:

Binary units such as KiB and MiB reduce ambiguity associated with kB and MB. We have received numerous requests to add them to ECMA-402. This is currently blocked by upstream CLDR not having locale data for these units.

Relevant CLDR discussions:

User requests:

@mathiasbynens https://github.com/mathiasbynens @markusicu https://github.com/markusicu @macchiati https://github.com/macchiati

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/tc39/ecma402/issues/449, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACJLEMFCL7F432OIJ6W57QDRURXDVANCNFSM4NQK42IQ .

macchiati commented 4 years ago

Note that I fixed the typos in the ticket to drop the B from the short forms.

Mark

On Tue, Jun 2, 2020 at 2:45 PM Mark Davis ☕️ mark@macchiato.com wrote:

I created a ticket for discussion. Please add comments there: https://unicode-org.atlassian.net/browse/CLDR-13848

Mark

On Tue, Jun 2, 2020 at 2:35 PM Mark Davis ☕️ mark@macchiato.com wrote:

If we are just adding the prefixes, then the work could be feasible. However, it is very late in the cycle for us to be adding new data for translation, so I will add this to the CLDR agenda tomorrow.

I think it would be bounded to the following (this is the English version): 16 strings per language. Does this look right, Shane?

long

kibi{0} mebi{0} gibi{0} tebi{0} pebi{0} exbi{0} zebi{0} yobe{0}

short

KiB{0} MiB{0} GiB{0} TiB{0} PiB{0} EiB{0} ZiB{0} YiB{0}

Mark

On Mon, Jun 1, 2020 at 8:32 PM Shane F. Carr notifications@github.com wrote:

Binary units such as KiB and MiB reduce ambiguity associated with kB and MB. We have received numerous requests to add them to ECMA-402. This is currently blocked by upstream CLDR not having locale data for these units.

Relevant CLDR discussions:

User requests:

@mathiasbynens https://github.com/mathiasbynens @markusicu https://github.com/markusicu @macchiati https://github.com/macchiati

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/tc39/ecma402/issues/449, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACJLEMFCL7F432OIJ6W57QDRURXDVANCNFSM4NQK42IQ .

ByteEater-pl commented 4 years ago
yobe{0}

should be yobi

macchiati commented 4 years ago

Thanks. I added https://unicode-org.atlassian.net/browse/CLDR-13848?focusedCommentId=156911

Mark

On Fri, Jun 19, 2020 at 8:53 AM Krzysztof Maczyński < notifications@github.com> wrote:

yobe{0}

should be yobi

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/tc39/ecma402/issues/449#issuecomment-646709093, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACJLEMA2IL2LZOKQSAFCBBTRXOCW5ANCNFSM4NQK42IQ .

connorjclark commented 2 years ago

CLDR now contains strings for the binary prefixes:

https://github.com/unicode-org/cldr/blob/main/common/main/en.xml#L6128

https://github.com/unicode-org/cldr/blob/main/common/main/ar.xml#L10572

I had expected to see shorthand units like "KiB":

image

source: https://en.wikipedia.org/wiki/Kilobyte

But it seems kibibyte and friends only have a "long" string specified.

But perhaps that'd need to be a digital-kibibyte unit in CLDR?