mirror of
https://github.com/GTNewHorizons/NotEnoughItems.git
synced 2026-11-20 12:20:00 +00:00
Localise all the things!
This commit is contained in:
1 parent
e99febf27c
commit
d59b28f8fc
5 files changed
+61
-22
No files matched your search
@@ -6,10 +6,14 @@ nei.enchant.level=Level
|
||||
nei.enchant.locked=Locked
|
||||
nei.enchant.unlocked=Unlocked
|
||||
|
||||
nei.potion.favourite=Favourite Potions
|
||||
nei.potion.duration=Duration
|
||||
nei.potion.level=Level
|
||||
|
||||
nei.inventory.options=Options
|
||||
nei.inventory.prev=Prev
|
||||
nei.inventory.next=Next
|
||||
nei.inventory.item_subsets=Item SubSets
|
||||
nei.inventory.item_subsets=Item Subsets
|
||||
nei.inventory.delete.inv=DELETE ALL ITEMS from current inventory screen
|
||||
nei.inventory.delete.one=Delete %s
|
||||
nei.inventory.delete.all=Delete ALL %s
|
||||
@@ -129,6 +133,7 @@ nei.options.command.heal.tip={0} = player
|
||||
nei.options.world.highlight_tips=Highlight Tooltips
|
||||
nei.options.world.highlight_tips.hide=Hidden
|
||||
nei.options.world.highlight_tips.show=Shown
|
||||
nei.options.world.highlight_tips.sample=Sample
|
||||
|
||||
nei.options.tools=Tools
|
||||
nei.options.tools.dump=Data Dumps
|
||||
@@ -183,4 +188,31 @@ nei.itemsort.id=Item ID
|
||||
nei.itemsort.default=Default
|
||||
nei.itemsort.default.tip=Leave the natural ordering of each item unchanged
|
||||
nei.itemsort.damage=Item Damage
|
||||
nei.itemsort.name=Display Name
|
||||
nei.itemsort.name=Display Name
|
||||
|
||||
nei.subsets.Blocks=Blocks
|
||||
nei.subsets.Blocks.MobSpawners=Mob Spawners
|
||||
nei.subsets.CreativeTabs=Creative Tabs
|
||||
nei.subsets.Items=Items
|
||||
nei.subsets.Items.Armor=Armor
|
||||
nei.subsets.Items.Armor.Boots=Boots
|
||||
nei.subsets.Items.Armor.Chestplates=Chestplates
|
||||
nei.subsets.Items.Armor.Helmets=Helmets
|
||||
nei.subsets.Items.Armor.Leggings=Leggings
|
||||
nei.subsets.Items.Food=Food
|
||||
nei.subsets.Items.Potions=Potions
|
||||
nei.subsets.Items.Potions.Ingredients=Ingredients
|
||||
nei.subsets.Items.Potions.Negative=Negative
|
||||
nei.subsets.Items.Potions.Neutral=Neutral
|
||||
nei.subsets.Items.Potions.Positive=Positive
|
||||
nei.subsets.Items.Potions.Splash=Splash
|
||||
nei.subsets.Items.Tools=Tools
|
||||
nei.subsets.Items.Tools.Axes=Axes
|
||||
nei.subsets.Items.Tools.Hoes=Hoes
|
||||
nei.subsets.Items.Tools.Other=Other
|
||||
nei.subsets.Items.Tools.Pickaxes=Pickaxes
|
||||
nei.subsets.Items.Tools.Shovels=Shovels
|
||||
nei.subsets.Items.Weapons=Weapons
|
||||
nei.subsets.Items.Weapons.Ranged=Ranged
|
||||
nei.subsets.Items.Weapons.Swords=Swords
|
||||
nei.subsets.Mod=Mod
|
||||
@@ -17,6 +17,8 @@ import org.lwjgl.opengl.GL11;
|
||||
import java.awt.*;
|
||||
import java.util.ArrayList;
|
||||
|
||||
import static codechicken.nei.NEIClientUtils.translate;
|
||||
|
||||
public class GuiPotionCreator extends GuiContainerWidget
|
||||
{
|
||||
public class GuiSlotPotionEffects extends GuiScrollSlot
|
||||
@@ -287,19 +289,14 @@ public class GuiPotionCreator extends GuiContainerWidget
|
||||
ampUp.setEnabled(amplifier < 3);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerForegroundLayer(int par1, int par2) {
|
||||
//fontRenderer.drawString("Potion", 12, 6, 0x404040);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawBackground() {
|
||||
CCRenderState.changeTexture("nei:textures/gui/potion.png");
|
||||
drawTexturedModalRect(0, 0, 0, 0, xSize, ySize);
|
||||
|
||||
FontUtils.drawCenteredString("Favourite Potions", xSize / 2, 4, 0x404040);
|
||||
fontRendererObj.drawString("Duration", 12, 40, 0x404040);
|
||||
fontRendererObj.drawString("Level", 19, 73, 0x404040);
|
||||
FontUtils.drawCenteredString(translate("potion.favourite"), xSize / 2, 4, 0x404040);
|
||||
fontRendererObj.drawString(translate("potion.duration"), 12, 40, 0x404040);
|
||||
fontRendererObj.drawString(translate("potion.level"), 19, 73, 0x404040);
|
||||
FontUtils.drawCenteredString(translateAmplifier(amplifier), 33, 86, 0xFF606060);
|
||||
}
|
||||
|
||||
|
||||
@@ -24,6 +24,8 @@ import java.util.List;
|
||||
import java.util.concurrent.atomic.AtomicReference;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import static codechicken.nei.NEIClientUtils.translate;
|
||||
|
||||
public class SubsetWidget extends Button implements ItemFilterProvider, ItemsLoadedCallback, ISearchProvider
|
||||
{
|
||||
public static class SubsetState
|
||||
@@ -125,7 +127,6 @@ public class SubsetWidget extends Button implements ItemFilterProvider, ItemsLoa
|
||||
public List<SubsetTag> sorted = Collections.emptyList();
|
||||
private int childwidth;
|
||||
|
||||
protected String displayName;
|
||||
protected SubsetState state = new SubsetState();
|
||||
protected final SubsetSlot slot = new SubsetSlot();
|
||||
private SubsetTag selectedChild;
|
||||
@@ -139,15 +140,15 @@ public class SubsetWidget extends Button implements ItemFilterProvider, ItemsLoa
|
||||
assert filter != null : "Filter cannot be null";
|
||||
this.fullname = EnumChatFormatting.getTextWithoutFormattingCodes(fullname);
|
||||
this.filter = filter;
|
||||
|
||||
if(fullname != null) {
|
||||
int idx = fullname.lastIndexOf('.');
|
||||
displayName = idx < 0 ? fullname : fullname.substring(idx + 1);
|
||||
}
|
||||
}
|
||||
|
||||
public String displayName() {
|
||||
return displayName;
|
||||
String translated = translate("subsets."+fullname);
|
||||
if(!translated.startsWith("nei."))
|
||||
return translated;
|
||||
|
||||
int idx = fullname.lastIndexOf('.');
|
||||
return idx < 0 ? fullname : fullname.substring(idx + 1);
|
||||
}
|
||||
|
||||
public String name() {
|
||||
@@ -595,6 +596,11 @@ public class SubsetWidget extends Button implements ItemFilterProvider, ItemsLoa
|
||||
ItemList.loadCallbacks.add(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRenderLabel() {
|
||||
return translate("inventory.item_subsets");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void draw(int mx, int my) {
|
||||
super.draw(mx, my);
|
||||
|
||||
@@ -433,7 +433,7 @@ public class ItemInfo
|
||||
API.addSubset("Items.Tools.Other", other);
|
||||
API.addSubset("Items.Weapons.Swords", swords);
|
||||
API.addSubset("Items.Weapons.Ranged", ranged);
|
||||
API.addSubset("Items.Armor.ChestPlates", chest);
|
||||
API.addSubset("Items.Armor.Chestplates", chest);
|
||||
API.addSubset("Items.Armor.Leggings", legs);
|
||||
API.addSubset("Items.Armor.Helmets", helmets);
|
||||
API.addSubset("Items.Armor.Boots", boots);
|
||||
|
||||
@@ -5,7 +5,6 @@ import codechicken.core.gui.GuiScreenWidget;
|
||||
import codechicken.lib.math.MathHelper;
|
||||
import codechicken.lib.vec.Rectangle4i;
|
||||
import codechicken.nei.HUDRenderer;
|
||||
import codechicken.nei.NEIClientUtils;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@@ -14,9 +13,11 @@ import org.lwjgl.input.Keyboard;
|
||||
|
||||
import java.awt.*;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import static codechicken.lib.gui.GuiDraw.displaySize;
|
||||
import static codechicken.lib.gui.GuiDraw.getMousePosition;
|
||||
import static codechicken.nei.NEIClientUtils.translate;
|
||||
|
||||
public class GuiHighlightTips extends GuiScreenWidget
|
||||
{
|
||||
@@ -50,7 +51,7 @@ public class GuiHighlightTips extends GuiScreenWidget
|
||||
}
|
||||
|
||||
private void updateNames() {
|
||||
toggleButton.text = NEIClientUtils.translate("options." + name + "." + (show() ? "show" : "hide"));
|
||||
toggleButton.text = translate("options." + name + "." + (show() ? "show" : "hide"));
|
||||
}
|
||||
|
||||
private boolean show() {
|
||||
@@ -69,8 +70,11 @@ public class GuiHighlightTips extends GuiScreenWidget
|
||||
@Override
|
||||
public void drawScreen(int mousex, int mousey, float f) {
|
||||
super.drawScreen(mousex, mousey, f);
|
||||
if (show())
|
||||
HUDRenderer.renderOverlay(new ItemStack(Blocks.redstone_block), Arrays.asList("RedstoneBlock", EnumChatFormatting.RED+"Sample"), renderPos());
|
||||
if (show()) {
|
||||
ItemStack stack = new ItemStack(Blocks.redstone_block);
|
||||
List<String> tip = Arrays.asList(stack.getDisplayName(), EnumChatFormatting.RED+translate("options."+name+".sample"));
|
||||
HUDRenderer.renderOverlay(stack, tip, renderPos());
|
||||
}
|
||||
}
|
||||
|
||||
public Point getPos() {
|
||||
|
||||
Reference in new issue
Block a user