-
Notifications
You must be signed in to change notification settings - Fork 384
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-16372 Code to replace lateral inheritance markers in trunk #3275
Conversation
-New CLDRModify -fZ, Zero lateral, replace INHERITANCE_MARKER with bailey for all lateral inheritance -For -fZ new boolean CONSTRUCTED_PSEUDO_PATH_NOT_LATERAL in VoteResolver#reviseInheritanceAsNeeded, no change in behavior as it stands -Revise CLDRModify -fV, values that would inherit laterally, do not crash if parentValue is null -Comments
@@ -2931,14 +2932,19 @@ public void handlePath(String xpath) { | |||
parentFile = factory.make(parentId, true); | |||
} | |||
String parentValue = parentFile.getStringValueWithBailey(xpath); | |||
if (!parentValue.equals(baileyValue)) { |
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.
there was NPE for parentValue null here
String fullXPath = cldrFileToFilter.getFullXPath(xpath); | ||
replace(fullXPath, fullXPath, newValue); | ||
} | ||
}); |
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.
This new "-fZ" results in more "hardening" than "-fV", mainly, I think, because "-fZ" doesn't distinguish between level one locales and other locales -- and also, because "-fZ" treats constructed values as lateral inheritance, while "-fV" doesn't
This PR re-enables -fV, and newly enables -fZ. One or the other may be useful for revising the production data, comparing the two is instructive.
(pathWhereFound.value.equals(path) | ||
|| (CONSTRUCTED_PSEUDO_PATH_NOT_LATERAL | ||
&& GlossonymConstructor.PSEUDO_PATH.equals( | ||
pathWhereFound.value))) |
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.
This is a change without a difference (in behavior). It paves the way for making -fZ (and vote resolution, etc., in general) a bit more similar to -fV by changing false to true
@@ -2876,11 +2877,11 @@ public void handleEnd() { | |||
|
|||
@Override | |||
public void handleStart() { | |||
// skip if the locale id's parent isn't root. That is, it must be at level-1 | |||
// locale. | |||
// skip if the locale is root. |
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.
The comment wasn't accurate -- this just changes the comment to match the code
-New CLDRModify -fZ, Zero lateral, replace INHERITANCE_MARKER with bailey for all lateral inheritance -For -fZ new boolean CONSTRUCTED_PSEUDO_PATH_NOT_LATERAL in VoteResolver#reviseInheritanceAsNeeded, no change in behavior as it stands -Revise CLDRModify -fV, values that would inherit laterally, do not crash if parentValue is null -Comments
@macchiati @srl295 this ticket is still "blocks-release" for v44, and the PR is a necessary step but doesn't finish the ticket. The finishing step will be to run either -fV or -fZ to "harden" about a quarter of a million values. So it will be great to have this PR reviewed for the code, and I'll follow up with one or more PRs for the data. |
-New CLDRModify -fZ, Zero lateral, replace INHERITANCE_MARKER with bailey for all lateral inheritance
-For -fZ new boolean CONSTRUCTED_PSEUDO_PATH_NOT_LATERAL in VoteResolver#reviseInheritanceAsNeeded, no change in behavior as it stands
-Revise CLDRModify -fV, values that would inherit laterally, do not crash if parentValue is null
-Comments
CLDR-16372
ALLOW_MANY_COMMITS=true