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-5854 Add-examples-for-relative-dates-and-times #4060

Conversation

haytenf
Copy link
Contributor

@haytenf haytenf commented Sep 17, 2024

CLDR-5854

Locale Before After
cy Screenshot 2024-08-27 at 4 33 56 PM Screenshot 2024-08-27 at 4 34 32 PM
cy Screenshot 2024-08-27 at 4 35 20 PM Screenshot 2024-08-27 at 4 50 53 PM
cy Screenshot 2024-08-27 at 4 36 47 PM Screenshot 2024-08-27 at 4 37 19 PM
cy Screenshot 2024-08-27 at 4 43 45 PM Screenshot 2024-08-27 at 4 46 19 PM
cy Screenshot 2024-08-27 at 4 53 20 PM Screenshot 2024-08-27 at 4 39 28 PM
ro Screenshot 2024-08-27 at 4 56 03 PM Screenshot 2024-08-27 at 4 57 18 PM
ro Screenshot 2024-08-27 at 4 56 21 PM Screenshot 2024-08-27 at 4 57 54 PM
ro Screenshot 2024-08-27 at 5 02 07 PM (future-few) Screenshot 2024-08-27 at 5 01 05 PM
ro Screenshot 2024-08-27 at 4 59 38 PM Screenshot 2024-08-27 at 5 03 43 PM
it Screenshot 2024-08-27 at 5 05 34 PM Screenshot 2024-08-27 at 5 06 23 PM
it Screenshot 2024-08-27 at 5 06 51 PM Screenshot 2024-08-27 at 5 07 40 PM
  • This PR completes the ticket.

ALLOW_MANY_COMMITS=true

@haytenf haytenf force-pushed the CLDR-5854-Add-examples-for-relative-dates-and-times branch from 9b46296 to 09276e0 Compare September 17, 2024 22:46
@jira-pull-request-webhook
Copy link

Hooray! The files in the branch are the same across the force-push. 😃

~ Your Friendly Jira-GitHub PR Checker Bot

@haytenf haytenf changed the title CLDR-5854-Add-examples-for-relative-dates-and-times CLDR-5854 Add-examples-for-relative-dates-and-times Sep 17, 2024
@haytenf
Copy link
Contributor Author

haytenf commented Sep 17, 2024

@macchiati @srl295 @btangmu Hello! I've made a new PR for this ticket since the old one was (accidentally) trying to merge to the wrong branch. The main thing I wanted to address is that the casing/context side isn't covered by this implementation for two main reasons (the examples for Romanian in the markdown table show this):

  • the pattern I use for some of the examples is MMMMd, and when formatted using the rules for Romanian d comes first, so the capitalization becomes irrelevant
  • simple date format produces the date appropriately lowercased for Romanian, which is then formatted with the relative item, so the middle-of-sentence capitalization issue doesn't arise

In terms of just getting examples in for the relative items, however, it may still be useful.

@srl295 srl295 merged commit 3515383 into unicode-org:main Oct 2, 2024
12 checks passed
@@ -326,6 +326,19 @@ public void setCachingEnabled(boolean enabled) {
}
};

// map relativeTimePattern counts to numeric examples
Copy link
Contributor

Choose a reason for hiding this comment

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

We might need to make this map dependent on locale. That can be done under CLDR-18025 "Further work on examples for relative dates and times".

String skeleton;
String type = parts.findAttributeValue("field", "type");
if (type.startsWith("hour")) {
skeleton = "Hm";
Copy link
Contributor

Choose a reason for hiding this comment

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

We might want to make this "jm" or "Cm" to use hour cycle prefs based on locale. That can be done under CLDR-18025 "Further work on examples for relative dates and times".

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

Successfully merging this pull request may close these issues.

3 participants