Skip to content

Commit

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

if(StatCollector.canTranslate(locString)) {
tipName = tipName.replace(EnumChatFormatting.getTextWithoutFormattingCodes(tipName), StatCollector.translateToLocal(locString));
// re-add the X/Y
Expand Down

0 comments on commit 13ce403

Please sign in to comment.