Skip to content

Commit

Permalink
localized 'address copied' message
Browse files Browse the repository at this point in the history
  • Loading branch information
fnuecke committed Feb 9, 2014
1 parent 6aa75d1 commit d5e3131
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/main/java/li/cil/oc/client/PacketHandler.scala
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
package li.cil.oc.client

import cpw.mods.fml.common.network.Player
import li.cil.oc.Settings
import li.cil.oc.common.PacketType
import li.cil.oc.common.tileentity._
import li.cil.oc.common.{PacketHandler => CommonPacketHandler}
import li.cil.oc.util.PackedColor
import net.minecraft.client.gui.GuiScreen
import net.minecraft.entity.player.EntityPlayer
import net.minecraft.util.ChatMessageComponent
import net.minecraftforge.common.ForgeDirection
import org.lwjgl.input.Keyboard

Expand Down Expand Up @@ -56,7 +58,8 @@ class PacketHandler extends CommonPacketHandler {
val address = p.readUTF()
if (Keyboard.isKeyDown(Keyboard.KEY_LCONTROL) || Keyboard.isKeyDown(Keyboard.KEY_LCONTROL)) {
GuiScreen.setClipboardString(address)
player.addChatMessage("Address copied to clipboard.")
player.sendChatToPlayer(ChatMessageComponent.createFromTranslationKey(
Settings.namespace + "gui.Analyzer.AddressCopied"))
}
}

Expand Down
1 change: 1 addition & 0 deletions src/main/resources/assets/opencomputers/lang/de_DE.lang
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ oc:item.WirelessNetworkCard.name=Drahtlosnetzwerkkarte

# GUI
oc:gui.Analyzer.Address=§6Adresse§f: %s
oc:gui.Analyzer.AddressCopied=Adresse wurde in die Zwischenablage kopiert.
oc:gui.Analyzer.ChargerSpeed=§6Ladegeschwindigkeit§f: %s
oc:gui.Analyzer.ComponentName=§6Komponentenname§f: %s
oc:gui.Analyzer.Components=§6Anzahl verbundener Komponenten§f: %s
Expand Down
1 change: 1 addition & 0 deletions src/main/resources/assets/opencomputers/lang/en_US.lang
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ oc:item.WirelessNetworkCard.name=Wireless Network Card

# GUI
oc:gui.Analyzer.Address=§6Address§f: %s
oc:gui.Analyzer.AddressCopied=Address copied to clipboard.
oc:gui.Analyzer.ChargerSpeed=§6Charge speed§f: %s
oc:gui.Analyzer.ComponentName=§6Component name§f: %s
oc:gui.Analyzer.Components=§6Number of connected components§f: %s
Expand Down

1 comment on commit d5e3131

@Vexatos
Copy link
Contributor

@Vexatos Vexatos commented on d5e3131 Feb 9, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Please sign in to comment.