Skip to content

Commit

Permalink
Fixes #3796: Pretend that we have every translation for every key in …
Browse files Browse the repository at this point in the history
…every language
  • Loading branch information
tobiasdiez authored and koppor committed Mar 9, 2018
1 parent 4c18b83 commit a2b7717
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/main/java/org/jabref/logic/l10n/Localization.java
Original file line number Diff line number Diff line change
Expand Up @@ -224,9 +224,11 @@ private static class LocalizationBundle extends ResourceBundle {
lookup = lookupMap;
}

@Override
public final Object handleGetObject(String key) {
Objects.requireNonNull(key);
return lookup.get(key);
return Optional.ofNullable(lookup.get(key))
.orElse(key);
}

@Override
Expand All @@ -241,7 +243,8 @@ protected Set<String> handleKeySet() {

@Override
public boolean containsKey(String key) {
return (key != null) && lookup.containsKey(key);
// Pretend we have every key
return true;
}
}
}
Expand Down

0 comments on commit a2b7717

Please sign in to comment.