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

ICU-22921 Add howto guide to try MF 2.0 final candidate draft impls #3334

Merged
merged 1 commit into from
Jan 15, 2025

Conversation

echeran
Copy link
Contributor

@echeran echeran commented Jan 15, 2025

Add a how-to guide in the User Guide to show users how to try out MF 2.0 final candidate using the implementations in ICU (C++ and Java)

Checklist

  • Required: Issue filed: ICU-22921
  • Required: The PR title must be prefixed with a JIRA Issue number. Example: "ICU-1234 Fix xyz"
  • Required: Each commit message must be prefixed with a JIRA Issue number. Example: "ICU-1234 Fix xyz"
  • Issue accepted (done by Technical Committee after discussion)
  • Tests included, if applicable
  • API docs and/or User Guide docs changed or added, if applicable

@echeran
Copy link
Contributor Author

echeran commented Jan 15, 2025

Page preview in personal fork GH Pages site: https://echeran.github.io/icu/userguide/format_parse/messages/try-mf2.html

macchiati
macchiati previously approved these changes Jan 15, 2025
UParseError parseError;

icu::Calendar* cal(Calendar::createInstance(errorCode));
cal->set(2025, Calendar::JANUARY, 28);
Copy link
Member

Choose a reason for hiding this comment

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

The text on line 112 says the message will say "January 13", but this sets the calendar to the 28th???

Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks, updated (created suggestion in my review)

@aphillips
Copy link
Member

@mihnita Note that the same bug is in the Java instructions. The calendar is set to 2025, 0, 28 but the message supposedly rendered is for the 13th. Also, the imports should mention Calendar, not Date. What am I missing?

docs/userguide/format_parse/messages/try-mf2.md Outdated Show resolved Hide resolved

---

# Hello `MessageFormat2`
Copy link
Contributor

Choose a reason for hiding this comment

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

Some style guides seem to prefer one single heading 1 in the whole document, as "the title of the page"

I don't feel strongly about that.

But in this case, looking at the rendered page that you shared, is this bringing anything extra?

What we have is basically:

Trying MF 2.0 Final Candidate

{TOC}

Hello MessageFormat2


Suggestion: just remove this heading

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

# end
```

1. This will output
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think this is a separate bullet.
Feels like a part of "Build your application and run it"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.


```cmd
git clone https://github.com/unicode-org/icu.git

Copy link
Contributor

Choose a reason for hiding this comment

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

nitpick: remove trailing spaces

cd icu\icu4c
msbuild source/allinone/allinone.sln /p:Configuration=Release /p:Platform=x64 /p:SkipUWP=true
cd ..\..

Copy link
Contributor

Choose a reason for hiding this comment

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

nitpick: remove trailing spaces

docs/userguide/format_parse/messages/try-mf2.md Outdated Show resolved Hide resolved
docs/userguide/format_parse/messages/try-mf2.md Outdated Show resolved Hide resolved
UParseError parseError;

icu::Calendar* cal(Calendar::createInstance(errorCode));
cal->set(2025, Calendar::JANUARY, 28);
Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks, updated (created suggestion in my review)

docs/userguide/format_parse/messages/try-mf2.md Outdated Show resolved Hide resolved
@mihnita
Copy link
Contributor

mihnita commented Jan 15, 2025

@mihnita Note that the same bug is in the Java instructions. The calendar is set to 2025, 0, 28 but the message supposedly rendered is for the 13th. Also, the imports should mention Calendar, not Date. What am I missing?

Thank you for the catch!

I've updated the real code, but missed updating the .md
Suggested it in my review.

Copy link
Member

@macchiati macchiati left a comment

Choose a reason for hiding this comment

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

It seems like:

  1. We want a TOC, so that people can just jump to the case they are interested in, instead of scanning.
  2. Instead of "create a minimal C++ file", can we put hello_mf2.cpp into the directory so people can just copy it? Then the instructions for all the C++ cases for that file are identical and simple.
  3. Put the scarier cases after the simpler ones
    • Move "From Visual Studio with minimal work" first under "C++ Windows with Visual Studio"

@echeran
Copy link
Contributor Author

echeran commented Jan 15, 2025

  1. We want a TOC, so that people can just jump to the case they are interested in, instead of scanning.

Is already there.

  1. Instead of "create a minimal C++ file", can we put hello_mf2.cpp into the directory so people can just copy it? Then the instructions for all the C++ cases for that file are identical and simple.

  2. Put the scarier cases after the simpler ones

    • Move "From Visual Studio with minimal work" first under "C++ Windows with Visual Studio"

Done.

@echeran echeran requested a review from macchiati January 15, 2025 20:48
mihnita
mihnita previously approved these changes Jan 15, 2025
Copy link
Contributor

@mihnita mihnita left a comment

Choose a reason for hiding this comment

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

Thank you very much!
M

macchiati
macchiati previously approved these changes Jan 15, 2025
@macchiati
Copy link
Member

Looks like you can merge now if you squash with the right commit message. Please let me know when you do

@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

@macchiati
Copy link
Member

I see the following message in the (failing) copyright scan. Is that due to a missing copyright in the .cpp file?

Run perl tools/scripts/cpysearch/cpyscan.pl
  perl tools/scripts/cpysearch/cpyscan.pl
  shell: /usr/bin/bash -e {0}
  env:
    SHARED_MVN_ARGS: --show-version --no-transfer-progress
Above files did not contain the correct copyright notice. at tools/scripts/cpysearch/cpyscan.pl line 54.
docs/userguide/format_parse/messages/hello_mf[2](https://github.com/unicode-org/icu/actions/runs/12797682110/job/35680111708?pr=3334#step:3:2).cpp
Error: Process completed with exit code 255.

@echeran echeran dismissed stale reviews from mihnita and macchiati via 5f26553 January 15, 2025 21:58
@jira-pull-request-webhook
Copy link

Notice: the branch changed across the force-push!

  • docs/userguide/format_parse/messages/hello_mf2.cpp is different

View Diff Across Force-Push

~ Your Friendly Jira-GitHub PR Checker Bot

@echeran
Copy link
Contributor Author

echeran commented Jan 15, 2025

I see the following message in the (failing) copyright scan. Is that due to a missing copyright in the .cpp file?

Yes, indeed. Fixed now.

@macchiati
Copy link
Member

🤞 on test completion

@macchiati
Copy link
Member

macchiati commented Jan 15, 2025 via email

@macchiati
Copy link
Member

Just approved, so I think we are just waiting on the checks.

@macchiati
Copy link
Member

I'm taking the liberty of punching the button...

@macchiati macchiati merged commit 2c5e021 into unicode-org:main Jan 15, 2025
12 checks passed
@macchiati
Copy link
Member

About how long do you think it is before it shows up on https://unicode-org.github.io/icu/userguide/format_parse/messages/?

@echeran
Copy link
Contributor Author

echeran commented Jan 15, 2025

About how long do you think it is before it shows up on https://unicode-org.github.io/icu/userguide/format_parse/messages/?

Should be very soon b/c the job is in progress. I'll keep a watch out.

@echeran
Copy link
Contributor Author

echeran commented Jan 15, 2025

Done! User Guide is updated. Be sure to update the URL to be this (your previous guesses had a typo somehow):
https://unicode-org.github.io/icu/userguide/format_parse/messages/try-mf2.html

@macchiati
Copy link
Member

macchiati commented Jan 15, 2025 via email

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.

4 participants