Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLDR-16668 Revise order of units #3698

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

macchiati
Copy link
Member

CLDR-16668

Still draft because I'd like to discuss with Tom.

tools/cldr-code/src/main/java/org/unicode/cldr/tool/ChartUnitConversions.java

  • Use the new collator in charts

tools/cldr-code/src/main/java/org/unicode/cldr/util/DtdData.java

  • Use the new collator in XML paths

tools/cldr-code/src/main/java/org/unicode/cldr/util/UnitConverter.java

  • add information to UnitSystem enum to make comparision easier.
  • can use int for sort key.
  • add QuantityGroup for more natural ordering of quantities; also intended as utility for ST (which could subdivide further)

tools/cldr-code/src/main/java/org/unicode/cldr/util/UnitPathType.java

  • add simple utility for displayName

tools/cldr-code/src/test/java/org/unicode/cldr/unittest/TestUnits.java

  • enhance one of the tests to also print information about the quantities, standard units, current ST Pages, ordering information, systems, etc.

  • This PR completes the ticket.

ALLOW_MANY_COMMITS=true

@macchiati macchiati requested a review from btangmu May 8, 2024 04:43
@macchiati
Copy link
Member Author

macchiati commented May 8, 2024

Still draft, but feedback is useful.
A commit message needs fixing, will do that when everything else is ok.

@macchiati macchiati changed the title CLDR 16668 Revise order of units CLDR-16668 Revise order of units May 8, 2024
@@ -1851,28 +1833,41 @@ public enum UnitSystem { // TODO convert getSystems and SupplementalDataInfo to
si_acceptable,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the order significant -- possibly affecting order of rows/pages in ST for example? If so, comment would be helpful, otherwise alphabetical order might be appropriate

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would affect the order of rows within the pages, grouping the quantities better.


public enum QuantityGroup {
Duration("duration", "year-duration"),
Length("length"),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here again a brief comment explaining the significance of the ordering could be helpful

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also have a proposal for breaking apart the Units Other (which also ends up breaking apart a couple of others. It's just draft for now until we can discuss.

@macchiati macchiati force-pushed the CLDR-16668-Revise-order-of-units branch from 866a0aa to d12c1da Compare May 16, 2024 03:58
@jira-pull-request-webhook
Copy link

Notice: the branch changed across the force-push!

  • tools/cldr-code/src/main/java/org/unicode/cldr/util/UnitConverter.java is different
  • tools/cldr-code/src/test/java/org/unicode/cldr/unittest/TestUnits.java is different

View Diff Across Force-Push

~ Your Friendly Jira-GitHub PR Checker Bot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants