Revision: 9263
          
http://languagetool.svn.sourceforge.net/languagetool/?rev=9263&view=rev
Author:   dnaber
Date:     2013-01-29 22:37:24 +0000 (Tue, 29 Jan 2013)
Log Message:
-----------
more consistent i18n

Modified Paths:
--------------
    
trunk/languagetool/languagetool-standalone/src/main/java/org/languagetool/gui/LanguageManagerDialog.java

Removed Paths:
-------------
    
trunk/languagetool/languagetool-standalone/src/main/java/org/languagetool/gui/Messages.java

Modified: 
trunk/languagetool/languagetool-standalone/src/main/java/org/languagetool/gui/LanguageManagerDialog.java
===================================================================
--- 
trunk/languagetool/languagetool-standalone/src/main/java/org/languagetool/gui/LanguageManagerDialog.java
    2013-01-29 22:33:34 UTC (rev 9262)
+++ 
trunk/languagetool/languagetool-standalone/src/main/java/org/languagetool/gui/LanguageManagerDialog.java
    2013-01-29 22:37:24 UTC (rev 9263)
@@ -31,6 +31,7 @@
 import java.io.File;
 import java.util.ArrayList;
 import java.util.List;
+import java.util.ResourceBundle;
 
 import javax.swing.JButton;
 import javax.swing.JComponent;
@@ -43,6 +44,7 @@
 import javax.swing.KeyStroke;
 import javax.swing.filechooser.FileFilter;
 
+import org.languagetool.JLanguageTool;
 import org.languagetool.Language;
 import org.languagetool.language.LanguageBuilder;
 
@@ -62,7 +64,7 @@
   private final List<File> ruleFiles = new ArrayList<File>();
   
   private final Frame owner;
-  //private ResourceBundle messages = null;
+  private final ResourceBundle messages;
   
   public LanguageManagerDialog(Frame owner, List<Language> languages) {
     this.owner = owner;
@@ -71,12 +73,12 @@
             ruleFiles.add(new File(ruleFile));
         }
     }
-    //messages = JLanguageTool.getMessageBundle();
+    messages = JLanguageTool.getMessageBundle();
   }
   
   public void show() {
     dialog = new JDialog(owner, true);
-    dialog.setTitle(Messages.getString("guiLanguageManagerDialog"));
+    dialog.setTitle(messages.getString("guiLanguageManagerDialog"));
     
     // close dialog when user presses Escape key:
     // TODO: taken from ConfigurationDialog, avoid duplication:
@@ -110,19 +112,19 @@
     
     final JPanel buttonPanel = new JPanel();
     buttonPanel.setLayout(new GridBagLayout());
-    addButton = new JButton(Messages.getString("guiAddButton"));
+    addButton = new JButton(messages.getString("guiAddButton"));
     addButton.addActionListener(this);
     cons.gridx = 1;
     cons.gridy = 0;
     buttonPanel.add(addButton, cons);
 
-    removeButton = new JButton(Messages.getString("guiRemoveButton"));
+    removeButton = new JButton(messages.getString("guiRemoveButton"));
     removeButton.addActionListener(this);
     cons.gridx = 1;
     cons.gridy = 1;
     buttonPanel.add(removeButton, cons);
 
-    closeButton = new JButton(Messages.getString("guiCloseButton"));
+    closeButton = new JButton(messages.getString("guiCloseButton"));
     closeButton.addActionListener(this);
     cons.gridx = 1;
     cons.gridy = 2;
@@ -152,8 +154,8 @@
         list.setListData(ruleFiles.toArray(new File[]{}));
       } else {
         JOptionPane jop = new JOptionPane();
-        JOptionPane.showMessageDialog(jop, Messages.getString("guiDuplicate"),
-                Messages.getString("guiWarning"), JOptionPane.WARNING_MESSAGE);
+        JOptionPane.showMessageDialog(jop, messages.getString("guiDuplicate"),
+                messages.getString("guiWarning"), JOptionPane.WARNING_MESSAGE);
       }
     } else if (e.getSource() == removeButton) {
       if (list.getSelectedIndex() != -1) {

Deleted: 
trunk/languagetool/languagetool-standalone/src/main/java/org/languagetool/gui/Messages.java
===================================================================
--- 
trunk/languagetool/languagetool-standalone/src/main/java/org/languagetool/gui/Messages.java
 2013-01-29 22:33:34 UTC (rev 9262)
+++ 
trunk/languagetool/languagetool-standalone/src/main/java/org/languagetool/gui/Messages.java
 2013-01-29 22:37:24 UTC (rev 9263)
@@ -1,41 +0,0 @@
-/* LanguageTool, a natural language style checker
- * Copyright (C) 2011 Marcin MiƂkowski
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library 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.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301
- * USA
- */
-package org.languagetool.gui;
-
-import org.languagetool.JLanguageTool;
-
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-
-public class Messages {
-
-  private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle
-          .getBundle(JLanguageTool.MESSAGE_BUNDLE);
-
-  private Messages() {
-  }
-
-  public static String getString(String key) {
-    try {
-      return RESOURCE_BUNDLE.getString(key);
-    } catch (MissingResourceException e) {
-      return '!' + key + '!';
-    }
-  }
-}

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnnow-d2d
_______________________________________________
Languagetool-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/languagetool-commits

Reply via email to