preparing actions on routes
This commit is contained in:
@@ -5,6 +5,8 @@ import java.lang.reflect.InvocationTargetException;
|
||||
|
||||
import org.json.JSONObject;
|
||||
|
||||
import de.keawe.tools.translations.Translation;
|
||||
import de.srsoftware.web4rail.Application;
|
||||
import de.srsoftware.web4rail.Plan;
|
||||
|
||||
public abstract class Action {
|
||||
@@ -37,4 +39,8 @@ public abstract class Action {
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
protected String t(String tex,Object...fills) {
|
||||
return Translation.get(Application.class, tex, fills);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,4 +27,9 @@ public class SpeedReduction extends RouteAction {
|
||||
json.put(MAX_SPEED, maxSpeed);
|
||||
return json;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return t("Reduce speed to {} km/h",maxSpeed);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user