-
-
Notifications
You must be signed in to change notification settings - Fork 751
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-21109 minimum grouping digits in DecimalFormat #1152
ICU-21109 minimum grouping digits in DecimalFormat #1152
Conversation
2b334aa
to
843aeb1
Compare
Notice: the branch changed across the force-push!
~ Your Friendly Jira-GitHub PR Checker Bot |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you also make this change in Java, at least the code change? We can't pass enums as ints in Java, so it may not require an API proposal, but we should at least make behavior the same.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
request changes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay. I guess best practice would be to send an update to your API proposal, and add this to the Java API docs. It should be painless.
} | ||
|
||
if (this.grouping1 != -2 && this.grouping2 != -4) { | ||
return getInstance(this.grouping1, this.grouping2, minGrouping); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Return this
if minGrouping == this.minGrouping
* | ||
* @see #setMinimumGroupingDigits | ||
* @see #MINIMUM_GROUPING_DIGITS_MIN2 | ||
* @draft ICU 68 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please put these in the @category
, and add the provisional tag.
* Setting the value to 1 to turn off minimum grouping digits. | ||
* Setting the value to MINIMUM_GROUPING_DIGITS_AUTO to display grouping using the default | ||
* strategy for all locales. | ||
* Setting the value to MINIMUM_GROUPING_DIGITS_MIN2 to display grouping using locale defaults, | ||
* except do not show grouping on values smaller than 10000 (such that there is a minimum of | ||
* two digits before the first separator). | ||
* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* Setting the value to 1 to turn off minimum grouping digits. | |
* Setting the value to MINIMUM_GROUPING_DIGITS_AUTO to display grouping using the default | |
* strategy for all locales. | |
* Setting the value to MINIMUM_GROUPING_DIGITS_MIN2 to display grouping using locale defaults, | |
* except do not show grouping on values smaller than 10000 (such that there is a minimum of | |
* two digits before the first separator). | |
* | |
* Set the value to: | |
* <ul> | |
* <li>1 to turn off minimum grouping digits.</li> | |
* <li>MINIMUM_GROUPING_DIGITS_AUTO to display grouping using the default | |
* strategy for all locales.</li> | |
* <li>MINIMUM_GROUPING_DIGITS_MIN2 to display grouping using locale defaults, | |
* except do not show grouping on values smaller than 10000 (such that there is a minimum of | |
* two digits before the first separator).</li> | |
* </ul> |
PTAL |
Ok. Lgtm. Please squash and I'll approve. |
08f9a1f
to
dd8aa11
Compare
Hooray! The files in the branch are the same across the force-push. 😃 ~ Your Friendly Jira-GitHub PR Checker Bot |
Cherry-pick pull/1152to fix minimum group digits Needed to fix Minimum Grouping Digits for Intl.RelativeTimeFormat Add ability to use locale default for minimum grouping digits - patches/grouping_digits.patch - upstream PR: unicode-org/icu#1152 - upbstream bug: https://unicode-org.atlassian.net/browse/ICU-21109 https://chromium.googlesource.com/chromium/deps/icu.git/+log/46f53df..9e7dae8 9e7dae8 Cherry-pick pull/1152to fix minimum group digits e4b8586 Remove *.mk files which no longer exist c981f19 Sort the list in the filter files w/o changes All these three has no dat size impact. Bug: v8:10443 Change-Id: I3b4e32fae2e50c804bc906c5e279f198b35ad752 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2242745 Reviewed-by: Jungshik Shin <jshin@chromium.org> Commit-Queue: Frank Tang <ftang@chromium.org> Cr-Commit-Position: refs/heads/master@{#777959}
Needed to fix Minimum Grouping Digits for Intl.RelativeTimeFormat Add ability to use locale default for minimum grouping digits - patches/grouping_digits.patch - upstream PR: unicode-org/icu#1152 - upbstream bug: https://unicode-org.atlassian.net/browse/ICU-21109 Bug: v8:10443 Change-Id: I5f9f627d8be5cca42d842a4bef4661b29efd060f Reviewed-on: https://chromium-review.googlesource.com/c/chromium/deps/icu/+/2242106 Reviewed-by: Jungshik Shin <jshin@chromium.org>
Enhance DecimalFormat::setMinimumGroupingDigits to accept
UNUM_MINIMUM_GROUPING_DIGITS_AUTO and
UNUM_MINIMUM_GROUPING_DIGITS_MIN2 to support locale default
for minimum grouping digits
Checklist