Skip to content

Commit

Permalink
fixing missing localization problem for options and arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
sannies committed Aug 17, 2015
1 parent 8a250ca commit 0b63e00
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 3 additions & 1 deletion args4j/src/org/kohsuke/args4j/CmdLineParser.java
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,9 @@ private String createDefaultValuePart(OptionHandler handler) {
}

private String localize(String s, ResourceBundle rb) {
if(rb!=null) return rb.getString(s);
if(rb!=null && rb.containsKey(s)) {
return rb.getString(s);
}
return s;
}

Expand Down
6 changes: 2 additions & 4 deletions args4j/src/org/kohsuke/args4j/spi/OptionHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,8 @@ public String getMetaVariable(ResourceBundle rb) {
token = getDefaultMetaVariable();
if(token==null) return null;

if(rb!=null) {
String localized = rb.getString(token);
if(localized!=null)
token = localized;
if(rb!=null && rb.containsKey(token)) {
token = rb.getString(token);
}

return token;
Expand Down

0 comments on commit 0b63e00

Please sign in to comment.