mirror of
https://github.com/GTNewHorizons/ForestryMC.git
synced 2026-11-26 23:03:18 +00:00
More localization fixes. Allow custom bee names.
This commit is contained in:
1 parent
353dc079e9
commit
bc4f609eba
4 files changed
+16
-4
No files matched your search
@@ -37,6 +37,7 @@ import forestry.core.config.Config;
|
||||
import forestry.core.genetics.ItemGE;
|
||||
import forestry.core.utils.StringUtil;
|
||||
import forestry.plugins.PluginApiculture;
|
||||
import net.minecraft.util.StatCollector;
|
||||
|
||||
public class ItemBeeGE extends ItemGE {
|
||||
|
||||
@@ -72,6 +73,9 @@ public class ItemBeeGE extends ItemGE {
|
||||
return StringUtil.localize(type.getName());
|
||||
|
||||
IBee individual = new Bee(itemstack.getTagCompound());
|
||||
if(StatCollector.canTranslate("bees.custom." + type.getName() + "." + individual.getDisplayName())){
|
||||
return StringUtil.localize("bees.custom." + type.getName() + "." + individual.getDisplayName());
|
||||
}
|
||||
return StringUtil.localize(type.getName() + ".grammar").replaceAll("%SPECIES", individual.getDisplayName()).replaceAll("%TYPE", StringUtil.localize(type.getName() + ".type"));
|
||||
}
|
||||
|
||||
|
||||
@@ -13,6 +13,7 @@ package forestry.core.genetics;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import forestry.core.utils.StringUtil;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Items;
|
||||
@@ -211,8 +212,8 @@ public class ItemResearchNote extends ItemForestry {
|
||||
public void addTooltip(List list) {
|
||||
ArrayList<String> tooltips = type.getTooltip(inner);
|
||||
if(tooltips.size() <= 0) {
|
||||
list.add("\u00A7o\u00A7cIt is impossible to decipher the washed out scribbles.");
|
||||
list.add("The note has become unreadable and is worthless.");
|
||||
list.add("\u00A7o\u00A7c" + StringUtil.localize("item.research.note.error.0"));
|
||||
list.add(StringUtil.localize("item.research.note.error.1"));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -232,7 +233,7 @@ public class ItemResearchNote extends ItemForestry {
|
||||
@Override
|
||||
public String getItemStackDisplayName(ItemStack itemstack) {
|
||||
ResearchNote note = new ResearchNote(itemstack.getTagCompound());
|
||||
return String.format("%s's Notes", note.researcher);
|
||||
return StringUtil.localizeAndFormat("item.research.note", note.researcher);
|
||||
}
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
|
||||
Reference in new issue
Block a user