PneumaticCraft: Repressurized

PneumaticCraft: Repressurized

43M Downloads

[localization]Some in-game text are in-built in code

dovisutu opened this issue ยท 2 comments

commented

Minecraft Version

1.12.2

Forge Version

1.12.2-14.23.5.2838

Mod Version

1.12.2-0.11.4-368

Describe your problem, including steps to reproduce it

Some of the in-game texts are in-built in code, so people can't localize them in their language even if they translated the whole en_us.lang.
For Example, the status of security station (range, security, etc.) in always English despite from the language you chosen, even if it's fully translated.

Any other comments?

I'm a localizer of PneumaticCraft in here, so I'm hoping for the change.
The codes including the problem texts are down here: (I only focused on the security station, so there may be other hard-coded texts I didn't notice.

if (te.getRebootTime() > 0) {
rebootButtonString = te.getRebootTime() % 100 < 50 ? TextFormatting.YELLOW + "Rebooting.." : PneumaticCraftUtils.convertTicksToMinutesAndSeconds(te.getRebootTime(), false);
} else {
rebootButtonString = "Reboot";
}

if (te.getRebootTime() > 0) {
text.add(TextFormatting.WHITE + "The Security Station doesn't provide security!");
text.add(TextFormatting.BLACK + "The station is rebooting (" + PneumaticCraftUtils.convertTicksToMinutesAndSeconds(te.getRebootTime(), false) + ").");
} else if (te.isHacked()) {
text.add(TextFormatting.WHITE + "This Station has been hacked!");
text.add(TextFormatting.BLACK + "Reboot the station.");
}
if (!te.hasValidNetwork()) {
text.add(TextFormatting.GRAY + "Invalid network configuration!");
switch (te.checkForNetworkValidity()) {
case NO_SUBROUTINE:
text.add(TextFormatting.BLACK + "Add a Diagnostic Subroutine.");
break;
case NO_IO_PORT:
text.add(TextFormatting.BLACK + "Add a Network IO Port.");
break;
case NO_REGISTRY:
text.add(TextFormatting.BLACK + "Add a Network Registry.");
break;
case TOO_MANY_SUBROUTINES:
text.add(TextFormatting.BLACK + "There can only be one Diagnostic Subroutine.");
break;
case TOO_MANY_IO_PORTS:
text.add(TextFormatting.BLACK + "There can only be one Network IO Port.");
break;
case TOO_MANY_REGISTRIES:
text.add(TextFormatting.BLACK + "There can only be one Network Registry.");
break;
case NO_CONNECTION_SUB_AND_IO_PORT:
text.add(TextFormatting.BLACK + "The Diagnostic Subroutine and the Network IO Port need to be connected in the network.");
break;
case NO_CONNECTION_IO_PORT_AND_REGISTRY:
text.add(TextFormatting.BLACK + "The Network Registry and the Network IO Port need to be connected in the network.");
break;
}
}

text.add(TextFormatting.WHITE + "Protection");
if (te.getRebootTime() > 0) {
text.add(TextFormatting.DARK_RED + "No protection because of rebooting!");
} else if (te.isHacked()) {
text.add(TextFormatting.DARK_RED + "Hacked by:");
for (GameProfile hacker : te.hackedUsers) {
text.add(TextFormatting.DARK_RED + "\u2022 " + hacker.getName());
}
} else {
text.add(TextFormatting.BLACK + "System secure");
}
text.add(TextFormatting.WHITE + "Security Level");
text.add(TextFormatting.BLACK + "Level " + te.getSecurityLevel());
text.add(TextFormatting.WHITE + "Intruder Detection Chance");
text.add(TextFormatting.BLACK.toString() + te.getDetectionChance() + "%%");
text.add(TextFormatting.WHITE + "Security Range");
text.add(TextFormatting.BLACK.toString() + te.getSecurityRange() + "m (square)");

commented

Yeah, I know. There's a ton of historic hard-coded text which I've been slowly moving into en_us.lang, but there's plenty left to do.

I'll keep this issue open as a reminder...

commented

I think pretty much everything is in the lang file now, closing.