← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 1052: Slight improvements to i18n resource editor.

 

------------------------------------------------------------
revno: 1052
committer: Lars Helge Oeverland larshelge@xxxxxxxxx
branch nick: trunk
timestamp: Wed 2009-11-18 20:01:08 +0100
message:
  Slight improvements to i18n resource editor.
modified:
  dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/about/menu.vm
  tools/dhis-i18n-resourceeditor/pom.xml
  tools/dhis-i18n-resourceeditor/src/main/java/org/hisp/dhis/i18nresourceeditor/gui/I18nResourceEditorGUI.java
  tools/dhis-i18n-resourceeditor/src/main/java/org/hisp/dhis/i18nresourceeditor/gui/UnicodeTransferHandler.java
  tools/dhis-i18n-resourceeditor/src/main/java/org/hisp/dhis/i18nresourceeditor/persistence/FileUtils.java
  tools/dhis-i18n-resourceeditor/src/main/java/org/hisp/dhis/i18nresourceeditor/tree/KeyNode.java
  tools/dhis-i18n-resourceeditor/src/main/java/org/hisp/dhis/i18nresourceeditor/tree/ModuleNode.java
  tools/dhis-i18n-resourceeditor/src/main/java/org/hisp/dhis/i18nresourceeditor/tree/ResourceNode.java


--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription.
=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/about/menu.vm'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/about/menu.vm	2009-04-30 15:57:41 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/about/menu.vm	2009-11-18 19:01:08 +0000
@@ -7,7 +7,6 @@
 <h2>$i18n.getString( "dhis2_online" )&nbsp;</h2>
 
 <ul>
-	<li><a href="http://www.hisp.info"; target="_blank">$i18n.getString( "hisp_homepage" )&nbsp;</a></li>
-	<li><a href="http://dhis2.com"; target="_blank">$i18n.getString( "dhis2_home_page" )&nbsp;</a></li>
+	<li><a href="http://dhis2.org"; target="_blank">$i18n.getString( "dhis2_home_page" )&nbsp;</a></li>
 	<li><a href="https://launchpad.net/dhis2"; target="_blank">$i18n.getString( "dhis2_issue_tracking" )&nbsp;</a></li>
 </ul>

=== modified file 'tools/dhis-i18n-resourceeditor/pom.xml'
--- tools/dhis-i18n-resourceeditor/pom.xml	2009-03-09 11:13:57 +0000
+++ tools/dhis-i18n-resourceeditor/pom.xml	2009-11-18 19:01:08 +0000
@@ -1,11 +1,12 @@
-
-<project>
+<project xmlns="http://maven.apache.org/POM/4.0.0";
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd";>
     <modelVersion>4.0.0</modelVersion>
 
     <groupId>org.hisp.dhis</groupId>
     <artifactId>dhis-i18n-resourceeditor</artifactId>
     <packaging>jar</packaging>
-    <version>0.3</version>
+    <version>1.0</version>
     <name>I18n Resource Editor</name>
 
     <dependencies>

=== modified file 'tools/dhis-i18n-resourceeditor/src/main/java/org/hisp/dhis/i18nresourceeditor/gui/I18nResourceEditorGUI.java'
--- tools/dhis-i18n-resourceeditor/src/main/java/org/hisp/dhis/i18nresourceeditor/gui/I18nResourceEditorGUI.java	2009-03-09 11:13:57 +0000
+++ tools/dhis-i18n-resourceeditor/src/main/java/org/hisp/dhis/i18nresourceeditor/gui/I18nResourceEditorGUI.java	2009-11-18 19:01:08 +0000
@@ -26,29 +26,56 @@
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
-import org.hisp.dhis.i18nresourceeditor.exception.I18nResourceException;
-import org.hisp.dhis.i18nresourceeditor.persistence.ResourceManager;
-import org.hisp.dhis.i18nresourceeditor.service.ConfigurationManager;
-import org.hisp.dhis.i18nresourceeditor.tree.ModuleNode;
-import org.hisp.dhis.i18nresourceeditor.tree.ResourceNode;
-
-import javax.swing.*;
-import javax.swing.border.TitledBorder;
-import javax.swing.event.DocumentEvent;
-import javax.swing.event.DocumentListener;
-import javax.swing.tree.DefaultTreeCellRenderer;
-import javax.swing.tree.TreePath;
-import java.awt.*;
+import java.awt.BorderLayout;
+import java.awt.Color;
+import java.awt.Component;
+import java.awt.Dimension;
+import java.awt.FlowLayout;
+import java.awt.Font;
+import java.awt.GridLayout;
 import java.awt.event.ActionEvent;
 import java.awt.event.ActionListener;
 import java.awt.event.MouseAdapter;
 import java.awt.event.MouseEvent;
 import java.util.ArrayList;
+import java.util.Collection;
 import java.util.Collections;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Locale;
-import java.util.Collection;
+
+import javax.swing.DefaultComboBoxModel;
+import javax.swing.Icon;
+import javax.swing.ImageIcon;
+import javax.swing.JButton;
+import javax.swing.JComboBox;
+import javax.swing.JDialog;
+import javax.swing.JEditorPane;
+import javax.swing.JFileChooser;
+import javax.swing.JFrame;
+import javax.swing.JLabel;
+import javax.swing.JList;
+import javax.swing.JOptionPane;
+import javax.swing.JPanel;
+import javax.swing.JScrollPane;
+import javax.swing.JSplitPane;
+import javax.swing.JTabbedPane;
+import javax.swing.JTextArea;
+import javax.swing.JTextField;
+import javax.swing.JToolBar;
+import javax.swing.JTree;
+import javax.swing.ToolTipManager;
+import javax.swing.UIManager;
+import javax.swing.border.TitledBorder;
+import javax.swing.event.DocumentEvent;
+import javax.swing.event.DocumentListener;
+import javax.swing.tree.DefaultTreeCellRenderer;
+import javax.swing.tree.TreePath;
+
+import org.hisp.dhis.i18nresourceeditor.exception.I18nResourceException;
+import org.hisp.dhis.i18nresourceeditor.persistence.ResourceManager;
+import org.hisp.dhis.i18nresourceeditor.tree.ModuleNode;
+import org.hisp.dhis.i18nresourceeditor.tree.ResourceNode;
 
 /**
  * @author Oyvind Brucker
@@ -69,7 +96,6 @@
     // -------------------------------------------------------------------------
     private I18nLoggingSwing log = new I18nLoggingSwing();
     private ResourceManager resourceManager = new ResourceManager(log);
-    private ConfigurationManager configurationManager = new ConfigurationManager(log);
     // Root module used by the tree
     private ModuleNode rootModule = new ModuleNode();
     // -------------------------------------------------------------------------

=== modified file 'tools/dhis-i18n-resourceeditor/src/main/java/org/hisp/dhis/i18nresourceeditor/gui/UnicodeTransferHandler.java'
--- tools/dhis-i18n-resourceeditor/src/main/java/org/hisp/dhis/i18nresourceeditor/gui/UnicodeTransferHandler.java	2009-03-09 11:13:57 +0000
+++ tools/dhis-i18n-resourceeditor/src/main/java/org/hisp/dhis/i18nresourceeditor/gui/UnicodeTransferHandler.java	2009-11-18 19:01:08 +0000
@@ -4,6 +4,8 @@
 import java.awt.datatransfer.Transferable;
 import java.io.BufferedReader;
 import java.io.Reader;
+import java.util.List;
+
 import javax.swing.JComponent;
 import javax.swing.JTextArea;
 import javax.swing.TransferHandler;
@@ -68,7 +70,7 @@
                 }
                 br.close();
             } else if (listFlavor != null) {
-                java.util.List list = (java.util.List) transferable.getTransferData(listFlavor);
+                List<?> list = (List<?>) transferable.getTransferData(listFlavor);
                 println(list);
             } else if (objectFlavor != null) {
                 println("Data is a java object:\n" + transferable.getTransferData(objectFlavor));

=== modified file 'tools/dhis-i18n-resourceeditor/src/main/java/org/hisp/dhis/i18nresourceeditor/persistence/FileUtils.java'
--- tools/dhis-i18n-resourceeditor/src/main/java/org/hisp/dhis/i18nresourceeditor/persistence/FileUtils.java	2009-03-09 11:13:57 +0000
+++ tools/dhis-i18n-resourceeditor/src/main/java/org/hisp/dhis/i18nresourceeditor/persistence/FileUtils.java	2009-11-18 19:01:08 +0000
@@ -74,7 +74,7 @@
      * @param path    full path for the resource including complete filename with locale information
      * @throws I18nResourceException
      */
-    public static void saveResource(Hashtable content, String path)
+    public static void saveResource(Hashtable<?,?> content, String path)
             throws I18nResourceException {
         File file = new File(path);
 

=== modified file 'tools/dhis-i18n-resourceeditor/src/main/java/org/hisp/dhis/i18nresourceeditor/tree/KeyNode.java'
--- tools/dhis-i18n-resourceeditor/src/main/java/org/hisp/dhis/i18nresourceeditor/tree/KeyNode.java	2009-03-09 11:13:57 +0000
+++ tools/dhis-i18n-resourceeditor/src/main/java/org/hisp/dhis/i18nresourceeditor/tree/KeyNode.java	2009-11-18 19:01:08 +0000
@@ -77,7 +77,7 @@
     // -------------------------------------------------------------------------
     // Comparable implementation
     // -------------------------------------------------------------------------
-    public int compareTo(Object o) {
+    public int compareTo(ResourceNode o) {
         if (o instanceof ModuleNode) {
             return -1;
         } else {

=== modified file 'tools/dhis-i18n-resourceeditor/src/main/java/org/hisp/dhis/i18nresourceeditor/tree/ModuleNode.java'
--- tools/dhis-i18n-resourceeditor/src/main/java/org/hisp/dhis/i18nresourceeditor/tree/ModuleNode.java	2009-03-09 11:13:57 +0000
+++ tools/dhis-i18n-resourceeditor/src/main/java/org/hisp/dhis/i18nresourceeditor/tree/ModuleNode.java	2009-11-18 19:01:08 +0000
@@ -26,20 +26,18 @@
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
-import org.hisp.dhis.i18nresourceeditor.service.I18nLogging;
-
-import java.util.Locale;
+import java.io.File;
+import java.util.ArrayList;
 import java.util.Collection;
-import java.util.ArrayList;
+import java.util.Collections;
 import java.util.HashMap;
 import java.util.Hashtable;
-import java.util.Collections;
-import java.io.File;
+import java.util.Locale;
 
 /**
  * @author Oyvind Brucker
  */
-public class ModuleNode implements ResourceNode, Comparable {
+public class ModuleNode implements ResourceNode {
 
     private File path; // root path for module
     private File resourcePath;
@@ -117,7 +115,7 @@
     // -------------------------------------------------------------------------
     // Comparable implementation
     // -------------------------------------------------------------------------
-    public int compareTo(Object o) {
+    public int compareTo(ResourceNode o) {
         if (o instanceof KeyNode) {
             return 1;
         } else {

=== modified file 'tools/dhis-i18n-resourceeditor/src/main/java/org/hisp/dhis/i18nresourceeditor/tree/ResourceNode.java'
--- tools/dhis-i18n-resourceeditor/src/main/java/org/hisp/dhis/i18nresourceeditor/tree/ResourceNode.java	2009-03-09 11:13:57 +0000
+++ tools/dhis-i18n-resourceeditor/src/main/java/org/hisp/dhis/i18nresourceeditor/tree/ResourceNode.java	2009-11-18 19:01:08 +0000
@@ -32,7 +32,7 @@
 /**
  * @author Oyvind Brucker
  */
-public interface ResourceNode extends Comparable {
+public interface ResourceNode extends Comparable<ResourceNode> {
 
     public static int MODULE = 1;
     public static int KEY = 2;