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 committed Mar 8, 2018
1 parent bead86a commit b7d36b2
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 @@ -214,9 +214,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 @@ -231,7 +233,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 b7d36b2

Please sign in to comment.