Merge pull request #1217 from Antifluxfield/patch-3
Improve i18n of machine tooltips
This commit is contained in:
commit
7e50c16404
4 changed files with 13 additions and 8 deletions
|
@ -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"
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -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() {
|
||||
|
|
|
@ -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);}
|
||||
|
|
Loading…
Reference in a new issue