Improve i18n of tooltip
This commit is contained in:
parent
673aaeaaab
commit
8faba6a054
1 changed files with 7 additions and 2 deletions
|
@ -42,7 +42,12 @@ public class GT_Item_Machines
|
||||||
if(tDescription.contains("%%%")){
|
if(tDescription.contains("%%%")){
|
||||||
String[] tString = tDescription.split("%%%");
|
String[] tString = tDescription.split("%%%");
|
||||||
if(tString.length>=2){
|
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 );
|
}else{String tTranslated = GT_LanguageManager.addStringLocalization("TileEntity_DESCRIPTION_" + tDamage + "_Index_" + i++, tDescription, !GregTech_API.sPostloadFinished );
|
||||||
aList.add(tTranslated.equals("") ? tDescription : tTranslated);}
|
aList.add(tTranslated.equals("") ? tDescription : tTranslated);}
|
||||||
|
@ -136,4 +141,4 @@ public class GT_Item_Machines
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue