Skip to content

Commit 877d6e6

Browse files
authored
Merge pull request #8342 from IllianiBird/fixedTypoInMRMS
Fix: Fixed Typo in Mass Repair, Mass Salvage Reporting
2 parents ac1661b + 1f9ef11 commit 877d6e6

File tree

2 files changed

+16
-9
lines changed

2 files changed

+16
-9
lines changed

MekHQ/resources/mekhq/resources/MRMS.properties

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,3 +141,5 @@ Completed.title=Completed
141141
Completed.text=Mass Repair complete
142142
Completed.repairCount.text=- {0} repair action performed
143143
Completed.repairCountPlural.text=- {0} repair actions performed
144+
inProgress.one=There is still {0}<b>1</b>{1} part that is not being worked on.
145+
inProgress.many=There are still {0}<b>{1}</b>{2} parts that are not being worked on.

MekHQ/src/mekhq/service/mrms/MRMSService.java

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,11 @@
3232
*/
3333
package mekhq.service.mrms;
3434

35+
import static mekhq.utilities.MHQInternationalization.getFormattedTextAt;
36+
import static mekhq.utilities.ReportingUtilities.CLOSING_SPAN_TAG;
37+
import static mekhq.utilities.ReportingUtilities.getWarningColor;
38+
import static mekhq.utilities.ReportingUtilities.spanOpeningWithCustomColor;
39+
3540
import java.text.MessageFormat;
3641
import java.util.ArrayList;
3742
import java.util.Comparator;
@@ -71,6 +76,8 @@
7176
public class MRMSService {
7277
private static final MMLogger LOGGER = MMLogger.create(MRMSService.class);
7378

79+
private static final String RESOURCE_BUNDLE = "mekhq.resources.MRMSService";
80+
@Deprecated(since = "0.50.10")
7481
private static final ResourceBundle resources = ResourceBundle.getBundle("mekhq.resources.MRMS",
7582
MekHQ.getMHQOptions().getLocale());
7683

@@ -211,14 +218,12 @@ public static String performSingleUnitMRMS(Campaign campaign, Unit unit) {
211218
parts = filterParts(parts, null, techs, campaign);
212219

213220
if (!parts.isEmpty()) {
221+
String color = spanOpeningWithCustomColor(getWarningColor());
214222
if (parts.size() == 1) {
215-
campaign.addReport("<font color='" + ReportingUtilities.getNegativeColor()
216-
+ "'>There in still 1 part that is not being worked on.</font>");
223+
campaign.addReport(getFormattedTextAt(RESOURCE_BUNDLE, "inProgress.one", color, CLOSING_SPAN_TAG));
217224
} else {
218-
campaign.addReport(String.format(
219-
"<font color='" + ReportingUtilities.getNegativeColor()
220-
+ "'>There are still %s parts that are not being worked on.</font>",
221-
parts.size()));
225+
campaign.addReport(getFormattedTextAt(RESOURCE_BUNDLE, "inProgress.many", color, parts.size(),
226+
CLOSING_SPAN_TAG));
222227
}
223228
}
224229
}
@@ -371,7 +376,7 @@ public static void mrmsUnits(Campaign campaign, List<Unit> units, MRMSConfigured
371376
if (count > 0) {
372377
if (count == 1) {
373378
campaign.addReport("<font color='" + ReportingUtilities.getNegativeColor()
374-
+ "'>There in still 1 part that is not being worked on.</font>");
379+
+ "'>There is still 1 part that is not being worked on.</font>");
375380
} else {
376381
campaign.addReport(String.format(
377382
"<font color='" + ReportingUtilities.getNegativeColor()
@@ -646,14 +651,14 @@ private static MRMSUnitAction performUnitMassTechAction(Campaign campaign, Unit
646651
if (unfixable) {
647652
campaign.addReport(String.format(
648653
"<font color='" +
649-
ReportingUtilities.getWarningColor()
654+
getWarningColor()
650655
+
651656
"'>Found an unfixable limb (%s) on %s which contains %s parts. Going to remove all parts and scrap the limb before proceeding with other repairs.</font>",
652657
loc.getName(), unit.getName(), countOfPartsPerLocation.get(locId)));
653658
} else {
654659
campaign.addReport(String.format(
655660
"<font color='" +
656-
ReportingUtilities.getWarningColor()
661+
getWarningColor()
657662
+
658663
"'>Found missing location (%s) on %s which contains %s parts. Going to remove all parts before proceeding with other repairs.</font>",
659664
loc != null ? loc.getName() : Integer.toString(locId), unit.getName(),

0 commit comments

Comments
 (0)