Skip to content
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

Meaningful button review field migration #3762

Merged
merged 2 commits into from
Feb 23, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public void performAction(BasePanel basePanel, ParserResult parserResult) {

migration.performMigration(parserResult);
List<BibEntry> conflicts = MergeReviewIntoCommentMigration.collectConflicts(parserResult);
if (new MergeReviewIntoCommentConfirmationDialog(basePanel).askUserForMerge(conflicts)) {
if (!conflicts.isEmpty() && new MergeReviewIntoCommentConfirmationDialog(basePanel).askUserForMerge(conflicts)) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think, this makes it not better. Now, JabRef migrates WITHOUT ANY notification. The old way was better. It showed that something was migrated.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, then lets discuss this again: The rationale behind #3658 was that the warning should be displayed iff there is BOTH a comment and and review field present and perform the migration silently nonetheless.

migration.performConflictingMigration(parserResult);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,14 @@ public boolean askUserForMerge(List<BibEntry> conflicts) {
.map(Optional::get)
.collect(Collectors.joining(",\n"));

int answer = JOptionPane.showConfirmDialog(
String[] options = {Localization.lang("Merge fields")};
int answer = JOptionPane.showOptionDialog(
panel,
bibKeys + " " +
Localization.lang("has/have both a 'Comment' and a 'Review' field.") + "\n" +
Localization.lang("Since the 'Review' field was deprecated in JabRef 4.2, these two fields are about to be merged into the 'Comment' field.") + "\n" +
Localization.lang("The conflicting fields of these entries will be merged into the 'Comment' field."),
Localization.lang("Review Field Migration"), JOptionPane.DEFAULT_OPTION, JOptionPane.WARNING_MESSAGE);
Localization.lang("Review Field Migration"), JOptionPane.DEFAULT_OPTION, JOptionPane.WARNING_MESSAGE, null, options, options[0]);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe not a "Warning message", in fact it's an information message. The user can't do anything about it.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, infact it's a bit more important than just a simple notification, but I'd be open if others agree with you I'ts gonna be changed.


return 0 == answer;
}
Expand Down
1 change: 1 addition & 0 deletions src/main/resources/l10n/JabRef_en.properties
Original file line number Diff line number Diff line change
Expand Up @@ -719,6 +719,7 @@ Memory\ stick\ mode=Memory stick mode
Menu\ and\ label\ font\ size=Menu and label font size

Merged\ external\ changes=Merged external changes
Merge\ fields=Merge fields

Messages=Messages

Expand Down