Merge pull request #121 from Vexatos/master-fork

More localization fixes. Allow custom bee names.
This commit is contained in:
SandGrainOne committed 2014-08-17 20:41:19 +02:00
commit 9e782c421e
4 files changed
+20 -4

No files matched your search

+1 -1
Submodule lang updated: 7bd2e3194d...9a75c1cb49.
@@ -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")
@@ -465,6 +465,9 @@ item.fruit.lemon=Lemon
item.fruit.plum=Plum
item.fruit.papaya=Papaya
item.fruit.dates=Date
item.research.note=%s's Notes
item.research.note.error.0=It is impossible to decipher the washed out scribbles.
item.research.note.error.1=The note has become unreadable and is worthless.
itemGroup.forestry=Forestry
itemGroup.arboriculture=Arboriculture
itemGroup.apiculture=Apiculture
@@ -1000,3 +1003,11 @@ item.catalogue=Catalogue
####################
item.PipeItemsPropolis.name=Apiarist's Pipe
###########################
# CUSTOM BEE SPECIES NAMES
###########################
# Syntax:
# bees.custom.<type>.<species>=New custom name
# Example:
# bees.custom.drone.forest=Forest Drone