Browse Source

improved translations

lookup-tables
Stephan Richter 5 years ago
parent
commit
494eeddf59
  1. 44
      resources/translations/Application.de.translation
  2. 1
      src/main/java/de/srsoftware/web4rail/Constants.java
  3. 8
      src/main/java/de/srsoftware/web4rail/Plan.java
  4. 4
      src/main/java/de/srsoftware/web4rail/Route.java
  5. 2
      src/main/java/de/srsoftware/web4rail/actions/Action.java
  6. 2
      src/main/java/de/srsoftware/web4rail/actions/ConditionalAction.java
  7. 2
      src/main/java/de/srsoftware/web4rail/actions/DelayedAction.java
  8. 2
      src/main/java/de/srsoftware/web4rail/actions/Loop.java
  9. 2
      src/main/java/de/srsoftware/web4rail/actions/SetDisplayText.java
  10. 2
      src/main/java/de/srsoftware/web4rail/actions/ShowText.java
  11. 2
      src/main/java/de/srsoftware/web4rail/moving/Car.java
  12. 2
      src/main/java/de/srsoftware/web4rail/moving/Locomotive.java
  13. 16
      src/main/java/de/srsoftware/web4rail/moving/Train.java
  14. 4
      src/main/java/de/srsoftware/web4rail/tiles/Decoupler.java
  15. 2
      src/main/java/de/srsoftware/web4rail/tiles/Turnout.java
  16. 4
      src/main/java/de/srsoftware/web4rail/tiles/TurnoutL.java
  17. 4
      src/main/java/de/srsoftware/web4rail/tiles/TurnoutR.java

44
resources/translations/Application.de.translation

@ -1,9 +1,8 @@
abort : abbrechen abort : abbrechen
Accessory : Zubehör Accessory : Zubehör
Actions : Aktionen Actions : Aktionen
Actions\: : Aktionen:
Actions and contacts : Aktionen und Kontakte Actions and contacts : Aktionen und Kontakte
Action type\: : Aktions-Typ Action type : Aktions-Typ
Actions will only fire, if all conditions are fullfilled. : Aktionen werden nur ausgeführt, wenn alle Bedingungen erfüllt sind. Actions will only fire, if all conditions are fullfilled. : Aktionen werden nur ausgeführt, wenn alle Bedingungen erfüllt sind.
ActivateRoute : Route aktivieren ActivateRoute : Route aktivieren
add : hinzufügen add : hinzufügen
@ -11,9 +10,9 @@ add command for {} : Kommando für {} hinzufügen
Added {} : {} hinzugefügt Added {} : {} hinzugefügt
add action : Aktion hinzufügen add action : Aktion hinzufügen
Add action to action list : Aktion zur Liste hinzufügen Add action to action list : Aktion zur Liste hinzufügen
add car\: : Waggon hinzufügen: add car : Waggon hinzufügen
Add condition : Bedingung hinzufügen Add condition : Bedingung hinzufügen
add locomotive\: : Lok hinzufügen: add locomotive : Lok hinzufügen
add new aspect : neues Signalbild hinzufügen add new aspect : neues Signalbild hinzufügen
add new car : neuen Waggon anlegen add new car : neuen Waggon anlegen
Add new custom field : neues benutzerdefiniertes Feld hinzufügen Add new custom field : neues benutzerdefiniertes Feld hinzufügen
@ -23,7 +22,6 @@ Add tag "{}" to train : Markierung "{}" zu Zug hinzufügen
Add tile : Kachel hinzufügen Add tile : Kachel hinzufügen
AddRemoveTag : Markierung hinzufügen/entfernen AddRemoveTag : Markierung hinzufügen/entfernen
Address : Adresse Address : Adresse
Address\: : Adresse:
analyze : analysieren analyze : analysieren
Analyze : analysieren Analyze : analysieren
Analyze may overwrite these routes! : Durch die Analyse können diese Fahrstraßen überschrieben werden! Analyze may overwrite these routes! : Durch die Analyse können diese Fahrstraßen überschrieben werden!
@ -59,7 +57,7 @@ Brake time table : Bremszeit-Tabelle
CarInTrain : Wagen im Zug CarInTrain : Wagen im Zug
Car manager : Waggon-Verwaltung Car manager : Waggon-Verwaltung
CarOrientation : Wagen-Laufrichtung CarOrientation : Wagen-Laufrichtung
Cars\: : Waggons: Cars : Waggons
Click here to add conditions : Hier klicken, um Bedingungen hinzuzufügen Click here to add conditions : Hier klicken, um Bedingungen hinzuzufügen
Click here to select block! : Hier klicken, um Block auszuwählen! Click here to select block! : Hier klicken, um Block auszuwählen!
Click here to select car! : Hier klicken, um Fahrzeug auszuwählen! Click here to select car! : Hier klicken, um Fahrzeug auszuwählen!
@ -75,7 +73,7 @@ Click on a name to edit the entry. : Klicke auf einen Namen, um einen Eintrag zu
Command to send : Kommando, welches gesendet werden soll Command to send : Kommando, welches gesendet werden soll
ConditionalAction : bedingte Aktion ConditionalAction : bedingte Aktion
Conditions : Bedingungen Conditions : Bedingungen
Condition type\: : Bedingungs-Typ: Condition type : Bedingungs-Typ
Connected to {}. : Mit {} verbunden. Connected to {}. : Mit {} verbunden.
Confirmation required : Bestätigung erforderlich Confirmation required : Bestätigung erforderlich
Contact : Kontakt Contact : Kontakt
@ -84,7 +82,6 @@ Control unit : Zentrale
copy : kopieren copy : kopieren
Counterpart : Gegenstück Counterpart : Gegenstück
Create action : Aktion erzeugen Create action : Aktion erzeugen
Current location\: : Aktueller Ort:
Current location : Aufenthaltsort Current location : Aufenthaltsort
Current location\: {} : Aufenthaltsort: {} Current location\: {} : Aufenthaltsort: {}
Current velocity\: {} {} : Aktuelle Geschwindigkeit: {} {} Current velocity\: {} {} : Aktuelle Geschwindigkeit: {} {}
@ -94,7 +91,6 @@ DelayedAction : verzögerte Aktion
delete : entfernen delete : entfernen
delete route : Route löschen delete route : Route löschen
Destination : Ziel Destination : Ziel
Destination\: : Ziel:
Destination\: {} from {} : Ziel: {} von {} Destination\: {} from {} : Ziel: {} von {}
DetermineTrainInBlock : Zug im Block bestimmen DetermineTrainInBlock : Zug im Block bestimmen
Determine, which train is in {} : Bestimmen, welcher Zug sich in {} befindet Determine, which train is in {} : Bestimmen, welcher Zug sich in {} befindet
@ -125,7 +121,7 @@ Faster (10 {}) : 10 {} schneller
Final speed after breaking, before halting : Endgeschwindigkeit nach Bremsvorgang, vor dem Anhalten Final speed after breaking, before halting : Endgeschwindigkeit nach Bremsvorgang, vor dem Anhalten
FinishRoute : Route abschließen FinishRoute : Route abschließen
Firing {} : starte {} Firing {} : starte {}
For each {} do\: : Mit jedem {}: For each {} do : Mit jedem {}
forward : vorwärts forward : vorwärts
Found {} routes. : {} Routen gefunden. Found {} routes. : {} Routen gefunden.
FreeStartBlock : Start-Block freigeben FreeStartBlock : Start-Block freigeben
@ -137,7 +133,7 @@ Height : Höhe
Help : Hilfe Help : Hilfe
Hold : an lassen Hold : an lassen
(id\: {}, length\: {}) : (Id: {}, Länge: {}) (id\: {}, length\: {}) : (Id: {}, Länge: {})
if ({})\: : falls ({}): if ({}) : falls ({})
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. 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.
Falls aktiviert, wird die Strecke anhand von Zug- und Kachel-Länge hinter dem Zug freigegeben, Falls deaktiviert wird die Strecke hinter dem Zug erst bei Abschluss der Route freigegeben. Falls aktiviert, wird die Strecke anhand von Zug- und Kachel-Länge hinter dem Zug freigegeben, Falls deaktiviert wird die Strecke hinter dem Zug erst bei Abschluss der Route freigegeben.
internal contacts : interne Kontakte internal contacts : interne Kontakte
@ -151,14 +147,14 @@ Label for state {} : Beschriftung für Status {}
Last blocks : Letzte Blöcke Last blocks : Letzte Blöcke
learn : lernen learn : lernen
LEFT : links LEFT : links
Left port\: : Port für links Left port : Port für links
Length : Länge Length : Länge
length\: : Länge: length : Länge
length\: {} : Länge: {} length\: {} : Länge: {}
Length unit : Längeneinheit Length unit : Längeneinheit
Locked by {} : Durch {} besetzt Locked by {} : Durch {} besetzt
Locomotive manager : Lok-Verwaltung Locomotive manager : Lok-Verwaltung
Locomotives\: : Lokomotiven: Locomotives : Lokomotiven
Locomotives and cars : Lokomotiven und Waggons Locomotives and cars : Lokomotiven und Waggons
Loop : Wiederholung Loop : Wiederholung
Lower speed limit : Minimale Geschwindigkeit Lower speed limit : Minimale Geschwindigkeit
@ -171,7 +167,7 @@ Maximum train length : maximale Zug-Länge
Minimum delay : minimale Verzögerung Minimum delay : minimale Verzögerung
Minimum and maximum times (in Miliseconds) trains with the respective tag have to wait in this block. : Minamle und maximale Block-Haltezeit (in Millisekunden) für Züge mit der entsprchender Markierung. Minimum and maximum times (in Miliseconds) trains with the respective tag have to wait in this block. : Minamle und maximale Block-Haltezeit (in Millisekunden) für Züge mit der entsprchender Markierung.
Move tiles : Kacheln verschieben Move tiles : Kacheln verschieben
name\: : Name: name : Name
new car : neuer Waggon new car : neuer Waggon
new contact : neuer Kontakt new contact : neuer Kontakt
new direction : neue Fahrtrichtung new direction : neue Fahrtrichtung
@ -187,7 +183,7 @@ No tile moved. : keine Kachel verschoben.
{} not within last {} blocks of train : {} ist nicht in den letzten {} Blöcken des Zugs {} not within last {} blocks of train : {} ist nicht in den letzten {} Blöcken des Zugs
{} now heading for {} : {} ist nun unterwegs nach {} {} now heading for {} : {} ist nun unterwegs nach {}
{} now in auto-mode : {} ist nun im Automatikmodus {} now in auto-mode : {} ist nun im Automatikmodus
Occupied area\: : Belegte Abschnitte: Occupied area : Belegte Abschnitte
Off : Aus Off : Aus
On : An On : An
One of : eine von One of : eine von
@ -224,7 +220,7 @@ reverse : wenden
reverse train : Zug wenden reverse train : Zug wenden
Reversed {}. : {} umgedreht. Reversed {}. : {} umgedreht.
RIGHT : rechts RIGHT : rechts
Right port\: : Port für rechts Right port : Port für rechts
RouteEndBlock : Routen-End-Block RouteEndBlock : Routen-End-Block
Route does not end at {}. : Route endet nicht in {}. Route does not end at {}. : Route endet nicht in {}.
Route ends at {}. : Route endet in {}. Route ends at {}. : Route endet in {}.
@ -238,11 +234,11 @@ SavePlan : Plan speichern
Seek in last : Durchsuche letzte Seek in last : Durchsuche letzte
Select block : Block auswählen Select block : Block auswählen
Select car : Fahrzeug auswählen Select car : Fahrzeug auswählen
Select contact\: : Kotakt auswählen: Select contact : Kotakt auswählen
Select display : Anzeige auswählen Select display : Anzeige auswählen
Select from plan : Auf Plan auswählen Select from plan : Auf Plan auswählen
Select object : Objekt auswählen Select object : Objekt auswählen
Select relay\: : Relais auswählen: Select relay : Relais auswählen
Select state : Status auswählen Select state : Status auswählen
Select train : Zug auswählen Select train : Zug auswählen
Select turnout : Weiche wählen Select turnout : Weiche wählen
@ -286,22 +282,21 @@ Stop autopilot : Autopilot abschalten
Stopsettings : Halte-Einstellungen Stopsettings : Halte-Einstellungen
StopTrain : Zug stoppen StopTrain : Zug stoppen
Stop train immediately : Zug sofort anhalten Stop train immediately : Zug sofort anhalten
Straight port\: : Port für gerade Straight port : Port für gerade
STRAIGHT : gerade STRAIGHT : gerade
SwitchFunction : Funktion schalten SwitchFunction : Funktion schalten
Switch power off : Strom ausschalten Switch power off : Strom ausschalten
Switch power on : Strom anschalten Switch power on : Strom anschalten
SYSTEM : Betriebssystem SYSTEM : Betriebssystem
Tags : Markierungen Tags : Markierungen
Text to display on clients\: : Text, welcher auf den Clients angezeigt werden soll: Text to display on clients : Text, welcher auf den Clients angezeigt werden soll
Text to show on display\: : Text, welcher in der Anzeige dargestellt werden soll: Text to show on display : Text, welcher in der Anzeige dargestellt werden soll
Tile(s) : Kachel(n) Tile(s) : Kachel(n)
Tile(s) moved. : Kachel(n) verschoben. Tile(s) moved. : Kachel(n) verschoben.
Toggle : umschalten Toggle : umschalten
toggle {} : {} umschalten toggle {} : {} umschalten
Toggle power : Stom umschalten Toggle power : Stom umschalten
Train : Zug Train : Zug
Train\: : Zug:
train contains {} : {} ist im Zug train contains {} : {} ist im Zug
train does not contain {} : {} ist nicht im Zug train does not contain {} : {} ist nicht im Zug
train does not have tag "{}" : Zug hat keine Markierung „{}“ train does not have tag "{}" : Zug hat keine Markierung „{}“
@ -316,7 +311,6 @@ train is slower than {} {} : Zug ist langsamer als {} {}
TrainLength : Zug-Länge TrainLength : Zug-Länge
Train manager : Zug-Verwaltung Train manager : Zug-Verwaltung
Trains : Züge Trains : Züge
Trains\: : Züge:
TrainSelect : Zug-Auswahl TrainSelect : Zug-Auswahl
TrainSpeed : Zug-Geschwindigkeit TrainSpeed : Zug-Geschwindigkeit
Train speed : Zug-Geschwindigkeit Train speed : Zug-Geschwindigkeit
@ -345,7 +339,7 @@ Unknown action\: {} : Unbekannte Aktion: {}
unset : ungesetzt unset : ungesetzt
WaitForContact : Auf Kontakt warten WaitForContact : Auf Kontakt warten
Wait for {}, then : auf {} warten, dann Wait for {}, then : auf {} warten, dann
Wait {} ms, then\: : {} ms warten, dann: Wait {} ms, then : {} ms warten, dann
{} waiting {} secs... : {} wartet {} Sekunden... {} waiting {} secs... : {} wartet {} Sekunden...
Wait times : Wartezeiten Wait times : Wartezeiten
Was not able to assign {} to {}! : Konnte {} nicht an {} zuweisen! Was not able to assign {} to {}! : Konnte {} nicht an {} zuweisen!

1
src/main/java/de/srsoftware/web4rail/Constants.java

@ -51,6 +51,7 @@ public interface Constants {
public static final String BLOCK = "block"; public static final String BLOCK = "block";
public static final String COL = " ";
public static final String CONTACT = "contact"; public static final String CONTACT = "contact";
public static final String CONTEXT = "context"; public static final String CONTEXT = "context";
public static final String DEFAULT_SPEED_UNIT = "km/h"; public static final String DEFAULT_SPEED_UNIT = "km/h";

8
src/main/java/de/srsoftware/web4rail/Plan.java

@ -343,9 +343,9 @@ public class Plan extends BaseClass{
Form form = new Form("plan-properties-form"); Form form = new Form("plan-properties-form");
new Input(REALM,REALM_PLAN).hideIn(form); new Input(REALM,REALM_PLAN).hideIn(form);
new Input(ACTION,ACTION_UPDATE).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(LENGTH_UNIT, lengthUnit).addTo(new Label(t("Length unit")+COL)).addTo(form);
new Input(SPEED_UNIT, speedUnit).addTo(new Label(t("Speed unit")+":"+NBSP)).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")+":"+NBSP)).attr("title", t("Final speed after breaking, before halting")).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 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); new Button(t("Save"), form).addTo(form);
form.addTo(fieldset); form.addTo(fieldset);
@ -772,7 +772,7 @@ public class Plan extends BaseClass{
Form form = new Form("rename-form"); Form form = new Form("rename-form");
new Input(REALM, REALM_PLAN).hideIn(form); new Input(REALM, REALM_PLAN).hideIn(form);
new Input(ACTION, RENAME).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); new Button(t("Save"), form).addTo(form);
return form.addTo(win); return form.addTo(win);
} }

4
src/main/java/de/srsoftware/web4rail/Route.java

@ -431,7 +431,7 @@ public class Route extends BaseClass {
Fieldset win = new Fieldset(t("Actions and contacts")); Fieldset win = new Fieldset(t("Actions and contacts"));
Tag list = new Tag("ol"); 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); ActionList setupActions = triggeredActions.get(ROUTE_SETUP);
if (isNull(setupActions)) { if (isNull(setupActions)) {
setupActions = new ActionList(this); setupActions = new ActionList(this);
@ -439,7 +439,7 @@ public class Route extends BaseClass {
} }
setupActions.list().addTo(setup).addTo(list); 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); ActionList startActions = triggeredActions.get(ROUTE_START);
if (isNull(startActions)) { if (isNull(startActions)) {
startActions = new ActionList(this); startActions = new ActionList(this);

2
src/main/java/de/srsoftware/web4rail/actions/Action.java

@ -154,7 +154,7 @@ public abstract class Action extends BaseClass {
} }
for (Entry<String, String> entry : names.entrySet()) select.addOption(entry.getValue(), entry.getKey()); 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) { protected static String t(String tex,Object...fills) {

2
src/main/java/de/srsoftware/web4rail/actions/ConditionalAction.java

@ -85,7 +85,7 @@ public class ConditionalAction extends ActionList {
@Override @Override
public String toString() { public String toString() {
if (conditions.isEmpty()) return "["+t("Click here to add conditions")+"]"; if (conditions.isEmpty()) return "["+t("Click here to add conditions")+"]";
return t("if ({}):",conditions); return t("if ({})",conditions)+COL;
} }
@Override @Override

2
src/main/java/de/srsoftware/web4rail/actions/DelayedAction.java

@ -80,7 +80,7 @@ public class DelayedAction extends ActionList {
@Override @Override
public String toString() { 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 @Override

2
src/main/java/de/srsoftware/web4rail/actions/Loop.java

@ -79,7 +79,7 @@ public class Loop extends ActionList {
} }
public String toString() { public String toString() {
return t("For each {} do:",object); return t("For each {} do",object)+COL;
}; };
private Tag typeSelector() { private Tag typeSelector() {

2
src/main/java/de/srsoftware/web4rail/actions/SetDisplayText.java

@ -34,7 +34,7 @@ public class SetDisplayText extends TextAction{
@Override @Override
protected Label label() { protected Label label() {
return new Label(t("Text to show on display:")+NBSP); return new Label(t("Text to show on display")+COL);
} }
@Override @Override

2
src/main/java/de/srsoftware/web4rail/actions/ShowText.java

@ -18,7 +18,7 @@ public class ShowText extends TextAction{
@Override @Override
protected Label label() { protected Label label() {
return new Label(t("Text to display on clients:")+NBSP); return new Label(t("Text to display on clients")+COL);
} }
@Override @Override

2
src/main/java/de/srsoftware/web4rail/moving/Car.java

@ -213,7 +213,7 @@ public class Car extends BaseClass implements Comparable<Car>{
new Input(ACTION, ACTION_ADD).hideIn(form); new Input(ACTION, ACTION_ADD).hideIn(form);
new Input(REALM,REALM_CAR).hideIn(form); new Input(REALM,REALM_CAR).hideIn(form);
Fieldset fieldset = new Fieldset(t("add new car")); 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); new Button(t("Apply"),form).addTo(fieldset);
fieldset.addTo(form).addTo(win); fieldset.addTo(form).addTo(win);
return win; return win;

2
src/main/java/de/srsoftware/web4rail/moving/Locomotive.java

@ -241,7 +241,7 @@ public class Locomotive extends Car implements Constants,Device{
new Input(ACTION, ACTION_ADD).hideIn(form); new Input(ACTION, ACTION_ADD).hideIn(form);
new Input(REALM,REALM_LOCO).hideIn(form); new Input(REALM,REALM_LOCO).hideIn(form);
Fieldset fieldset = new Fieldset(t("add new locomotive")); 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); new Button(t("Apply"),form).addTo(fieldset);
fieldset.addTo(form).addTo(win); fieldset.addTo(form).addTo(win);
return win; return win;

16
src/main/java/de/srsoftware/web4rail/moving/Train.java

@ -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()); List<Locomotive> locos = BaseClass.listElements(Locomotive.class).stream().filter(loco -> isNull(loco.train())).collect(Collectors.toList());
if (!locos.isEmpty()) { if (!locos.isEmpty()) {
Form addLocoForm = new Form("append-loco-form"); Form addLocoForm = new Form("append-loco-form");
addLocoForm.content(t("add locomotive:")+"&nbsp;"); addLocoForm.content(t("add locomotive")+COL);
new Input(REALM, REALM_TRAIN).hideIn(addLocoForm); new Input(REALM, REALM_TRAIN).hideIn(addLocoForm);
new Input(ACTION, ACTION_ADD).hideIn(addLocoForm); new Input(ACTION, ACTION_ADD).hideIn(addLocoForm);
new Input(ID,id).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()); List<Car> cars = BaseClass.listElements(Car.class).stream().filter(car -> !(car instanceof Locomotive)).filter(loco -> isNull(loco.train())).collect(Collectors.toList());
if (!cars.isEmpty()) { if (!cars.isEmpty()) {
Form addCarForm = new Form("append-car-form"); Form addCarForm = new Form("append-car-form");
addCarForm.content(t("add car:")+"&nbsp;"); addCarForm.content(t("add car")+COL);
new Input(REALM, REALM_TRAIN).hideIn(addCarForm); new Input(REALM, REALM_TRAIN).hideIn(addCarForm);
new Input(ACTION, ACTION_ADD).hideIn(addCarForm); new Input(ACTION, ACTION_ADD).hideIn(addCarForm);
new Input(ID,id).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(ACTION, ACTION_ADD).hideIn(form);
new Input(REALM,REALM_TRAIN).hideIn(form); new Input(REALM,REALM_TRAIN).hideIn(form);
Fieldset fieldset = new Fieldset(t("add new train")); 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); Select select = new Select(LOCO_ID);
BaseClass.listElements(Locomotive.class) BaseClass.listElements(Locomotive.class)
@ -505,7 +505,7 @@ public class Train extends BaseClass implements Comparable<Train> {
.filter(loco -> isNull(loco.train())) .filter(loco -> isNull(loco.train()))
.sorted((l1,l2)->l1.name().compareTo(l2.name())) .sorted((l1,l2)->l1.name().compareTo(l2.name()))
.forEach(loco -> select.addOption(loco.id(),loco.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); new Button(t("Apply"),form).addTo(fieldset);
fieldset.addTo(form).addTo(win); fieldset.addTo(form).addTo(win);
@ -567,13 +567,13 @@ public class Train extends BaseClass implements Comparable<Train> {
carList().addTo(propList); 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; Tag directionLi = null;
if (isSet(direction)) directionLi = new Tag("li").content(t("Direction: heading {}",direction)+NBSP); if (isSet(direction)) directionLi = new Tag("li").content(t("Direction: heading {}",direction)+NBSP);
if (isNull(directionLi)) directionLi = new Tag("li"); 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); 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)) { if (isNull(destination)) {
new Button(t("Select from plan"),"return selectDest("+id+");").addTo(dest); new Button(t("Select from plan"),"return selectDest("+id+");").addTo(dest);
} else { } else {
@ -584,7 +584,7 @@ public class Train extends BaseClass implements Comparable<Train> {
dest.addTo(propList); dest.addTo(propList);
if (isSet(route)) route.link("li", route).addTo(propList); if (isSet(route)) route.link("li", route).addTo(propList);
int ms = maxSpeed(); 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(); SortedSet<String> allTags = tags();
if (!allTags.isEmpty()) { 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); new Tag("li").content(t("length: {}",length())+NBSP+lengthUnit).addTo(propList);
if (!trace.isEmpty()) { 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"); Tag ul = new Tag("ul");
for (Tile tile : trace) new Tag("li").content(tile.toString()).addTo(ul); for (Tile tile : trace) new Tag("li").content(tile.toString()).addTo(ul);
ul.addTo(li).addTo(propList); ul.addTo(li).addTo(propList);

4
src/main/java/de/srsoftware/web4rail/tiles/Decoupler.java

@ -117,8 +117,8 @@ public abstract class Decoupler extends Tile implements Device{
new Radio(PROTOCOL, proto.toString(), t(proto.toString()), proto == protocol).addTo(div); new Radio(PROTOCOL, proto.toString(), t(proto.toString()), proto == protocol).addTo(div);
} }
formInputs.add(t("Protocol"),div); formInputs.add(t("Protocol"),div);
formInputs.add(t("Address:"),new Input(ADDRESS, address).numeric()); formInputs.add(t("Address"),new Input(ADDRESS, address).numeric());
formInputs.add(t("Port:"),new Input(PORT, port).numeric()); formInputs.add(t("Port"),new Input(PORT, port).numeric());
return super.properties(preForm, formInputs, postForm); return super.properties(preForm, formInputs, postForm);
} }

2
src/main/java/de/srsoftware/web4rail/tiles/Turnout.java

@ -122,7 +122,7 @@ public abstract class Turnout extends Tile implements Device{
new Radio(PROTOCOL, proto.toString(), t(proto.toString()), proto == protocol).addTo(div); new Radio(PROTOCOL, proto.toString(), t(proto.toString()), proto == protocol).addTo(div);
} }
formInputs.add(t("Protocol"),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); return super.properties(preForm, formInputs, postForm);
} }

4
src/main/java/de/srsoftware/web4rail/tiles/TurnoutL.java

@ -35,8 +35,8 @@ public abstract class TurnoutL extends Turnout {
@Override @Override
protected Window properties(List<Fieldset> preForm, FormInput formInputs, List<Fieldset> postForm) { protected Window properties(List<Fieldset> preForm, FormInput formInputs, List<Fieldset> postForm) {
formInputs.add(t("Straight port:"),new Input(STRAIGHT, portA).numeric()); formInputs.add(t("Straight port")+COL,new Input(STRAIGHT, portA).numeric());
formInputs.add(t("Left port:"),new Input(LEFT, portB).numeric()); formInputs.add(t("Left port")+COL,new Input(LEFT, portB).numeric());
return super.properties(preForm, formInputs, postForm); return super.properties(preForm, formInputs, postForm);
} }

4
src/main/java/de/srsoftware/web4rail/tiles/TurnoutR.java

@ -36,8 +36,8 @@ public abstract class TurnoutR extends Turnout {
@Override @Override
protected Window properties(List<Fieldset> preForm, FormInput formInputs, List<Fieldset> postForm) { protected Window properties(List<Fieldset> preForm, FormInput formInputs, List<Fieldset> postForm) {
formInputs.add(t("Straight port:"),new Input(STRAIGHT, portA).numeric()); formInputs.add(t("Straight port")+COL,new Input(STRAIGHT, portA).numeric());
formInputs.add(t("Right port:"),new Input(RIGHT, portB).numeric()); formInputs.add(t("Right port")+COL,new Input(RIGHT, portB).numeric());
return super.properties(preForm, formInputs, postForm); return super.properties(preForm, formInputs, postForm);
} }

Loading…
Cancel
Save