Fixes #1219: Improved localization options
This commit is contained in:
parent
881bb919da
commit
8321a5fe1c
6 changed files with 39 additions and 7 deletions
|
@ -30,6 +30,7 @@ import net.minecraft.item.ItemStack;
|
|||
import appeng.api.storage.data.IAEItemStack;
|
||||
import appeng.client.me.SlotME;
|
||||
import appeng.core.AEConfig;
|
||||
import appeng.core.localization.ButtonToolTips;
|
||||
|
||||
|
||||
public abstract class AEBaseMEGui extends AEBaseGui
|
||||
|
@ -63,14 +64,30 @@ public abstract class AEBaseMEGui extends AEBaseGui
|
|||
if( myStack != null )
|
||||
{
|
||||
if( myStack.getStackSize() > BigNumber || ( myStack.getStackSize() > 1 && stack.isItemDamaged() ) )
|
||||
currentToolTip.add( "\u00a77Items Stored: " + NumberFormat.getNumberInstance( Locale.US ).format( myStack.getStackSize() ) );
|
||||
{
|
||||
final String local = ButtonToolTips.ItemsStored.getLocal();
|
||||
final String formattedAmount = NumberFormat.getNumberInstance( Locale.US ).format( myStack.getStackSize() );
|
||||
final String format = String.format( local, formattedAmount );
|
||||
|
||||
currentToolTip.add( "\u00a77" + format );
|
||||
}
|
||||
|
||||
if( myStack.getCountRequestable() > 0 )
|
||||
currentToolTip.add( "\u00a77Items Requestable: " + NumberFormat.getNumberInstance( Locale.US ).format( myStack.getCountRequestable() ) );
|
||||
{
|
||||
final String local = ButtonToolTips.ItemsRequestable.getLocal();
|
||||
final String formattedAmount = NumberFormat.getNumberInstance( Locale.US ).format( myStack.getCountRequestable() );
|
||||
final String format = String.format( local, formattedAmount );
|
||||
|
||||
currentToolTip.add( "\u00a77" + format );
|
||||
}
|
||||
}
|
||||
else if( stack.stackSize > BigNumber || ( stack.stackSize > 1 && stack.isItemDamaged() ) )
|
||||
{
|
||||
currentToolTip.add( "\u00a77Items Stored: " + NumberFormat.getNumberInstance( Locale.US ).format( stack.stackSize ) );
|
||||
final String local = ButtonToolTips.ItemsStored.getLocal();
|
||||
final String formattedAmount = NumberFormat.getNumberInstance( Locale.US ).format( stack.stackSize );
|
||||
final String format = String.format( local, formattedAmount );
|
||||
|
||||
currentToolTip.add( "\u00a77" + format );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -29,6 +29,7 @@ import net.minecraft.item.ItemStack;
|
|||
|
||||
import appeng.api.storage.data.IAEItemStack;
|
||||
import appeng.core.AEConfig;
|
||||
import appeng.core.localization.GuiText;
|
||||
import appeng.util.ReadableNumberConverter;
|
||||
|
||||
|
||||
|
@ -75,7 +76,7 @@ public class AppEngRenderItem extends RenderItem
|
|||
|
||||
if( is.stackSize == 0 )
|
||||
{
|
||||
String craftLabelText = AEConfig.instance.useTerminalUseLargeFont() ? "+" : "Craft";
|
||||
String craftLabelText = AEConfig.instance.useTerminalUseLargeFont() ? GuiText.LargeFontCraft.getLocal() : GuiText.SmallFontCraft.getLocal();
|
||||
GL11.glDisable( GL11.GL_LIGHTING );
|
||||
GL11.glDisable( GL11.GL_DEPTH_TEST );
|
||||
GL11.glPushMatrix();
|
||||
|
|
|
@ -58,7 +58,10 @@ public enum ButtonToolTips
|
|||
|
||||
Craft, Mod, DoesntDespawn, EmitterMode, CraftViaRedstone, EmitWhenCrafting, ReportInaccessibleItems, ReportInaccessibleItemsYes, ReportInaccessibleItemsNo,
|
||||
|
||||
BlockPlacement, BlockPlacementYes, BlockPlacementNo;
|
||||
BlockPlacement, BlockPlacementYes, BlockPlacementNo,
|
||||
|
||||
// Used in the tooltips of the items in the terminal, when moused over
|
||||
ItemsStored, ItemsRequestable;
|
||||
|
||||
final String root;
|
||||
|
||||
|
|
|
@ -70,7 +70,13 @@ public enum GuiText
|
|||
|
||||
NoCraftingJobs, CPUs, FacadeCrafting, inWorldCraftingPresses, ChargedQuartzFind,
|
||||
|
||||
Included, Excluded, Partitioned, Precise, Fuzzy;
|
||||
Included, Excluded, Partitioned, Precise, Fuzzy,
|
||||
|
||||
// Used in a terminal to indicate that an item is craftable
|
||||
SmallFontCraft, LargeFontCraft,
|
||||
|
||||
// Used in a ME Interface when no appropriate TileEntity was detected near it
|
||||
Nothing;
|
||||
|
||||
final String root;
|
||||
|
||||
|
|
|
@ -92,7 +92,7 @@ public final class PowerStorageWailaDataProvider extends BaseWailaDataProvider
|
|||
final String formatCurrentPower = Platform.formatPowerLong( internalCurrentPower, false );
|
||||
final String formatMaxPower = Platform.formatPowerLong( internalMaxPower, false );
|
||||
|
||||
currentToolTip.add( WailaText.Contains + ": " + formatCurrentPower + " / " + formatMaxPower );
|
||||
currentToolTip.add( WailaText.Contains.getLocal() + ": " + formatCurrentPower + " / " + formatMaxPower );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -209,6 +209,9 @@ gui.appliedenergistics2.Excluded=Excluded
|
|||
gui.appliedenergistics2.Partitioned=Partitioned
|
||||
gui.appliedenergistics2.Precise=Precise
|
||||
gui.appliedenergistics2.Fuzzy=Fuzzy
|
||||
gui.appliedenergistics2.SmallFontCraft=Craft
|
||||
gui.appliedenergistics2.LargeFontCraft=+
|
||||
gui.appliedenergistics2.Nothing=Nothing
|
||||
|
||||
gui.tooltips.appliedenergistics2.Stash=Store Items
|
||||
gui.tooltips.appliedenergistics2.StashDesc=Return items on the crafting grid to network storage.
|
||||
|
@ -294,6 +297,8 @@ gui.tooltips.appliedenergistics2.ReportInaccessibleItemsNo=No: Only extractable
|
|||
gui.tooltips.appliedenergistics2.BlockPlacement=Block Placement
|
||||
gui.tooltips.appliedenergistics2.BlockPlacementYes=Blocks will be placed as block.
|
||||
gui.tooltips.appliedenergistics2.BlockPlacementNo=Blocks will be dropped as item.
|
||||
gui.tooltips.appliedenergistics2.ItemsStored=Items Stored: %s
|
||||
gui.tooltips.appliedenergistics2.ItemsRequestable=Items Requestable: %s
|
||||
|
||||
gui.appliedenergistics2.units.appliedenergstics=AE
|
||||
gui.appliedenergistics2.units.buildcraft=Minecraft Joules
|
||||
|
|
Loading…
Reference in a new issue