Skip to content

Commit

Permalink
Fixed l10n, fixes checkstyle-config
Browse files Browse the repository at this point in the history
  • Loading branch information
calixtus committed Sep 16, 2019
1 parent 63c3acf commit 3c0eae0
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 29 deletions.
2 changes: 1 addition & 1 deletion config/checkstyle/checkstyle.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<!DOCTYPE module PUBLIC
"-//Puppy Crawl//DTD Check Configuration 1.3//EN"
"http://www.puppycrawl.com/dtds/configuration_1_3.dtd">
"http://www.checkstyle.org/dtds/configuration_1_3.dtd">

<module name="Checker">
<module name="Header">
Expand Down
2 changes: 1 addition & 1 deletion config/checkstyle/suppressions.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<!DOCTYPE suppressions PUBLIC
"-//Puppy Crawl//DTD Suppressions 1.1//EN"
"http://www.puppycrawl.com/dtds/suppressions_1_1.dtd">
"http://www.checkstyle.org/dtds/suppressions_1_1.dtd">

<suppressions>
<suppress checks="[a-zA-Z0-9]*" files="[\\/]gen[\\/]" />
Expand Down
32 changes: 17 additions & 15 deletions src/main/java/org/jabref/gui/util/FieldsUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,22 @@

public class FieldsUtil {

public static StringConverter<Field> 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") + ")";
Expand All @@ -32,21 +48,6 @@ public static String getNameWithType(Field field) {
}
}

public static StringConverter<Field> 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;
Expand All @@ -64,6 +65,7 @@ public Set<FieldProperty> getProperties() {
public String getName() {
return name;
}

@Override
public boolean isStandardField() {
return false;
Expand Down
13 changes: 1 addition & 12 deletions src/main/resources/l10n/JabRef_en.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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\ &amp;\ drop\ action=Default drag &amp; 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
Expand Down

0 comments on commit 3c0eae0

Please sign in to comment.