[jsword-svn] r2092 - in trunk/common-swing/src/main: java/org/crosswire/common/config/swing java/org/crosswire/common/swing resources resources/org/crosswire/common resources/org/crosswire/common/config/swing

dmsmith at crosswire.org dmsmith at crosswire.org
Mon Mar 7 05:20:11 MST 2011


Author: dmsmith
Date: 2011-03-07 05:20:11 -0700 (Mon, 07 Mar 2011)
New Revision: 2092

Added:
   trunk/common-swing/src/main/java/org/crosswire/common/swing/CWOtherMsg.java
   trunk/common-swing/src/main/resources/CWOtherMsg.properties
   trunk/common-swing/src/main/resources/CWOtherMsg_de.properties
   trunk/common-swing/src/main/resources/CWOtherMsg_fa.properties
   trunk/common-swing/src/main/resources/CWOtherMsg_in.properties
   trunk/common-swing/src/main/resources/CWOtherMsg_vi.properties
Removed:
   trunk/common-swing/src/main/java/org/crosswire/common/config/swing/Msg.java
   trunk/common-swing/src/main/java/org/crosswire/common/swing/Msg.java
   trunk/common-swing/src/main/resources/org/crosswire/common/config/swing/Msg.properties
   trunk/common-swing/src/main/resources/org/crosswire/common/config/swing/Msg_de.properties
   trunk/common-swing/src/main/resources/org/crosswire/common/config/swing/Msg_fa.properties
   trunk/common-swing/src/main/resources/org/crosswire/common/config/swing/Msg_in.properties
   trunk/common-swing/src/main/resources/org/crosswire/common/config/swing/Msg_vi.properties
   trunk/common-swing/src/main/resources/org/crosswire/common/swing/
Modified:
   trunk/common-swing/src/main/java/org/crosswire/common/config/swing/MappedOptionsField.java
   trunk/common-swing/src/main/java/org/crosswire/common/config/swing/OptionsField.java
   trunk/common-swing/src/main/java/org/crosswire/common/config/swing/StringArrayField.java
   trunk/common-swing/src/main/java/org/crosswire/common/swing/LookAndFeelUtil.java
   trunk/common-swing/src/main/java/org/crosswire/common/swing/MapTableModel.java
Log:
BD-156 Merged various Msg.properties into src/main/resources/CWOtherMsg.properties


Modified: trunk/common-swing/src/main/java/org/crosswire/common/config/swing/MappedOptionsField.java
===================================================================
--- trunk/common-swing/src/main/java/org/crosswire/common/config/swing/MappedOptionsField.java	2011-03-07 04:15:31 UTC (rev 2091)
+++ trunk/common-swing/src/main/java/org/crosswire/common/config/swing/MappedOptionsField.java	2011-03-07 12:20:11 UTC (rev 2092)
@@ -33,6 +33,7 @@
 import org.crosswire.common.swing.GuiUtil;
 import org.crosswire.common.swing.MapComboBoxModel;
 import org.crosswire.common.swing.MapEntryRenderer;
+import org.crosswire.common.swing.CWOtherMsg;
 import org.crosswire.common.util.Logger;
 
 /**
@@ -48,7 +49,7 @@
      */
     public MappedOptionsField() {
         combo = new JComboBox(new String[] {
-                Msg.lookupText("No Options Set")
+                CWOtherMsg.lookupText("No Options Set")
         });
         // Set the preferred width. Note, the actual combo box will resize to
         // the width of it's container

Deleted: trunk/common-swing/src/main/java/org/crosswire/common/config/swing/Msg.java
===================================================================
--- trunk/common-swing/src/main/java/org/crosswire/common/config/swing/Msg.java	2011-03-07 04:15:31 UTC (rev 2091)
+++ trunk/common-swing/src/main/java/org/crosswire/common/config/swing/Msg.java	2011-03-07 12:20:11 UTC (rev 2092)
@@ -1,47 +0,0 @@
-/**
- * Distribution License:
- * JSword is free software; you can redistribute it and/or modify it under
- * the terms of the GNU Lesser General Public License, version 2.1 as published by
- * the Free Software Foundation. This program is distributed in the hope
- * that it will be useful, but WITHOUT ANY WARRANTY; without even the
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- * See the GNU Lesser General Public License for more details.
- *
- * The License is available on the internet at:
- *       http://www.gnu.org/copyleft/lgpl.html
- * or by writing to:
- *      Free Software Foundation, Inc.
- *      59 Temple Place - Suite 330
- *      Boston, MA 02111-1307, USA
- *
- * Copyright: 2005
- *     The copyright to this program is held by it's authors.
- *
- * ID: $Id$
- */
-package org.crosswire.common.config.swing;
-
-import org.crosswire.common.util.MsgBase;
-
-/**
- * Compile safe Msg resource settings.
- * 
- * @see gnu.lgpl.License for license details.<br>
- *      The copyright to this program is held by it's authors.
- * @author DM Smith [dmsmith555 at yahoo dot com]
- */
-final class Msg extends MsgBase {
-    /**
-     * Get the internationalized text, but return key if key is unknown.
-     * The text requires one or more parameters to be passed.
-     * 
-     * @param key
-     * @param params
-     * @return the formatted, internationalized text
-     */
-    public static String lookupText(String key, Object... params) {
-        return msg.lookup(key, params);
-    }
-
-    private static MsgBase msg = new Msg();
-}

Modified: trunk/common-swing/src/main/java/org/crosswire/common/config/swing/OptionsField.java
===================================================================
--- trunk/common-swing/src/main/java/org/crosswire/common/config/swing/OptionsField.java	2011-03-07 04:15:31 UTC (rev 2091)
+++ trunk/common-swing/src/main/java/org/crosswire/common/config/swing/OptionsField.java	2011-03-07 12:20:11 UTC (rev 2092)
@@ -32,6 +32,7 @@
 import org.crosswire.common.config.MultipleChoice;
 import org.crosswire.common.diff.Distance;
 import org.crosswire.common.swing.GuiUtil;
+import org.crosswire.common.swing.CWOtherMsg;
 import org.crosswire.common.util.Logger;
 
 /**
@@ -48,7 +49,7 @@
      */
     public OptionsField() {
         combo = new JComboBox(new String[] {
-                Msg.lookupText("No Options Set")
+                CWOtherMsg.lookupText("No Options Set")
         });
         // Set the preferred width. Note, the actual combo box will resize to
         // the width of it's container
@@ -75,7 +76,7 @@
             combo.setModel(new DefaultComboBoxModel(list));
         } else {
             list = new String[] {
-                    Msg.lookupText("Error")
+                    CWOtherMsg.lookupText("Error")
             };
         }
     }

Modified: trunk/common-swing/src/main/java/org/crosswire/common/config/swing/StringArrayField.java
===================================================================
--- trunk/common-swing/src/main/java/org/crosswire/common/config/swing/StringArrayField.java	2011-03-07 04:15:31 UTC (rev 2091)
+++ trunk/common-swing/src/main/java/org/crosswire/common/config/swing/StringArrayField.java	2011-03-07 12:20:11 UTC (rev 2092)
@@ -45,10 +45,11 @@
 
 import org.crosswire.common.config.Choice;
 import org.crosswire.common.swing.ActionFactory;
+import org.crosswire.common.swing.CWMsg;
 import org.crosswire.common.swing.CWOptionPane;
 import org.crosswire.common.swing.CWScrollPane;
 import org.crosswire.common.swing.GuiUtil;
-import org.crosswire.common.swing.CWMsg;
+import org.crosswire.common.swing.CWOtherMsg;
 import org.crosswire.common.util.Convert;
 
 /**
@@ -81,7 +82,7 @@
         buttons.add(new JButton(actions.addAction("Remove", CWMsg.gettext("Remove"))));
         buttons.add(new JButton(actions.addAction("Update", CWMsg.gettext("Update"))));
 
-        Border title = BorderFactory.createTitledBorder(Msg.lookupText("Component Editor"));
+        Border title = BorderFactory.createTitledBorder(CWOtherMsg.lookupText("Component Editor"));
         Border pad = BorderFactory.createEmptyBorder(5, 5, 5, 5);
         setBorder(BorderFactory.createCompoundBorder(title, pad));
 
@@ -159,7 +160,7 @@
     public void doAddEntry() {
         InputPane input = new InputPane();
 
-        if (CWOptionPane.showConfirmDialog(this, input, Msg.lookupText("New Class"), JOptionPane.OK_CANCEL_OPTION) == JOptionPane.OK_OPTION) {
+        if (CWOptionPane.showConfirmDialog(this, input, CWOtherMsg.lookupText("New Class"), JOptionPane.OK_CANCEL_OPTION) == JOptionPane.OK_OPTION) {
             String new_name = input.name_field.getText();
 
             list_model.addElement(new_name);
@@ -173,7 +174,7 @@
         InputPane input = new InputPane();
         input.name_field.setText(currentValue());
 
-        if (CWOptionPane.showConfirmDialog(this, input, Msg.lookupText("Edit Class"), JOptionPane.OK_CANCEL_OPTION) == JOptionPane.OK_OPTION) {
+        if (CWOptionPane.showConfirmDialog(this, input, CWOtherMsg.lookupText("Edit Class"), JOptionPane.OK_CANCEL_OPTION) == JOptionPane.OK_OPTION) {
             String new_name = input.name_field.getText();
 
             list_model.removeElement(currentValue());
@@ -226,7 +227,7 @@
             c.gridwidth = GridBagConstraints.RELATIVE; // next-to-last
             c.fill = GridBagConstraints.NONE; // reset to default
             c.weightx = 0.0; // reset to default
-            add(new JLabel(Msg.lookupText("Name") + ':'), c);
+            add(new JLabel(CWOtherMsg.lookupText("Name") + ':'), c);
 
             c.gridwidth = GridBagConstraints.REMAINDER; // end row
             c.fill = GridBagConstraints.HORIZONTAL;

Copied: trunk/common-swing/src/main/java/org/crosswire/common/swing/CWOtherMsg.java (from rev 2091, trunk/common-swing/src/main/java/org/crosswire/common/swing/Msg.java)
===================================================================
--- trunk/common-swing/src/main/java/org/crosswire/common/swing/CWOtherMsg.java	                        (rev 0)
+++ trunk/common-swing/src/main/java/org/crosswire/common/swing/CWOtherMsg.java	2011-03-07 12:20:11 UTC (rev 2092)
@@ -0,0 +1,47 @@
+/**
+ * Distribution License:
+ * JSword is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License, version 2.1 as published by
+ * the Free Software Foundation. This program is distributed in the hope
+ * that it will be useful, but WITHOUT ANY WARRANTY; without even the
+ * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU Lesser General Public License for more details.
+ *
+ * The License is available on the internet at:
+ *       http://www.gnu.org/copyleft/lgpl.html
+ * or by writing to:
+ *      Free Software Foundation, Inc.
+ *      59 Temple Place - Suite 330
+ *      Boston, MA 02111-1307, USA
+ *
+ * Copyright: 2005
+ *     The copyright to this program is held by it's authors.
+ *
+ * ID: $Id$
+ */
+package org.crosswire.common.swing;
+
+import org.crosswire.common.util.MsgBase;
+
+/**
+ * Compile safe Msg resource settings.
+ * 
+ * @see gnu.lgpl.License for license details.<br>
+ *      The copyright to this program is held by it's authors.
+ * @author DM Smith [dmsmith555 at yahoo dot com]
+ */
+public final class CWOtherMsg extends MsgBase {
+    /**
+     * Get the internationalized text, but return key if key is unknown.
+     * The text requires one or more parameters to be passed.
+     * 
+     * @param key
+     * @param params
+     * @return the formatted, internationalized text
+     */
+    public static String lookupText(String key, Object... params) {
+        return msg.lookup(key, params);
+    }
+
+    private static MsgBase msg = new CWOtherMsg();
+}

Modified: trunk/common-swing/src/main/java/org/crosswire/common/swing/LookAndFeelUtil.java
===================================================================
--- trunk/common-swing/src/main/java/org/crosswire/common/swing/LookAndFeelUtil.java	2011-03-07 04:15:31 UTC (rev 2091)
+++ trunk/common-swing/src/main/java/org/crosswire/common/swing/LookAndFeelUtil.java	2011-03-07 12:20:11 UTC (rev 2092)
@@ -78,7 +78,7 @@
 
         // newLaFClass is null if the user enters a bogus value
         if (currentLAF != null && !currentLAF.equals(newLaFClass)) {
-            CWOptionPane.showMessageDialog(null, Msg.lookupText("The Look and Feel will change on the next startup."));
+            CWOptionPane.showMessageDialog(null, CWOtherMsg.lookupText("The Look and Feel will change on the next startup."));
         } else {
             UIManager.setLookAndFeel(laf);
         }

Modified: trunk/common-swing/src/main/java/org/crosswire/common/swing/MapTableModel.java
===================================================================
--- trunk/common-swing/src/main/java/org/crosswire/common/swing/MapTableModel.java	2011-03-07 04:15:31 UTC (rev 2091)
+++ trunk/common-swing/src/main/java/org/crosswire/common/swing/MapTableModel.java	2011-03-07 12:20:11 UTC (rev 2092)
@@ -243,7 +243,7 @@
      * The default column names
      */
     private String[] colNames = new String[] {
-            Msg.lookupText("Keys"), Msg.lookupText("Values"),
+            CWOtherMsg.lookupText("Keys"), CWOtherMsg.lookupText("Values"),
     };
 
     /**

Deleted: trunk/common-swing/src/main/java/org/crosswire/common/swing/Msg.java
===================================================================
--- trunk/common-swing/src/main/java/org/crosswire/common/swing/Msg.java	2011-03-07 04:15:31 UTC (rev 2091)
+++ trunk/common-swing/src/main/java/org/crosswire/common/swing/Msg.java	2011-03-07 12:20:11 UTC (rev 2092)
@@ -1,47 +0,0 @@
-/**
- * Distribution License:
- * JSword is free software; you can redistribute it and/or modify it under
- * the terms of the GNU Lesser General Public License, version 2.1 as published by
- * the Free Software Foundation. This program is distributed in the hope
- * that it will be useful, but WITHOUT ANY WARRANTY; without even the
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- * See the GNU Lesser General Public License for more details.
- *
- * The License is available on the internet at:
- *       http://www.gnu.org/copyleft/lgpl.html
- * or by writing to:
- *      Free Software Foundation, Inc.
- *      59 Temple Place - Suite 330
- *      Boston, MA 02111-1307, USA
- *
- * Copyright: 2005
- *     The copyright to this program is held by it's authors.
- *
- * ID: $Id$
- */
-package org.crosswire.common.swing;
-
-import org.crosswire.common.util.MsgBase;
-
-/**
- * Compile safe Msg resource settings.
- * 
- * @see gnu.lgpl.License for license details.<br>
- *      The copyright to this program is held by it's authors.
- * @author DM Smith [dmsmith555 at yahoo dot com]
- */
-final class Msg extends MsgBase {
-    /**
-     * Get the internationalized text, but return key if key is unknown.
-     * The text requires one or more parameters to be passed.
-     * 
-     * @param key
-     * @param params
-     * @return the formatted, internationalized text
-     */
-    public static String lookupText(String key, Object... params) {
-        return msg.lookup(key, params);
-    }
-
-    private static MsgBase msg = new Msg();
-}

Copied: trunk/common-swing/src/main/resources/CWOtherMsg.properties (from rev 2091, trunk/common-swing/src/main/resources/org/crosswire/common/config/swing/Msg.properties)
===================================================================
--- trunk/common-swing/src/main/resources/CWOtherMsg.properties	                        (rev 0)
+++ trunk/common-swing/src/main/resources/CWOtherMsg.properties	2011-03-07 12:20:11 UTC (rev 2092)
@@ -0,0 +1,7 @@
+
+Component\ Editor=Component Editor
+Edit\ Class=Edit Class
+Error=Error
+Name=Name
+New\ Class=New Class
+No\ Options\ Set=No Options Set

Copied: trunk/common-swing/src/main/resources/CWOtherMsg_de.properties (from rev 2091, trunk/common-swing/src/main/resources/org/crosswire/common/config/swing/Msg_de.properties)
===================================================================
--- trunk/common-swing/src/main/resources/CWOtherMsg_de.properties	                        (rev 0)
+++ trunk/common-swing/src/main/resources/CWOtherMsg_de.properties	2011-03-07 12:20:11 UTC (rev 2092)
@@ -0,0 +1,7 @@
+
+Component\ Editor=Component Editor
+Edit\ Class=Edit Class
+Error=Error
+Name=Name
+New\ Class=New Class
+No\ Options\ Set=No Options Set

Copied: trunk/common-swing/src/main/resources/CWOtherMsg_fa.properties (from rev 2091, trunk/common-swing/src/main/resources/org/crosswire/common/config/swing/Msg_fa.properties)
===================================================================
--- trunk/common-swing/src/main/resources/CWOtherMsg_fa.properties	                        (rev 0)
+++ trunk/common-swing/src/main/resources/CWOtherMsg_fa.properties	2011-03-07 12:20:11 UTC (rev 2092)
@@ -0,0 +1,9 @@
+
+Component\ Editor=Component Editor
+Edit\ Class=Edit Class
+Error=\u0627\u0634\u062A\u0628\u0627
+Name=\u0639\u0633\u0645\u200C\u200C\u200C
+New\ Class=New Class
+No\ Options\ Set=No Options Set
+
+The\ Look\ and\ Feel\ will\ change\ on\ the\ next\ startup.=\u0646\u0645\u0627\u06CC\u0634 \u0627\u06CC\u0646 \u0628\u0631\u0646\u0627\u0645\u0647 \u0628\u0627 \u0634\u0631\u0648\u0639  \u062A\u0627\u0632\u0647 \u0627\u0648\u0632 \u062E\u0648\u0627\u0647\u062F \u0634\u062F

Copied: trunk/common-swing/src/main/resources/CWOtherMsg_in.properties (from rev 2091, trunk/common-swing/src/main/resources/org/crosswire/common/config/swing/Msg_in.properties)
===================================================================
--- trunk/common-swing/src/main/resources/CWOtherMsg_in.properties	                        (rev 0)
+++ trunk/common-swing/src/main/resources/CWOtherMsg_in.properties	2011-03-07 12:20:11 UTC (rev 2092)
@@ -0,0 +1,7 @@
+
+Component\ Editor=Komponen Pengubah
+Edit\ Class=Edit Class
+Error=Kesalahan
+Name=Nama
+New\ Class=New Class
+No\ Options\ Set=No Options Set

Copied: trunk/common-swing/src/main/resources/CWOtherMsg_vi.properties (from rev 2091, trunk/common-swing/src/main/resources/org/crosswire/common/config/swing/Msg_vi.properties)
===================================================================
--- trunk/common-swing/src/main/resources/CWOtherMsg_vi.properties	                        (rev 0)
+++ trunk/common-swing/src/main/resources/CWOtherMsg_vi.properties	2011-03-07 12:20:11 UTC (rev 2092)
@@ -0,0 +1,11 @@
+
+Component\ Editor=S\u1EEDa Components
+Edit\ Class=S\u1EEDa Class
+Error=L\u1ED7i
+Name=T\u00EAn
+New\ Class=Class M\u1EDBi
+No\ Options\ Set=Kh\u00F4ng c\u00F3 tu\u1EF3 ch\u1ECDn
+
+Keys=C\u00E1c Ch\u00ECa Kho\u00E1
+The\ Look\ and\ Feel\ will\ change\ on\ the\ next\ startup.=\u0110i\u1EC7n m\u1EA1o s\u1EBD thay \u0111\u1ED5i l\u1EA7n k\u1EBF ti\u1EBFp b\u1EA1n m\u1EDF BibleDesktop.
+Values=Gi\u00E1 Tr\u1ECB

Deleted: trunk/common-swing/src/main/resources/org/crosswire/common/config/swing/Msg.properties
===================================================================
--- trunk/common-swing/src/main/resources/org/crosswire/common/config/swing/Msg.properties	2011-03-07 04:15:31 UTC (rev 2091)
+++ trunk/common-swing/src/main/resources/org/crosswire/common/config/swing/Msg.properties	2011-03-07 12:20:11 UTC (rev 2092)
@@ -1,7 +0,0 @@
-
-Component\ Editor=Component Editor
-Edit\ Class=Edit Class
-Error=Error
-Name=Name
-New\ Class=New Class
-No\ Options\ Set=No Options Set

Deleted: trunk/common-swing/src/main/resources/org/crosswire/common/config/swing/Msg_de.properties
===================================================================
--- trunk/common-swing/src/main/resources/org/crosswire/common/config/swing/Msg_de.properties	2011-03-07 04:15:31 UTC (rev 2091)
+++ trunk/common-swing/src/main/resources/org/crosswire/common/config/swing/Msg_de.properties	2011-03-07 12:20:11 UTC (rev 2092)
@@ -1,7 +0,0 @@
-
-Component\ Editor=Component Editor
-Edit\ Class=Edit Class
-Error=Error
-Name=Name
-New\ Class=New Class
-No\ Options\ Set=No Options Set

Deleted: trunk/common-swing/src/main/resources/org/crosswire/common/config/swing/Msg_fa.properties
===================================================================
--- trunk/common-swing/src/main/resources/org/crosswire/common/config/swing/Msg_fa.properties	2011-03-07 04:15:31 UTC (rev 2091)
+++ trunk/common-swing/src/main/resources/org/crosswire/common/config/swing/Msg_fa.properties	2011-03-07 12:20:11 UTC (rev 2092)
@@ -1,7 +0,0 @@
-
-Component\ Editor=Component Editor
-Edit\ Class=Edit Class
-Error=\u0627\u0634\u062A\u0628\u0627
-Name=\u0639\u0633\u0645\u200C\u200C\u200C
-New\ Class=New Class
-No\ Options\ Set=No Options Set

Deleted: trunk/common-swing/src/main/resources/org/crosswire/common/config/swing/Msg_in.properties
===================================================================
--- trunk/common-swing/src/main/resources/org/crosswire/common/config/swing/Msg_in.properties	2011-03-07 04:15:31 UTC (rev 2091)
+++ trunk/common-swing/src/main/resources/org/crosswire/common/config/swing/Msg_in.properties	2011-03-07 12:20:11 UTC (rev 2092)
@@ -1,7 +0,0 @@
-
-Component\ Editor=Komponen Pengubah
-Edit\ Class=Edit Class
-Error=Kesalahan
-Name=Nama
-New\ Class=New Class
-No\ Options\ Set=No Options Set

Deleted: trunk/common-swing/src/main/resources/org/crosswire/common/config/swing/Msg_vi.properties
===================================================================
--- trunk/common-swing/src/main/resources/org/crosswire/common/config/swing/Msg_vi.properties	2011-03-07 04:15:31 UTC (rev 2091)
+++ trunk/common-swing/src/main/resources/org/crosswire/common/config/swing/Msg_vi.properties	2011-03-07 12:20:11 UTC (rev 2092)
@@ -1,7 +0,0 @@
-
-Component\ Editor=S\u1EEDa Components
-Edit\ Class=S\u1EEDa Class
-Error=L\u1ED7i
-Name=T\u00EAn
-New\ Class=Class M\u1EDBi
-No\ Options\ Set=Kh\u00F4ng c\u00F3 tu\u1EF3 ch\u1ECDn




More information about the jsword-svn mailing list