From 3c0eae0341852ef532696b0c3e29b8189c0af618 Mon Sep 17 00:00:00 2001 From: Carl Christian Snethlage Date: Mon, 16 Sep 2019 20:16:49 +0200 Subject: [PATCH] Fixed l10n, fixes checkstyle-config --- config/checkstyle/checkstyle.xml | 2 +- config/checkstyle/suppressions.xml | 2 +- .../java/org/jabref/gui/util/FieldsUtil.java | 32 ++++++++++--------- src/main/resources/l10n/JabRef_en.properties | 13 +------- 4 files changed, 20 insertions(+), 29 deletions(-) diff --git a/config/checkstyle/checkstyle.xml b/config/checkstyle/checkstyle.xml index 0010f4128fc..046936eb127 100644 --- a/config/checkstyle/checkstyle.xml +++ b/config/checkstyle/checkstyle.xml @@ -1,7 +1,7 @@ + "http://www.checkstyle.org/dtds/configuration_1_3.dtd"> diff --git a/config/checkstyle/suppressions.xml b/config/checkstyle/suppressions.xml index 71943814250..65babae5cb6 100644 --- a/config/checkstyle/suppressions.xml +++ b/config/checkstyle/suppressions.xml @@ -2,7 +2,7 @@ + "http://www.checkstyle.org/dtds/suppressions_1_1.dtd"> diff --git a/src/main/java/org/jabref/gui/util/FieldsUtil.java b/src/main/java/org/jabref/gui/util/FieldsUtil.java index 56c547384f8..69c2158c156 100644 --- a/src/main/java/org/jabref/gui/util/FieldsUtil.java +++ b/src/main/java/org/jabref/gui/util/FieldsUtil.java @@ -16,6 +16,22 @@ public class FieldsUtil { + public static StringConverter fieldStringConverter = new StringConverter<>() { + @Override + public String toString(Field object) { + if (object != null) { + return object.getDisplayName(); + } else { + return ""; + } + } + + @Override + public Field fromString(String string) { + return FieldFactory.parseField(string); + } + }; + public static String getNameWithType(Field field) { if (field instanceof SpecialField) { return field.getDisplayName() + " (" + Localization.lang("Special") + ")"; @@ -32,21 +48,6 @@ public static String getNameWithType(Field field) { } } - public static StringConverter fieldStringConverter = new StringConverter<>() { - @Override - public String toString(Field object) { - if (object != null) { - return object.getDisplayName(); - } else { - return ""; - } - } - @Override - public Field fromString(String string) { - return FieldFactory.parseField(string); - } - }; - public static class ExtraFilePseudoField implements Field { String name; @@ -64,6 +65,7 @@ public Set getProperties() { public String getName() { return name; } + @Override public boolean isStandardField() { return false; diff --git a/src/main/resources/l10n/JabRef_en.properties b/src/main/resources/l10n/JabRef_en.properties index a67e4fed3fa..e465379c670 100644 --- a/src/main/resources/l10n/JabRef_en.properties +++ b/src/main/resources/l10n/JabRef_en.properties @@ -268,8 +268,6 @@ Do\ not\ write\ the\ following\ fields\ to\ XMP\ Metadata=Do not write the follo Donate\ to\ JabRef=Donate to JabRef -Down=Down - Download\ file=Download file duplicate\ removal=duplicate removal @@ -295,7 +293,6 @@ Edit\ group=Edit group Edit\ preamble=Edit preamble Edit\ strings=Edit strings -Editor\ options=Editor options empty\ library=empty library Autocompletion=Autocompletion @@ -952,8 +949,6 @@ Unknown\ export\ format=Unknown export format untitled=untitled -Up=Up - Upgrade\ external\ PDF/PS\ links\ to\ use\ the\ '%0'\ field.=Upgrade external PDF/PS links to use the '%0' field. usage=usage @@ -1116,7 +1111,6 @@ exportFormat=exportFormat Output\ file\ missing=Output file missing No\ search\ matches.=No search matches. The\ output\ option\ depends\ on\ a\ valid\ input\ option.=The output option depends on a valid input option. -Default\ import\ style\ for\ drag\ and\ drop\ of\ PDFs=Default import style for drag and drop of PDFs Default\ PDF\ file\ link\ action=Default PDF file link action Filename\ format\ pattern=Filename format pattern Additional\ parameters=Additional parameters @@ -1186,7 +1180,6 @@ Auto-generating\ PDF-Names\ does\ not\ support\ undo.\ Continue?=Auto-generating Use\ full\ firstname\ whenever\ possible=Use full firstname whenever possible Use\ abbreviated\ firstname\ whenever\ possible=Use abbreviated firstname whenever possible Use\ abbreviated\ and\ full\ firstname=Use abbreviated and full firstname -Autocompletion\ options=Autocompletion options Name\ format=Name format First\ names=First names Cleanup\ entries=Cleanup entries @@ -1291,7 +1284,6 @@ Parse=Parse Result=Result Show\ DOI\ first=Show DOI first Show\ URL\ first=Show URL first -Use\ Emacs\ key\ bindings=Use Emacs key bindings You\ have\ to\ choose\ exactly\ two\ entries\ to\ merge.=You have to choose exactly two entries to merge. Update\ timestamp\ on\ modification=Update timestamp on modification @@ -1313,9 +1305,6 @@ Proxy\ requires\ authentication=Proxy requires authentication Attention\:\ Password\ is\ stored\ in\ plain\ text\!=Attention: Password is stored in plain text! Clear\ connection\ settings=Clear connection settings -Rebind\ C-a,\ too=Rebind C-a, too -Rebind\ C-f,\ too=Rebind C-f, too - Open\ folder=Open folder Export\ entries\ ordered\ as\ specified=Export entries ordered as specified Export\ sort\ order=Export sort order @@ -1997,7 +1986,7 @@ Server\ Timezone\:=Server Timezone\: Remember\ Password=Remember Password Use\ SSL=Use SSL Move\ preprint\ information\ from\ 'URL'\ and\ 'journal'\ field\ to\ the\ 'eprint'\ field=Move preprint information from 'URL' and 'journal' field to the 'eprint' field -Default\ drag\ &\ drop\ action=Default drag & drop action +Default\ drag\ &\ drop\ action=Default drag & drop action Copy\ file\ to\ default\ file\ folder=Copy file to default file folder Link\ file\ (without\ copying)=Link file (without copying) Copy,\ rename\ and\ link\ file=Copy, rename and link file