-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
[WIP] Add support for German months at the normalizer functionality #3536
Conversation
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.
Adapt to the java 8 date formatter
if (value.equalsIgnoreCase("Maerz")) { | ||
// this value is not treated by LatexToUnicodeAdapter, so a special handling is required. | ||
month = Month.getMonthByNumber(3); | ||
} else { |
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.
Why don't you use the java 8 DateTimeFormatter for parsing the dates? Much more easier and flexible https://docs.oracle.com/javase/8/docs/api/java/time/format/DateTimeFormatter.html#predefined
@@ -23,6 +26,31 @@ public String getKey() { | |||
public String format(String value) { | |||
Objects.requireNonNull(value); | |||
Optional<Month> month = Month.parse(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.
Since this is about parsing months, it should go into the Month.parse
method, right?
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.
Moved it there
I wasn't sure, cause this seemed a seldom case. I can move it there.
|
ea5956f
to
0294b01
Compare
Superseeded by #3734 |
My library exports BibTeX in a strange format (http://www2.informatik.uni-stuttgart.de/zdi/buecherei/NCSTRL_listings/privat/Kopp_Oliver.bibtex.html). I cannot get this fixed, so JabRef has to.
Screenshots added (for bigger UI changes)gradle localizationUpdate
?