From 7430f3956390c9784094984eb7de2a1eee833aae Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Wed, 28 Jan 2009 00:28:30 +0100 Subject: [PATCH] Adapt to i18n changes, move language properties to application directory. --- .../pterodactylus/jkeytool/gui/swing/SwingInterface.java | 10 +++++++--- .../pterodactylus/jkeytool/gui/swing/jkeytool.properties | 14 ++++++++++++++ src/net/pterodactylus/util/i18n/jkeytool.properties | 14 -------------- 3 files changed, 21 insertions(+), 17 deletions(-) create mode 100644 src/net/pterodactylus/jkeytool/gui/swing/jkeytool.properties delete mode 100644 src/net/pterodactylus/util/i18n/jkeytool.properties diff --git a/src/net/pterodactylus/jkeytool/gui/swing/SwingInterface.java b/src/net/pterodactylus/jkeytool/gui/swing/SwingInterface.java index 7574e4a..b67ce84 100644 --- a/src/net/pterodactylus/jkeytool/gui/swing/SwingInterface.java +++ b/src/net/pterodactylus/jkeytool/gui/swing/SwingInterface.java @@ -39,6 +39,7 @@ import javax.swing.JToolBar; import net.pterodactylus.jkeytool.core.Core; import net.pterodactylus.jkeytool.gui.Interface; import net.pterodactylus.jkeytool.main.Main; +import net.pterodactylus.util.i18n.I18n; import net.pterodactylus.util.i18n.gui.I18nAction; import net.pterodactylus.util.i18n.gui.I18nMenu; import net.pterodactylus.util.swing.StatusBar; @@ -53,6 +54,9 @@ public class SwingInterface implements Interface { /** The core to control. */ private Core core; + /** The I18n container. */ + private I18n i18n = new I18n("jkeytool", SwingInterface.class); + /** The main frame. */ private JFrame mainFrame = new JFrame("jkeytool " + Main.getVersion()); @@ -92,14 +96,14 @@ public class SwingInterface implements Interface { // private void createActions() { - createKeyStoreAction = new I18nAction("jkeytool.action.createKeyStore") { + createKeyStoreAction = new I18nAction(i18n, "jkeytool.action.createKeyStore") { @SuppressWarnings("synthetic-access") public void actionPerformed(ActionEvent actionEvent) { createKeyStore(); } }; - quitAction = new I18nAction("jkeytool.action.quit") { + quitAction = new I18nAction(i18n, "jkeytool.action.quit") { /** * @see java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent) @@ -131,7 +135,7 @@ public class SwingInterface implements Interface { private JMenuBar createMenubar() { JMenuBar menubar = new JMenuBar(); - JMenu fileMenu = new I18nMenu("jkeytool.menu.file"); + JMenu fileMenu = new I18nMenu(i18n, "jkeytool.menu.file"); menubar.add(fileMenu); fileMenu.add(createKeyStoreAction); fileMenu.addSeparator(); diff --git a/src/net/pterodactylus/jkeytool/gui/swing/jkeytool.properties b/src/net/pterodactylus/jkeytool/gui/swing/jkeytool.properties new file mode 100644 index 0000000..8601a32 --- /dev/null +++ b/src/net/pterodactylus/jkeytool/gui/swing/jkeytool.properties @@ -0,0 +1,14 @@ +jkeytool.action.createKeyStore.name: New Key Store +jkeytool.action.createKeyStore.mnemonic: VK_N +jkeytool.action.createKeyStore.accelerator: Ctrl-VK_N +jkeytool.action.createKeyStore.shortDescription: Creates a new key store +jkeytool.action.createKeyStore.longDescription: Creates a new key store + +jkeytool.action.quit.name: Quit +jkeytool.action.quit.mnemonic: VK_Q +jkeytool.action.quit.accelerator: Ctrl-VK_Q +jkeytool.action.quit.shortDescription: Quit jkeytool +jkeytool.action.quit.longDescription: Quit jkeytool + +jkeytool.menu.file.name: File +jkeytool.menu.file.mnemonic: VK_F diff --git a/src/net/pterodactylus/util/i18n/jkeytool.properties b/src/net/pterodactylus/util/i18n/jkeytool.properties deleted file mode 100644 index 8601a32..0000000 --- a/src/net/pterodactylus/util/i18n/jkeytool.properties +++ /dev/null @@ -1,14 +0,0 @@ -jkeytool.action.createKeyStore.name: New Key Store -jkeytool.action.createKeyStore.mnemonic: VK_N -jkeytool.action.createKeyStore.accelerator: Ctrl-VK_N -jkeytool.action.createKeyStore.shortDescription: Creates a new key store -jkeytool.action.createKeyStore.longDescription: Creates a new key store - -jkeytool.action.quit.name: Quit -jkeytool.action.quit.mnemonic: VK_Q -jkeytool.action.quit.accelerator: Ctrl-VK_Q -jkeytool.action.quit.shortDescription: Quit jkeytool -jkeytool.action.quit.longDescription: Quit jkeytool - -jkeytool.menu.file.name: File -jkeytool.menu.file.mnemonic: VK_F -- 2.7.4