unicode-org / icu4x

Solving i18n for client-side and resource-constrained environments.
https://icu4x.unicode.org
Other
1.39k stars 179 forks source link

`icu::timezone` but `icu::datetime::time_zone` #4350

Open robertbastian opened 1 year ago

robertbastian commented 1 year ago

Names should be consistent

sffc commented 1 year ago

We decided "Metazone" is one word but "Time Zone" is two words (https://github.com/unicode-org/icu4x/issues/2507). This implies that it should be icu::time_zone. But, that is a crate name.

Options:

  1. Live with it
  2. Change icu_timezone to icu_time_zone and deprecate the crate icu_timezone
  3. Change icu::datetime::time_zone to icu::datetime::timezone in module names
  4. 2 + change all instances of snake case time_zone to timezone
  5. 2 + 3 + change all instances of camel case TimeZone to Timezone
sffc commented 12 months ago

Discuss with:

robertbastian commented 10 months ago

It doesn't look like we ever decided that "time zone" is two words, only that "metazone" is one. "timezone" seems to be the prevalent spelling: https://books.google.com/ngrams/graph?content=timezone%2C%22time+zone%22&year_start=1800&year_end=2000&case_insensitive=on&corpus=en-2012&smoothing=3

I vote for 4.

sffc commented 10 months ago

CC @markusicu

sffc commented 9 months ago

I maybe prefer option 3 just because TimeZone stylized with that casing is so common. But it means camel and snake don't agree which is unfortunate.

markusicu commented 9 months ago

No strong opinion. Not 4.

zbraniecki commented 9 months ago

My vote is for 3. Primarily because Temporal seems to set on TimeZone.

Manishearth commented 8 months ago
  1. Live with it (icu_timezone, icu::timezone, TimeZone)
  2. Change icu_timezone to icu_time_zone and deprecate the crate icu_timezone
  3. Change icu::datetime::time_zone to icu::datetime::timezone in module names
  4. 2 + change all instances of snake case time_zone to timezone
  5. 2 + 3 + change all instances of camel case TimeZone to Timezone

Discussion:

Open for votes!

markusicu commented 8 months ago

My vote: option 2 -- change the module name to be consistent with the crate, but keep time_zone variables and TimeZone types

Manishearth commented 8 months ago

I also vote 2

2 > 3 > 0 >> 4 > 1

robertbastian commented 8 months ago

2 > 3 > 4 >> 1,0

sffc commented 8 months ago

Ballots: https://docs.google.com/document/d/1cwObpQ_gdCsoZVEDNV7C-7eODxElGIJ3FNdivlbLnNo/edit

Results: Options 0, 1, and 4 have vetoes. Among 2 and 3, option 2 is much more popular. It is also the first choice of 6 of 7 ballots. Therefore, option 2 wins.

Action: find all modules in icu4x that have "time zone" in the name and make sure it is stylized as "timezone".

sffc commented 5 months ago

The winning option 2 is the following style: