Skip to content

Commit

Permalink
improved translation
Browse files Browse the repository at this point in the history
  • Loading branch information
sigv committed Jun 21, 2011
1 parent a40d79d commit adabc64
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .settings/org.eclipse.core.resources.prefs
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#Sat Jan 22 23:13:13 PST 2011
#Tue Jun 21 11:35:40 CEST 2011
eclipse.preferences.version=1
encoding/<project>=UTF-8
4 changes: 3 additions & 1 deletion src/simpleserver/command/TimeCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public void execute(Server server, String message) {
time.freeze(value);
tInfo("Time frozen");
} else {
tError("Optional 2nd argument must be freeze!");
tError("Optional 2nd argument must be %s!", "freeze");
}
}
}
Expand All @@ -98,6 +98,8 @@ public void execute(Server server, String message) {

protected abstract void tError(String message);

protected abstract void tError(String message, Object... args);

protected abstract void info(String message);

protected abstract void tInfo(String message);
Expand Down
5 changes: 5 additions & 0 deletions src/simpleserver/command/TimePlayerCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,11 @@ protected void tError(String message) {
error(t(message));
}

@Override
protected void tError(String message, Object... args) {
error(String.format(t(message), args));
}

@Override
protected void tInfo(String message) {
info(t(message));
Expand Down
5 changes: 5 additions & 0 deletions src/simpleserver/command/TimeServerCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,11 @@ protected void tError(String message) {
error(message);
}

@Override
protected void tError(String message, Object... args) {
error(String.format(message, args));
}

@Override
protected void tInfo(String message) {
info(message);
Expand Down
2 changes: 1 addition & 1 deletion src/simpleserver/lang/translations/template.json
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@
"Nobody sent you a message yet." : "Nobody sent you a message yet.",
"Only modes %s and %s allowed!" : "Only modes %s and %s allowed!",
"Open Chest" : "Open Chest",
"Optional 2nd argument must be freeze!" : "Optional 2nd argument must be freeze!",
"Optional 2nd argument must be %s!" : "Optional 2nd argument must be %s!",
"Over all you've been online for %s hours and %s minutes." : "Over all you've been online for %s hours and %s minutes.",
"Player %s has been banned! (%s)" : "Player %s has been banned! (%s)",
"Player %s has been IP banned!" : "Player %s has been IP banned!",
Expand Down

0 comments on commit adabc64

Please sign in to comment.