Skip to content

Commit

Permalink
Merge pull request #10544 from DanielBoudreau/master
Browse files Browse the repository at this point in the history
Minor improvements to the operations build report
  • Loading branch information
danielb987 committed Jan 6, 2022
2 parents 2680302 + 898335e commit c68c6d3
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 25 deletions.
Expand Up @@ -873,8 +873,8 @@ buildTrackNotNewLoad = Departure track ({0}) can''t ship load ({1}) to de
buildTrackNotLoadSchedule = Departure track ({0}) can''t ship load ({1}) to destination ({2}, {3}) schedule id {4}
buildScheduleNotActive = Spur ({0}) schedule id {1} train schedule ({2}) not active for ({3})
buildScheduleRandom = Spur ({0}, {1}) schedule ({2}) id {3} load ({4}) random value {5} is less than generated {6}, skipping this line item
buildNoDestTrackNewLoad = Destination ({0}, {1}) can''t service car ({2}) with load ({3}) due to {4}
BuildDestTrackNoLoad = Destination ({0}, {1}) will not accept car ({2}) with load ({3})
buildNoDestTrackNewLoad = {0} ({1}, {2}) can''t service car ({3}) with load ({4}) due to {5}
buildDestTrackNoLoad = Staging ({0}, {1}) will not accept car ({2}) with load ({3})
buildTrySpurLoad = Try spur ({0}, {1}) custom load ({2})
buildCanNotRouteCar = Can''t route car ({0}) with load ({1}) to ({2}, {3})
buildCarNoCustomLoad = No custom loads available for car ({0}) type ({1})
Expand Down
Expand Up @@ -793,8 +793,8 @@ buildTrackNotNewLoad = Departure track ({0}) can''t ship load ({1}) to de
buildTrackNotLoadSchedule = Departure track ({0}) can''t ship load ({1}) to destination ({2}, {3}) schedule id {4}
buildScheduleNotActive = Spur ({0}) schedule id {1} train schedule ({2}) not active for ({3})
buildScheduleRandom = Spur ({0}, {1}) schedule ({2}) id {3} load ({4}) random value {5} is less than generated {6}, skipping this line item
buildNoDestTrackNewLoad = Destination ({0}, {1}) can''t service car ({2}) with load ({3}) due to {4}
BuildDestTrackNoLoad = Destination ({0}, {1}) will not accept car ({2}) with load ({3})
buildNoDestTrackNewLoad = {0} ({1}, {2}) can''t service car ({3}) with load ({4}) due to {5}
buildDestTrackNoLoad = Staging ({0}, {1}) will not accept car ({2}) with load ({3})
buildTrySpurLoad = Try spur ({0}, {1}) custom load ({2})
buildCanNotRouteCar = Can''t route car ({0}) with load ({1}) to ({2}, {3})
buildCarNoCustomLoad = No custom loads available for car ({0}) type ({1})
Expand Down
Expand Up @@ -810,8 +810,8 @@ buildTrackNotNewLoad = Departure track ({0}) can''t ship load ({1}) to de
buildTrackNotLoadSchedule = Departure track ({0}) can''t ship load ({1}) to destination ({2}, {3}) schedule id {4}
buildScheduleNotActive = Spur ({0}) schedule id {1} train schedule ({2}) not active for ({3})
buildScheduleRandom = Spur ({0}, {1}) schedule ({2}) id {3} load ({4}) random value {5} is less than generated {6}, skipping this line item
buildNoDestTrackNewLoad = Destination ({0}, {1}) can''t service car ({2}) with load ({3}) due to {4}
BuildDestTrackNoLoad = Destination ({0}, {1}) will not accept car ({2}) with load ({3})
buildNoDestTrackNewLoad = {0} ({1}, {2}) can''t service car ({3}) with load ({4}) due to {5}
buildDestTrackNoLoad = Staging ({0}, {1}) will not accept car ({2}) with load ({3})
buildTrySpurLoad = Try spur ({0}, {1}) custom load ({2})
buildCanNotRouteCar = Can''t route car ({0}) with load ({1}) to ({2}, {3})
buildCarNoCustomLoad = No custom loads available for car ({0}) type ({1})
Expand Down
Expand Up @@ -314,9 +314,8 @@ buildCanNotDropLocation = Wagon ({0}) type ({1}) isn''t serviced by destinat

buildScheduleNotActive = Siding ({0}) schedule id {1} train schedule ({2}) not active for ({3})
buildScheduleRandom = Siding ({0}, {1}) schedule ({2}) id {3} load ({4}) random value {5} is less than generated {6}, skipping this line item
buildNoDestTrackNewLoad = Destination ({0}, {1}) can''t service wagon ({2}) with load ({3}) due to {4}
BuildDestTrackNoLoad = Destination ({0}, {1}) will not accept wagon ({2}) with load ({3})

buildNoDestTrackNewLoad = {0} ({1}, {2}) can''t service wagon ({3}) with load ({4}) due to {5}
buildDestTrackNoLoad = Fiddle yard ({0}, {1}) will not accept wagon ({2}) with load ({3})
buildCanNotRouteCar = Can''t route wagon ({0}) with load ({1}) to ({2}, {3})
buildCarNoCustomLoad = No custom loads available for wagon ({0}) type ({1})
buildUnableNewLoad = Could not find a route to a siding that needs a custom load for wagon ({0})
Expand Down
Expand Up @@ -833,8 +833,8 @@ buildTrackNotNewLoad = Voie de d\u00e9part ({0}) Impossible d'exp\u00e9di
buildTrackNotLoadSchedule = Voie de d\u00e9part ({0}) Impossible d'exp\u00e9dier la charge ({1}) \u00e0 destination ({2}, {3}) annexe id {4}
buildScheduleNotActive = La voie ({0}) annexe id {1} horaire ({2}) n'est pas active pour ({3})
buildScheduleRandom = Voie ({0}, {1}) planning ({2}) id {3} valeur al\u00e9atoire {5} est inf\u00e9rieure \u00e0 celle g\u00e9n\u00e9r\u00e9e {6}
buildNoDestTrackNewLoad = Destination ({0}, {1}) Impossible d'acheminer le wagon ({2}) avec une charge ({3}) en raison de {4}
BuildDestTrackNoLoad = Destination ({0}, {1}) n'acceptera pas de wagon ({2}) avec une charge ({3})
buildNoDestTrackNewLoad = {0} ({1}, {2}) Impossible d'acheminer le wagon ({3}) avec une charge ({4}) en raison de {5}
buildDestTrackNoLoad = Destination ({0}, {1}) n'acceptera pas de wagon ({2}) avec une charge ({3})
buildTrySpurLoad = Essayez l'embranchement ({0}, {1}) Charge ({2})
buildCanNotRouteCar = Itin\u00e9raire wagon ({0}) impossible avec une charge ({1}) \u00e0({2}, {3})
buildCarNoCustomLoad = Le wagon ({0}) type ({1}) n'a pas de charge personnalis\u00e9e
Expand Down
Expand Up @@ -717,8 +717,8 @@ buildTrainNotNewLoad = Treno ({0}) non serve carico ({1}) con destinazion
buildTrackNotNewLoad = Binario di partenza ({0}) non pu\u00f2 inviare carico ({1}) alla destinazione ({2}, {3})
buildTrackNotLoadSchedule = Binario di partenza ({0}) non pu\u00f2 inviare carico ({1}) alla destinazione ({2}, {3}) id pianificazione {4}
buildScheduleNotActive = Binario ({0}) id pianificazione {1} orario ({2}) non attivo per ({3})
buildNoDestTrackNewLoad = Destinazione ({0}, {1}) non pu\u00f2 servire il carro ({2}) con carico ({3}) perch\u00e8 {4}
BuildDestTrackNoLoad = Destinazione ({0}, {1}) non pu\u00f2 accettare carro ({2}) con carico ({3})
buildNoDestTrackNewLoad = {0} ({1}, {2}) non pu\u00f2 servire il carro ({3}) con carico ({4}) perch\u00e8 {5}
buildDestTrackNoLoad = Destinazione ({0}, {1}) non pu\u00f2 accettare carro ({2}) con carico ({3})
buildTrySpurLoad = Provo raccordo ({0}, {1}) carico ({2})
buildCanNotRouteCar = Non posso instradare carro ({0}) con carico ({1}) verso ({2}, {3})
buildCarNoCustomLoad = Carro ({0}) tipo ({1}) non ha carico personalizzato
Expand Down
23 changes: 12 additions & 11 deletions java/src/jmri/jmrit/operations/trains/TrainBuilder.java
Expand Up @@ -9,6 +9,7 @@

import javax.swing.JOptionPane;

import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

Expand Down Expand Up @@ -1189,8 +1190,8 @@ private boolean generateCarLoadFromStaging(Car car, RouteLocation rld) throws Bu
if (!status.equals(Track.OKAY) && !status.startsWith(Track.LENGTH)) {
addLine(_buildReport, SEVEN,
MessageFormat.format(Bundle.getMessage("buildNoDestTrackNewLoad"),
new Object[] { track.getLocation().getName(), track.getName(), car.toString(),
si.getReceiveLoadName(), status }));
new Object[] { StringUtils.capitalize(track.getTrackTypeName()), track.getLocation().getName(), track.getName(),
car.toString(), si.getReceiveLoadName(), status }));
// restore car's load
car.setLoadName(oldCarLoad);
continue;
Expand Down Expand Up @@ -1623,8 +1624,8 @@ private boolean sendCarToDestinationSpur(Car car, Track track) {
if (!status.startsWith(Track.LENGTH) || !track.checkSchedule(car).equals(Track.OKAY)) {
addLine(_buildReport, SEVEN,
MessageFormat.format(Bundle.getMessage("buildNoDestTrackNewLoad"),
new Object[] { track.getLocation().getName(), track.getName(), car.toString(),
car.getLoadName(), status }));
new Object[] { StringUtils.capitalize(track.getTrackTypeName()), track.getLocation().getName(), track.getName(),
car.toString(), car.getLoadName(), status }));
return false;
}
if (track.getAlternateTrack() == null) {
Expand Down Expand Up @@ -1721,8 +1722,8 @@ private boolean sendCarToDestinationTrack(Car car, Track track) {
if (!status.equals(Track.OKAY)) {
addLine(_buildReport, SEVEN,
MessageFormat.format(Bundle.getMessage("buildNoDestTrackNewLoad"),
new Object[] { track.getLocation().getName(), track.getName(), car.toString(),
car.getLoadName(), status }));
new Object[] { StringUtils.capitalize(track.getTrackTypeName()), track.getLocation().getName(), track.getName(),
car.toString(), car.getLoadName(), status }));
return false;
}
if (!track.isSpaceAvailable(car)) {
Expand Down Expand Up @@ -1810,9 +1811,9 @@ private boolean checkCarForFinalDestination(Car car) {
!(status.contains(Track.CUSTOM) && status.contains(Track.LOAD))) {
addLine(_buildReport, SEVEN,
MessageFormat.format(Bundle.getMessage("buildNoDestTrackNewLoad"),
new Object[] { car.getFinalDestination().getName(),
car.getFinalDestinationTrack().getName(), car.toString(), car.getLoadName(),
status }));
new Object[] { StringUtils.capitalize(car.getFinalDestinationTrack().getTrackTypeName()),
car.getFinalDestination().getName(), car.getFinalDestinationTrack().getName(),
car.toString(), car.getLoadName(), status }));
// is this car or kernel being sent to a track that is too short?
if (status.startsWith(Track.CAPACITY)) {
// track is too short for this car or kernel, can never go there
Expand Down Expand Up @@ -1882,8 +1883,8 @@ private boolean checkCarForDestination(Car car, RouteLocation rl, int routeIndex
if (car.getDestination() == null) {
return false; // the only false return
}
addLine(_buildReport, SEVEN, MessageFormat.format(Bundle.getMessage("buildCarHasAssignedDest"),
new Object[] { car.toString(), car.getLoadName(), car.getDestinationName(), car.getDestinationTrackName() }));
addLine(_buildReport, SEVEN, MessageFormat.format(Bundle.getMessage("buildCarHasAssignedDest"), new Object[] {
car.toString(), car.getLoadName(), car.getDestinationName(), car.getDestinationTrackName() }));
RouteLocation rld = _train.getRoute().getLastLocationByName(car.getDestinationName());
if (rld == null) {
// code check, router doesn't set a car's destination if not carried by train
Expand Down
Expand Up @@ -2941,7 +2941,7 @@ protected boolean generateLoadCarDepartingAndTerminatingIntoStaging(Car car, Tra
}
if (!stageTrack.isLoadNameAndCarTypeAccepted(load, car.getTypeName())) {
addLine(_buildReport, SEVEN,
MessageFormat.format(Bundle.getMessage("BuildDestTrackNoLoad"), new Object[] {
MessageFormat.format(Bundle.getMessage("buildDestTrackNoLoad"), new Object[] {
stageTrack.getLocation().getName(), stageTrack.getName(), car.toString(), load, }));
}
if (!_train.isLoadNameAccepted(load, car.getTypeName())) {
Expand Down

0 comments on commit c68c6d3

Please sign in to comment.