Merge pull request #1217 from Antifluxfield/patch-3

Improve i18n of machine tooltips
This commit is contained in:
Blood-Asp 2017-09-14 19:34:45 +02:00 committed by GitHub
commit 7e50c16404
4 changed files with 13 additions and 8 deletions

View file

@ -296,7 +296,7 @@ public class GT_MetaPipeEntity_Cable extends MetaPipeEntity implements IMetaTile
return new String[]{
"Max Voltage: %%%" + EnumChatFormatting.GREEN + mVoltage + " (" + VN[GT_Utility.getTier(mVoltage)] + ")" + EnumChatFormatting.GRAY,
"Max Amperage: %%%" + EnumChatFormatting.YELLOW + mAmperage + EnumChatFormatting.GRAY,
"Loss/Meter/Ampere: %%%" + EnumChatFormatting.RED + mCableLossPerMeter + EnumChatFormatting.GRAY + " EU-Volt"
"Loss/Meter/Ampere: %%%" + EnumChatFormatting.RED + mCableLossPerMeter + EnumChatFormatting.GRAY + "%%% EU-Volt"
};
}

View file

@ -402,8 +402,8 @@ public class GT_MetaPipeEntity_Fluid extends MetaPipeEntity {
@Override
public String[] getDescription() {
return new String[]{
EnumChatFormatting.BLUE + "Fluid Capacity: %%%" + (mCapacity * 20) + "L/sec" + EnumChatFormatting.GRAY,
EnumChatFormatting.RED + "Heat Limit: %%%" + mHeatResistance + " K" + EnumChatFormatting.GRAY
EnumChatFormatting.BLUE + "Fluid Capacity: %%%" + (mCapacity * 20) + "%%% L/sec" + EnumChatFormatting.GRAY,
EnumChatFormatting.RED + "Heat Limit: %%%" + mHeatResistance + "%%% K" + EnumChatFormatting.GRAY
};
}
@ -412,4 +412,4 @@ public class GT_MetaPipeEntity_Fluid extends MetaPipeEntity {
if(GT_Mod.instance.isClientSide() && GT_Client.hideValue==1) return 0.0625F;
return mThickNess;
}
}
}

View file

@ -305,7 +305,7 @@ public class GT_MetaPipeEntity_Item extends MetaPipeEntity implements IMetaTileE
@Override
public String[] getDescription() {
return new String[]{"Item Capacity: " + getMaxPipeCapacity() + " Stacks/sec", "Routing Value: " + mStepSize};
return new String[]{"Item Capacity: %%%" + getMaxPipeCapacity() + "%%% Stacks/sec", "Routing Value: %%%" + mStepSize};
}
private boolean isInventoryEmpty() {
@ -347,4 +347,4 @@ public class GT_MetaPipeEntity_Item extends MetaPipeEntity implements IMetaTileE
return AxisAlignedBB.getBoundingBox(aX + tSide4, aY + tSide0, aZ + tSide2, aX + tSide5, aY + tSide1, aZ + tSide3);
}
}
}

View file

@ -42,7 +42,12 @@ public class GT_Item_Machines
if(tDescription.contains("%%%")){
String[] tString = tDescription.split("%%%");
if(tString.length>=2){
aList.add(GT_LanguageManager.addStringLocalization("TileEntity_DESCRIPTION_" + tDamage + "_Index_" + i++, tString[0], !GregTech_API.sPostloadFinished )+" "+tString[1]);
StringBuffer tBuffer = new StringBuffer();
Object tRep[] = new String[tString.length / 2];
for (int j = 0; j < tString.length; j++)
if (j % 2 == 0) tBuffer.append(tString[j]);
else {tBuffer.append(" %s"); tRep[j / 2] = tString[j];}
aList.add(String.format(GT_LanguageManager.addStringLocalization("TileEntity_DESCRIPTION_" + tDamage + "_Index_" + i++, tBuffer.toString(), !GregTech_API.sPostloadFinished), tRep));
}
}else{String tTranslated = GT_LanguageManager.addStringLocalization("TileEntity_DESCRIPTION_" + tDamage + "_Index_" + i++, tDescription, !GregTech_API.sPostloadFinished );
aList.add(tTranslated.equals("") ? tDescription : tTranslated);}
@ -136,4 +141,4 @@ public class GT_Item_Machines
}
return true;
}
}
}