improved translations
This commit is contained in:
@@ -51,6 +51,7 @@ public interface Constants {
|
||||
|
||||
|
||||
public static final String BLOCK = "block";
|
||||
public static final String COL = " ";
|
||||
public static final String CONTACT = "contact";
|
||||
public static final String CONTEXT = "context";
|
||||
public static final String DEFAULT_SPEED_UNIT = "km/h";
|
||||
|
||||
@@ -343,9 +343,9 @@ public class Plan extends BaseClass{
|
||||
Form form = new Form("plan-properties-form");
|
||||
new Input(REALM,REALM_PLAN).hideIn(form);
|
||||
new Input(ACTION,ACTION_UPDATE).hideIn(form);
|
||||
new Input(LENGTH_UNIT, lengthUnit).addTo(new Label(t("Length unit")+":"+NBSP)).addTo(form);
|
||||
new Input(SPEED_UNIT, speedUnit).addTo(new Label(t("Speed unit")+":"+NBSP)).addTo(form);
|
||||
new Input(FINAL_SPEED, Route.endSpeed).addTo(new Label(t("Lower speed limit")+":"+NBSP)).attr("title", t("Final speed after breaking, before halting")).addTo(form);
|
||||
new Input(LENGTH_UNIT, lengthUnit).addTo(new Label(t("Length unit")+COL)).addTo(form);
|
||||
new Input(SPEED_UNIT, speedUnit).addTo(new Label(t("Speed unit")+COL)).addTo(form);
|
||||
new Input(FINAL_SPEED, Route.endSpeed).addTo(new Label(t("Lower speed limit")+COL)).attr("title", t("Final speed after breaking, before halting")).addTo(form);
|
||||
new Checkbox(FREE_BEHIND_TRAIN, t("Free tiles behind train"), Route.freeBehindTrain).attr("title", t("If checked, tiles behind the train are freed according to the length of the train and the tiles. If it is unchecked, tiles will not get free before route is finished.")).addTo(form);
|
||||
new Button(t("Save"), form).addTo(form);
|
||||
form.addTo(fieldset);
|
||||
@@ -772,7 +772,7 @@ public class Plan extends BaseClass{
|
||||
Form form = new Form("rename-form");
|
||||
new Input(REALM, REALM_PLAN).hideIn(form);
|
||||
new Input(ACTION, RENAME).hideIn(form);
|
||||
new Input(NAME,name).addTo(new Label(t("Enter new name for plan")+":"+NBSP)).addTo(form);
|
||||
new Input(NAME,name).addTo(new Label(t("Enter new name for plan")+COL)).addTo(form);
|
||||
new Button(t("Save"), form).addTo(form);
|
||||
return form.addTo(win);
|
||||
}
|
||||
|
||||
@@ -431,7 +431,7 @@ public class Route extends BaseClass {
|
||||
Fieldset win = new Fieldset(t("Actions and contacts"));
|
||||
Tag list = new Tag("ol");
|
||||
|
||||
Tag setup = new Tag("li").content(t("Setup actions")+NBSP);
|
||||
Tag setup = new Tag("li").content(t("Setup actions")+COL);
|
||||
ActionList setupActions = triggeredActions.get(ROUTE_SETUP);
|
||||
if (isNull(setupActions)) {
|
||||
setupActions = new ActionList(this);
|
||||
@@ -439,7 +439,7 @@ public class Route extends BaseClass {
|
||||
}
|
||||
setupActions.list().addTo(setup).addTo(list);
|
||||
|
||||
Tag start = new Tag("li").content(t("Start actions")+NBSP);
|
||||
Tag start = new Tag("li").content(t("Start actions")+COL);
|
||||
ActionList startActions = triggeredActions.get(ROUTE_START);
|
||||
if (isNull(startActions)) {
|
||||
startActions = new ActionList(this);
|
||||
|
||||
@@ -154,7 +154,7 @@ public abstract class Action extends BaseClass {
|
||||
}
|
||||
|
||||
for (Entry<String, String> entry : names.entrySet()) select.addOption(entry.getValue(), entry.getKey());
|
||||
return select.addTo(new Label(t("Action type:")+NBSP));
|
||||
return select.addTo(new Label(t("Action type")+COL));
|
||||
}
|
||||
|
||||
protected static String t(String tex,Object...fills) {
|
||||
|
||||
@@ -85,7 +85,7 @@ public class ConditionalAction extends ActionList {
|
||||
@Override
|
||||
public String toString() {
|
||||
if (conditions.isEmpty()) return "["+t("Click here to add conditions")+"]";
|
||||
return t("if ({}):",conditions);
|
||||
return t("if ({})",conditions)+COL;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -80,7 +80,7 @@ public class DelayedAction extends ActionList {
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return t("Wait {} ms, then:",min_delay < max_delay ? min_delay+"…"+max_delay : min_delay);
|
||||
return t("Wait {} ms, then",min_delay < max_delay ? min_delay+"…"+max_delay : min_delay)+COL;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -79,7 +79,7 @@ public class Loop extends ActionList {
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return t("For each {} do:",object);
|
||||
return t("For each {} do",object)+COL;
|
||||
};
|
||||
|
||||
private Tag typeSelector() {
|
||||
|
||||
@@ -34,7 +34,7 @@ public class SetDisplayText extends TextAction{
|
||||
|
||||
@Override
|
||||
protected Label label() {
|
||||
return new Label(t("Text to show on display:")+NBSP);
|
||||
return new Label(t("Text to show on display")+COL);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -18,7 +18,7 @@ public class ShowText extends TextAction{
|
||||
|
||||
@Override
|
||||
protected Label label() {
|
||||
return new Label(t("Text to display on clients:")+NBSP);
|
||||
return new Label(t("Text to display on clients")+COL);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -213,7 +213,7 @@ public class Car extends BaseClass implements Comparable<Car>{
|
||||
new Input(ACTION, ACTION_ADD).hideIn(form);
|
||||
new Input(REALM,REALM_CAR).hideIn(form);
|
||||
Fieldset fieldset = new Fieldset(t("add new car"));
|
||||
new Input(Locomotive.NAME, t("new car")).addTo(new Label(t("Name:")+NBSP)).addTo(fieldset);
|
||||
new Input(Locomotive.NAME, t("new car")).addTo(new Label(t("Name")+COL)).addTo(fieldset);
|
||||
new Button(t("Apply"),form).addTo(fieldset);
|
||||
fieldset.addTo(form).addTo(win);
|
||||
return win;
|
||||
|
||||
@@ -241,7 +241,7 @@ public class Locomotive extends Car implements Constants,Device{
|
||||
new Input(ACTION, ACTION_ADD).hideIn(form);
|
||||
new Input(REALM,REALM_LOCO).hideIn(form);
|
||||
Fieldset fieldset = new Fieldset(t("add new locomotive"));
|
||||
new Input(Locomotive.NAME, t("new locomotive")).addTo(new Label(t("Name:")+NBSP)).addTo(fieldset);
|
||||
new Input(Locomotive.NAME, t("new locomotive")).addTo(new Label(t("Name")+COL)).addTo(fieldset);
|
||||
new Button(t("Apply"),form).addTo(fieldset);
|
||||
fieldset.addTo(form).addTo(win);
|
||||
return win;
|
||||
|
||||
@@ -285,7 +285,7 @@ public class Train extends BaseClass implements Comparable<Train> {
|
||||
List<Locomotive> locos = BaseClass.listElements(Locomotive.class).stream().filter(loco -> isNull(loco.train())).collect(Collectors.toList());
|
||||
if (!locos.isEmpty()) {
|
||||
Form addLocoForm = new Form("append-loco-form");
|
||||
addLocoForm.content(t("add locomotive:")+" ");
|
||||
addLocoForm.content(t("add locomotive")+COL);
|
||||
new Input(REALM, REALM_TRAIN).hideIn(addLocoForm);
|
||||
new Input(ACTION, ACTION_ADD).hideIn(addLocoForm);
|
||||
new Input(ID,id).hideIn(addLocoForm);
|
||||
@@ -299,7 +299,7 @@ public class Train extends BaseClass implements Comparable<Train> {
|
||||
List<Car> cars = BaseClass.listElements(Car.class).stream().filter(car -> !(car instanceof Locomotive)).filter(loco -> isNull(loco.train())).collect(Collectors.toList());
|
||||
if (!cars.isEmpty()) {
|
||||
Form addCarForm = new Form("append-car-form");
|
||||
addCarForm.content(t("add car:")+" ");
|
||||
addCarForm.content(t("add car")+COL);
|
||||
new Input(REALM, REALM_TRAIN).hideIn(addCarForm);
|
||||
new Input(ACTION, ACTION_ADD).hideIn(addCarForm);
|
||||
new Input(ID,id).hideIn(addCarForm);
|
||||
@@ -497,7 +497,7 @@ public class Train extends BaseClass implements Comparable<Train> {
|
||||
new Input(ACTION, ACTION_ADD).hideIn(form);
|
||||
new Input(REALM,REALM_TRAIN).hideIn(form);
|
||||
Fieldset fieldset = new Fieldset(t("add new train"));
|
||||
new Input(Train.NAME, t("new train")).addTo(new Label(t("Name:")+NBSP)).addTo(fieldset);
|
||||
new Input(Train.NAME, t("new train")).addTo(new Label(t("Name")+COL)).addTo(fieldset);
|
||||
|
||||
Select select = new Select(LOCO_ID);
|
||||
BaseClass.listElements(Locomotive.class)
|
||||
@@ -505,7 +505,7 @@ public class Train extends BaseClass implements Comparable<Train> {
|
||||
.filter(loco -> isNull(loco.train()))
|
||||
.sorted((l1,l2)->l1.name().compareTo(l2.name()))
|
||||
.forEach(loco -> select.addOption(loco.id(),loco.name()));
|
||||
select.addTo(new Label(t("Locomotive:")+NBSP)).addTo(fieldset);
|
||||
select.addTo(new Label(t("Locomotive")+COL)).addTo(fieldset);
|
||||
|
||||
new Button(t("Apply"),form).addTo(fieldset);
|
||||
fieldset.addTo(form).addTo(win);
|
||||
@@ -567,13 +567,13 @@ public class Train extends BaseClass implements Comparable<Train> {
|
||||
|
||||
carList().addTo(propList);
|
||||
|
||||
if (isSet(currentBlock)) currentBlock.button(currentBlock.toString()).addTo(new Tag("li").content(t("Current location:")+NBSP)).addTo(propList);
|
||||
if (isSet(currentBlock)) currentBlock.button(currentBlock.toString()).addTo(new Tag("li").content(t("Current location")+COL)).addTo(propList);
|
||||
Tag directionLi = null;
|
||||
if (isSet(direction)) directionLi = new Tag("li").content(t("Direction: heading {}",direction)+NBSP);
|
||||
if (isNull(directionLi)) directionLi = new Tag("li");
|
||||
button(t("reverse"), Map.of(ACTION,ACTION_REVERSE)).title(t("Turns the train, as if it went through a loop.")).addTo(directionLi).addTo(propList);
|
||||
|
||||
Tag dest = new Tag("li").content(t("Destination:")+NBSP);
|
||||
Tag dest = new Tag("li").content(t("Destination")+COL);
|
||||
if (isNull(destination)) {
|
||||
new Button(t("Select from plan"),"return selectDest("+id+");").addTo(dest);
|
||||
} else {
|
||||
@@ -584,7 +584,7 @@ public class Train extends BaseClass implements Comparable<Train> {
|
||||
dest.addTo(propList);
|
||||
if (isSet(route)) route.link("li", route).addTo(propList);
|
||||
int ms = maxSpeed();
|
||||
if (ms < Integer.MAX_VALUE) new Tag("li").content(t("Maximum Speed")+": "+maxSpeed()+NBSP+speedUnit).addTo(propList);
|
||||
if (ms < Integer.MAX_VALUE) new Tag("li").content(t("Maximum Speed")+COL+maxSpeed()+NBSP+speedUnit).addTo(propList);
|
||||
|
||||
SortedSet<String> allTags = tags();
|
||||
if (!allTags.isEmpty()) {
|
||||
@@ -595,7 +595,7 @@ public class Train extends BaseClass implements Comparable<Train> {
|
||||
new Tag("li").content(t("length: {}",length())+NBSP+lengthUnit).addTo(propList);
|
||||
|
||||
if (!trace.isEmpty()) {
|
||||
Tag li = new Tag("li").content(t("Occupied area:"));
|
||||
Tag li = new Tag("li").content(t("Occupied area")+COL);
|
||||
Tag ul = new Tag("ul");
|
||||
for (Tile tile : trace) new Tag("li").content(tile.toString()).addTo(ul);
|
||||
ul.addTo(li).addTo(propList);
|
||||
|
||||
@@ -117,8 +117,8 @@ public abstract class Decoupler extends Tile implements Device{
|
||||
new Radio(PROTOCOL, proto.toString(), t(proto.toString()), proto == protocol).addTo(div);
|
||||
}
|
||||
formInputs.add(t("Protocol"),div);
|
||||
formInputs.add(t("Address:"),new Input(ADDRESS, address).numeric());
|
||||
formInputs.add(t("Port:"),new Input(PORT, port).numeric());
|
||||
formInputs.add(t("Address"),new Input(ADDRESS, address).numeric());
|
||||
formInputs.add(t("Port"),new Input(PORT, port).numeric());
|
||||
|
||||
return super.properties(preForm, formInputs, postForm);
|
||||
}
|
||||
|
||||
@@ -122,7 +122,7 @@ public abstract class Turnout extends Tile implements Device{
|
||||
new Radio(PROTOCOL, proto.toString(), t(proto.toString()), proto == protocol).addTo(div);
|
||||
}
|
||||
formInputs.add(t("Protocol"),div);
|
||||
formInputs.add(t("Address:"),new Input(ADDRESS, address).numeric());
|
||||
formInputs.add(t("Address"),new Input(ADDRESS, address).numeric());
|
||||
return super.properties(preForm, formInputs, postForm);
|
||||
}
|
||||
|
||||
|
||||
@@ -35,8 +35,8 @@ public abstract class TurnoutL extends Turnout {
|
||||
|
||||
@Override
|
||||
protected Window properties(List<Fieldset> preForm, FormInput formInputs, List<Fieldset> postForm) {
|
||||
formInputs.add(t("Straight port:"),new Input(STRAIGHT, portA).numeric());
|
||||
formInputs.add(t("Left port:"),new Input(LEFT, portB).numeric());
|
||||
formInputs.add(t("Straight port")+COL,new Input(STRAIGHT, portA).numeric());
|
||||
formInputs.add(t("Left port")+COL,new Input(LEFT, portB).numeric());
|
||||
return super.properties(preForm, formInputs, postForm);
|
||||
}
|
||||
|
||||
|
||||
@@ -36,8 +36,8 @@ public abstract class TurnoutR extends Turnout {
|
||||
|
||||
@Override
|
||||
protected Window properties(List<Fieldset> preForm, FormInput formInputs, List<Fieldset> postForm) {
|
||||
formInputs.add(t("Straight port:"),new Input(STRAIGHT, portA).numeric());
|
||||
formInputs.add(t("Right port:"),new Input(RIGHT, portB).numeric());
|
||||
formInputs.add(t("Straight port")+COL,new Input(STRAIGHT, portA).numeric());
|
||||
formInputs.add(t("Right port")+COL,new Input(RIGHT, portB).numeric());
|
||||
return super.properties(preForm, formInputs, postForm);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user