-
Notifications
You must be signed in to change notification settings - Fork 379
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-15698 Time examples < 10 and > 12 #3895
Conversation
} | ||
|
||
return formatExampleList(examples.toArray(new String[0])); | ||
} else { | ||
String id = parts.findAttributeValue("dateFormatItem", "id"); | ||
if ("NEW".equals(id) || value == null) { | ||
return startItalicSymbol + "n/a" + endItalicSymbol; | ||
return startItalicSymbol + "n/a" + endItalicSymbol; // 15698: doesn't seem relevant--meaning?? |
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.
It's a mystery to me as well...
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 id being "NEW" seems odd to me as well; I just checked the DTD, and it isn't permitted:
<!ATTLIST dateFormatItem id CDATA #REQUIRED >
<!--@MATCH:regex/((E|EEEE)?(H|HH|h|hh|Bh)(m|ms|mm|mmss)?(Z|z|zzzz|v|vvvv)?)|(ms|mmss)|((G|GGGGG)?(y|yy|yyyy)((M{1,4}((E|EEEE|cccc)?(d|dd))?)|(w|Q|QQQ|QQQQ))?)|(U(M|MMM)d?)|(M{1,4}(((E|EEEE|cccc)?(d|dd))|W)?)|((E|EEEE)?d)|(E|EEEE)-->
So that looks obsolete, and we can probably remove just that check.
I wouldn't remove the value==null check, however, without verifying that it can't occur at this point in the code.
The output.txt is useful, but best to also have before and after screen shots also. And for the text output, also best to have the before and after. |
@@ -2556,7 +2560,7 @@ private String handleDateFormatItem(String xpath, String value, boolean showCont | |||
setBackground("'" + timeRange + "'"), | |||
setBackground("'" + dfResult + "'") | |||
})); | |||
examples.add(dtf.format(DATE_SAMPLE)); | |||
examples.add(dtf.format(DATE_SAMPLE)); // 15698: don't need two times for range |
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.
You appear to be leaving comments in the code where you think that something is superfluous. Better to use github comments for that, rather than cluttering up the code.
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.
If it were adding duplicate examples, I think we would have seen than in the results. So it appears that the dtf is changing sufficiently that duplicates are not being added.
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.
Sorry, those were notes to self while I worked (what I meant by that comment was that I don't think I need to add an extra example in that case). Understood.
} | ||
|
||
return formatExampleList(examples.toArray(new String[0])); | ||
} else { | ||
String id = parts.findAttributeValue("dateFormatItem", "id"); | ||
if ("NEW".equals(id) || value == null) { | ||
return startItalicSymbol + "n/a" + endItalicSymbol; | ||
return startItalicSymbol + "n/a" + endItalicSymbol; // 15698: doesn't seem relevant--meaning?? |
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 id being "NEW" seems odd to me as well; I just checked the DTD, and it isn't permitted:
<!ATTLIST dateFormatItem id CDATA #REQUIRED >
<!--@MATCH:regex/((E|EEEE)?(H|HH|h|hh|Bh)(m|ms|mm|mmss)?(Z|z|zzzz|v|vvvv)?)|(ms|mmss)|((G|GGGGG)?(y|yy|yyyy)((M{1,4}((E|EEEE|cccc)?(d|dd))?)|(w|Q|QQQ|QQQQ))?)|(U(M|MMM)d?)|(M{1,4}(((E|EEEE|cccc)?(d|dd))|W)?)|((E|EEEE)?d)|(E|EEEE)-->
So that looks obsolete, and we can probably remove just that check.
I wouldn't remove the value==null check, however, without verifying that it can't occur at this point in the code.
There is a commit message that fails validation. The message must be of the form: eg CLDR-15698 Time examples < 10 and > 12 The "Details" button on the "jira-ticket — Commit message for 41fe3cb fails validation" gives you a way to fix that, by squashing. Or you can make a new PR. Let us know on slack if you have trouble with that. |
Hooray! The files in the branch are the same across the force-push. 😃 ~ Your Friendly Jira-GitHub PR Checker Bot |
The screenshots look good. |
Will the same examples show in the Info Panel? |
Yes, the same set shows in the pop-up and the info panel. |
Once you are ready for review, change the status to "Ready for Review". I approved, but you'll have to fix the conflicts and ask for a re-review. |
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 |
Hooray! The files in the branch are the same across the force-push. 😃 ~ Your Friendly Jira-GitHub PR Checker Bot |
@e-ikwut needs |
Co-authored-by: Elango Cheran <elango@unicode.org>
Co-authored-by: Elango Cheran <elango@unicode.org>
output.txt
before:
after:
CLDR-15698
ALLOW_MANY_COMMITS=true