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

Improve parser warnings #4702

Merged
merged 1 commit into from
Feb 27, 2019
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 @@ -703,21 +703,21 @@ private String fixKey() throws IOException {
}

// Finished, now reverse newKey and remove whitespaces:
parserResult.addWarning(
Localization.lang("Line %0: Found corrupted BibTeX key.", String.valueOf(line)));
key = newKey.reverse();
parserResult.addWarning(
Localization.lang("Line %0: Found corrupted BibTeX key %1.", String.valueOf(line), key.toString()));
}
}
break;

case ',':
parserResult.addWarning(Localization.lang("Line %0: Found corrupted BibTeX key (contains whitespaces).",
String.valueOf(line)));
parserResult.addWarning(
Localization.lang("Line %0: Found corrupted BibTeX key %1 (contains whitespaces).", String.valueOf(line), key.toString()));
break;

case '\n':
parserResult.addWarning(
Localization.lang("Line %0: Found corrupted BibTeX key (comma missing).", String.valueOf(line)));
Localization.lang("Line %0: Found corrupted BibTeX key %1 (comma missing).", String.valueOf(line), key.toString()));
break;

default:
Expand Down
7 changes: 3 additions & 4 deletions src/main/resources/l10n/JabRef_en.properties
Original file line number Diff line number Diff line change
Expand Up @@ -1160,10 +1160,9 @@ Use\ IEEE\ LaTeX\ abbreviations=Use IEEE LaTeX abbreviations

When\ opening\ file\ link,\ search\ for\ matching\ file\ if\ no\ link\ is\ defined=When opening file link, search for matching file if no link is defined
Settings\ for\ %0=Settings for %0

Line\ %0\:\ Found\ corrupted\ BibTeX\ key.=Line %0: Found corrupted BibTeX key.
Line\ %0\:\ Found\ corrupted\ BibTeX\ key\ (contains\ whitespaces).=Line %0: Found corrupted BibTeX key (contains whitespaces).
Line\ %0\:\ Found\ corrupted\ BibTeX\ key\ (comma\ missing).=Line %0: Found corrupted BibTeX key (comma missing).
Line\ %0\:\ Found\ corrupted\ BibTeX\ key\ %1.=Line %0: Found corrupted BibTeX key %1.
Line\ %0\:\ Found\ corrupted\ BibTeX\ key\ %1\ (contains\ whitespaces).=Line %0: Found corrupted BibTeX key %1 (contains whitespaces).
Line\ %0\:\ Found\ corrupted\ BibTeX\ key\ %1\ (comma\ missing).=Line %0: Found corrupted BibTeX key %1 (comma missing).
No\ full\ text\ document\ found=No full text document found
Update\ to\ current\ column\ order=Update to current column order
Download\ from\ URL=Download from URL
Expand Down