diff --git a/game-app/game-core/src/main/java/games/strategy/triplea/delegate/AbstractPlaceDelegate.java b/game-app/game-core/src/main/java/games/strategy/triplea/delegate/AbstractPlaceDelegate.java index 88252155560..532c6deb399 100644 --- a/game-app/game-core/src/main/java/games/strategy/triplea/delegate/AbstractPlaceDelegate.java +++ b/game-app/game-core/src/main/java/games/strategy/triplea/delegate/AbstractPlaceDelegate.java @@ -612,18 +612,15 @@ protected String canProduce( if (errorP != null) { failingProducers.add(producer); // do not include the error for same territory, if water, because users do not want to see - // this error report for - // 99.9% of games + // this error report for 99.9% of games if (!(producer.equals(to) && producer.isWater())) { - error.append(", ").append(errorP); + error.append(errorP).append(".\n"); } } } if (producers.size() == failingProducers.size()) { - return "Adjacent territories to " - + to.getName() - + " cannot produce, due to: \n " - + error.toString().replaceFirst(", ", ""); + return String.format( + "Adjacent territories to %s cannot produce because:\n\n%s", to.getName(), error); } return null; } diff --git a/game-app/game-headed/src/main/java/games/strategy/triplea/ui/PlacePanel.java b/game-app/game-headed/src/main/java/games/strategy/triplea/ui/PlacePanel.java index 10115eb8eb2..521b950778e 100644 --- a/game-app/game-headed/src/main/java/games/strategy/triplea/ui/PlacePanel.java +++ b/game-app/game-headed/src/main/java/games/strategy/triplea/ui/PlacePanel.java @@ -243,8 +243,8 @@ private PlaceableUnits getUnitsToPlace(final Territory territory) { if (production.isError()) { JOptionPane.showMessageDialog( getTopLevelAncestor(), - production.getErrorMessage(), - "No units", + production.getErrorMessage() + "\n\n", + "Cannot produce units", JOptionPane.INFORMATION_MESSAGE); } return production;