Skip to content

Commit

Permalink
Another fix for the modifier localization hack.
Browse files Browse the repository at this point in the history
  • Loading branch information
bonii-xx committed Jan 5, 2015
1 parent 3dd9ee8 commit 4badd85
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/main/java/tconstruct/tools/gui/ToolStationGuiHelper.java
Expand Up @@ -159,12 +159,15 @@ private static void drawModifiers(NBTTagCompound tags)
String tipName = tags.getString(tooltip + tipNum);
String locString = "modifier.toolstation." + EnumChatFormatting.getTextWithoutFormattingCodes(tipName);
// strip out the '(X of Y)' in some for the localization strings.. sigh
int bracket = locString.indexOf(" (");
int bracket = locString.indexOf("(");
if(bracket > 0)
locString = locString.substring(0, bracket);
locString = locString.replace(" ", "");
if(StatCollector.canTranslate(locString))
tipName = tipName.replace(EnumChatFormatting.getTextWithoutFormattingCodes(tipName), StatCollector.translateToLocal(locString));
if(StatCollector.canTranslate(locString)) {
tipName = tipName.replace(EnumChatFormatting.getTextWithoutFormattingCodes(tipName), StatCollector.translateToLocal(locString));
if(bracket > 0)
tipName += " " + tipName.substring(bracket);
}
write("- " + tipName);
tipNum++;
}
Expand Down

0 comments on commit 4badd85

Please sign in to comment.