-
Notifications
You must be signed in to change notification settings - Fork 373
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-11155 Separate Volume_Metric and Volume_Other #3526
Conversation
This works except that some paths that should be in Volume_Metric are in Volume_Other, such as:
I don't know why, except that unitSystemCollection is empty in some such cases... |
Hooray! The files in the branch are the same across the force-push. 😃 ~ Your Friendly Jira-GitHub PR Checker Bot |
@@ -766,6 +752,58 @@ public PathHeader fromPath(final String path, List<String> failures) { | |||
} | |||
} | |||
|
|||
private PathHeader makePathHeader(RawData data, String path, String alt) { | |||
// Caution: each call to PathHeader.Factory.fix changes the value of | |||
// PathHeader.Factory.order |
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.
One improvement (encapsulation for clarity) might be for fix() to return, or fill in, a small object containing a string (name/code), an "order", and whatever else it sets (suborder?) -- instead of directly modifying elements of Factory
Also, the PathHeader constructor has 9 parameters! Anything more than 4 is considered smelly code, so the constructor should be revised along with this method
Notice: the branch changed across the force-push!
~ Your Friendly Jira-GitHub PR Checker Bot |
Hooray! The files in the branch are the same across the force-push. 😃 ~ Your Friendly Jira-GitHub PR Checker Bot |
I directed you to the wrong call. It should be the following, which
supplies systems for compound units.
*public* Set<UnitSystem> getSystemsEnum(String unit)
…On Mon, Feb 26, 2024 at 2:20 PM jira-pull-request-webhook[bot] < ***@***.***> wrote:
Hooray! The files in the branch are the same across the force-push. 😃
~ Your Friendly Jira-GitHub PR Checker Bot
—
Reply to this email directly, view it on GitHub
<#3526 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACJLEMGCRURS7U4IR242IODYVUDDBAVCNFSM6AAAAABD27OOKSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNRVGQYDKOJVGY>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Notice: the branch changed across the force-push!
~ Your Friendly Jira-GitHub PR Checker Bot |
-New subroutines makePathHeader and getVolumePageId -Change example in Dashboard.java from Volume to Area -Comments
Hooray! The files in the branch are the same across the force-push. 😃 ~ Your Friendly Jira-GitHub PR Checker Bot |
@macchiati with getSystemsEnum it appears to work perfectly |
final String longUnitId = | ||
XPathParts.getFrozenInstance(path).findAttributeValue("unit", "type"); | ||
if (longUnitId == null) { | ||
throw new RuntimeException("Missing unit in path " + path); |
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.
We shouldn't throw very generic exceptions, because it makes debugging trickier. If you touch this again, it would be better to have a more specific exception.
SectionId newSectionId = SectionId.forString(fix(data.section, 0)); | ||
String pageIdName = fix(data.page, 0); | ||
PageId newPageId; | ||
if ("Volume".equals(pageIdName)) { |
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.
Ideally this should be done inside of the fix.
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.
Approved (some minor improvements could be made, but not blockers)
-New subroutines makePathHeader and getVolumePageId
-Change example in Dashboard.java from Volume to Area
-Comments
CLDR-11155
ALLOW_MANY_COMMITS=true