commit 57318058d244fda9d3f7f230227e81f85c6a96b2
Author: Patric Plitzner <p.plitzner@bgbm.org>
Date:   Tue Apr 14 14:57:55 2015 +0000

     - i18n language preferences

diff --git a/.gitattributes b/.gitattributes
index cf5f071a7..e8b0c30f5 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -1219,6 +1219,7 @@ eu.etaxonomy.taxeditor.store/p2.inf -text
 eu.etaxonomy.taxeditor.store/plugin.xml -text
 eu.etaxonomy.taxeditor.store/pom.xml -text
 eu.etaxonomy.taxeditor.store/schema/eu.etaxonomy.taxeditor.store.cdmViewer.exsd -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/Messages.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/datasource/CdmDataSourceRepository.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/datasource/wizard/CdmDataSourceCredentialsWizardPage.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/datasource/wizard/CdmDataSourceH2WizardPage.java -text
@@ -1784,7 +1785,6 @@ eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/datasourc
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/datasource/CdmDataSourceViewPart.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/datasource/CdmDataSourceViewerComparator.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/datasource/CdmMetaDataAwareDataSourceContainer.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/datasource/Messages.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/datasource/handler/AbstractDataSourceHandler.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/datasource/handler/ChangeConnectionHandler.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/datasource/handler/CloneDataSourceHandler.java -text
diff --git a/eu.etaxonomy.taxeditor.store/OSGI-INF/l10n/messages.properties b/eu.etaxonomy.taxeditor.store/OSGI-INF/l10n/messages.properties
index 887b08241..9db526ac4 100644
--- a/eu.etaxonomy.taxeditor.store/OSGI-INF/l10n/messages.properties
+++ b/eu.etaxonomy.taxeditor.store/OSGI-INF/l10n/messages.properties
@@ -10,3 +10,7 @@ CdmDataSourceViewPart_6=Nomenclatural Code
 CdmDataSourceViewPart_7=Database
 CdmDataSourceViewPart_8=Type
 CdmDataSourceViewPart_9=Up
+LanguageEditorPreferencePage_ChooseDefaultLanguage=Please choose your default language for the editor: 
+LanguageEditorPreferencePage_EditorHasToRestart=The Taxonomic Editor has to restart now, in order to complete the language switch.\nDo you want to restart now?
+LanguageEditorPreferencePage_PleaseRestart=Please Restart
+LanguageEditorPreferencePage_RestartRequired=After changing the default language, a restart is required,\nin order for the new settings to take effect.
diff --git a/eu.etaxonomy.taxeditor.store/OSGI-INF/l10n/messages_de.properties b/eu.etaxonomy.taxeditor.store/OSGI-INF/l10n/messages_de.properties
index ca152050d..86c805989 100644
--- a/eu.etaxonomy.taxeditor.store/OSGI-INF/l10n/messages_de.properties
+++ b/eu.etaxonomy.taxeditor.store/OSGI-INF/l10n/messages_de.properties
@@ -10,3 +10,8 @@ CdmDataSourceViewPart_6=Nomenklaturcode
 CdmDataSourceViewPart_7=Datenquelle
 CdmDataSourceViewPart_8=Typ
 CdmDataSourceViewPart_9=Verf\u00FCgbar
+LanguageEditorPreferencePage_ChooseDefaultLanguage=Bitte wählen Sie die Standardsprache für den Taxonomischen Editor aus.
+LanguageEditorPreferencePage_EditorHasToRestart=Der Taxonomische Editor muss neu gestartet werden, um die Sprache zu wechseln.\nWollen Sie jetzt neu starten?
+LanguageEditorPreferencePage_PleaseRestart=Bitte neu starten
+LanguageEditorPreferencePage_RestartRequired=Nach dem Wechsel der Standardsprache ist ein Neustart erforderlich.
+
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/Messages.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/Messages.java
new file mode 100644
index 000000000..dcbf087ed
--- /dev/null
+++ b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/Messages.java
@@ -0,0 +1,44 @@
+// $Id$
+/**
+ * Copyright (C) 2015 EDIT
+ * European Distributed Institute of Taxonomy
+ * http://www.e-taxonomy.eu
+ *
+ * The contents of this file are subject to the Mozilla Public License Version 1.1
+ * See LICENSE.TXT at the top of this package for the full license terms.
+ */
+package eu.etaxonomy.taxeditor;
+
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * @author pplitzner
+ * @date Apr 14, 2015
+ *
+ */
+public class Messages extends NLS {
+    private static final String BUNDLE_NAME = "OSGI-INF/l10n/messages"; //$NON-NLS-1$
+    public static String LanguageEditorPreferencePage_ChooseDefaultLanguage;
+    public static String LanguageEditorPreferencePage_EditorHasToRestart;
+    public static String LanguageEditorPreferencePage_PleaseRestart;
+    public static String LanguageEditorPreferencePage_RestartRequired;
+    public static String CdmDataSourceViewPart_1;
+    public static String CdmDataSourceViewPart_10;
+    public static String CdmDataSourceViewPart_11;
+    public static String CdmDataSourceViewPart_12;
+    public static String CdmDataSourceViewPart_2;
+    public static String CdmDataSourceViewPart_3;
+    public static String CdmDataSourceViewPart_4;
+    public static String CdmDataSourceViewPart_5;
+    public static String CdmDataSourceViewPart_6;
+    public static String CdmDataSourceViewPart_7;
+    public static String CdmDataSourceViewPart_8;
+    public static String CdmDataSourceViewPart_9;
+    static {
+        // initialize resource bundle
+        NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+    }
+
+    private Messages() {
+    }
+}
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/LanguageEditorPreferencePage.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/LanguageEditorPreferencePage.java
index 16f8e7c88..53ec0636f 100644
--- a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/LanguageEditorPreferencePage.java
+++ b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/LanguageEditorPreferencePage.java
@@ -28,6 +28,8 @@ import org.eclipse.ui.IWorkbench;
 import org.eclipse.ui.IWorkbenchPreferencePage;
 import org.eclipse.ui.PlatformUI;
 
+import eu.etaxonomy.taxeditor.Messages;
+
 /**
  * @author n.hoffmann
  * @created Dec 3, 2010
@@ -56,10 +58,10 @@ public class LanguageEditorPreferencePage extends PreferencePage implements IWor
     private void createEditorDefaultLanguage(Composite container) {
         // TODO Auto-generated method stub
         final Label description = new Label(container, SWT.NONE);
-        description.setText("After changing the default language, a restart is required,\nin order for the new settings to take effect.");
+        description.setText(Messages.LanguageEditorPreferencePage_RestartRequired);
 
         final Label label = new Label(container, SWT.NONE);
-        label.setText("Please choose your default language for the editor: ");
+        label.setText(Messages.LanguageEditorPreferencePage_ChooseDefaultLanguage);
 
         GridData oneLine = new GridData();
         oneLine.grabExcessHorizontalSpace = true;
@@ -97,9 +99,9 @@ public class LanguageEditorPreferencePage extends PreferencePage implements IWor
     private void restoreSavedSelection() {
         String rememberedValue = PreferencesUtil.getPreferenceStore().getString(IPreferenceKeys.DEFAULT_LANGUAGE_EDITOR);
         if(StringUtils.isNotEmpty(rememberedValue)&& StringUtils.isNotBlank(rememberedValue)){
-            if(rememberedValue.equalsIgnoreCase("en")){
+            if(rememberedValue.equalsIgnoreCase("en")){ //$NON-NLS-1$
                 combo.select(1);
-            }else if(rememberedValue.equalsIgnoreCase("de")){
+            }else if(rememberedValue.equalsIgnoreCase("de")){ //$NON-NLS-1$
                  combo.select(0);
             }
         }
@@ -107,7 +109,7 @@ public class LanguageEditorPreferencePage extends PreferencePage implements IWor
 
     private enum Language{
 
-        GERMAN("Deutsch"), ENGLISH("English");
+        GERMAN("Deutsch"), ENGLISH("English"); //$NON-NLS-1$ //$NON-NLS-2$
         private final String label;
         private Language(String label){
             this.label = label;
@@ -136,7 +138,7 @@ public class LanguageEditorPreferencePage extends PreferencePage implements IWor
 	public boolean performOk() {
         try {
             preferencesUtil.writePropertyToConfigFile(combo.getSelectionIndex());
-            boolean result = MessageDialog.openConfirm(getShell(), "Please Restart", "The Taxonomic Editor has to restart now, in order to complete the language switch.\nDo you want to restart now?");
+            boolean result = MessageDialog.openConfirm(getShell(), Messages.LanguageEditorPreferencePage_PleaseRestart, Messages.LanguageEditorPreferencePage_EditorHasToRestart);
             if(result){
                 //Press Ok
                 PlatformUI.getWorkbench().restart();
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/datasource/CdmDataSourceViewPart.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/datasource/CdmDataSourceViewPart.java
index 7e9ce6d15..dd2b91e41 100644
--- a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/datasource/CdmDataSourceViewPart.java
+++ b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/datasource/CdmDataSourceViewPart.java
@@ -49,6 +49,7 @@ import org.eclipse.ui.part.ViewPart;
 import org.eclipse.ui.progress.IWorkbenchSiteProgressService;
 
 import eu.etaxonomy.cdm.config.ICdmSource;
+import eu.etaxonomy.taxeditor.Messages;
 import eu.etaxonomy.taxeditor.datasource.CdmDataSourceRepository;
 import eu.etaxonomy.taxeditor.model.ContextListenerAdapter;
 import eu.etaxonomy.taxeditor.model.IContextListener;
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/datasource/Messages.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/datasource/Messages.java
deleted file mode 100644
index ac1f5ae50..000000000
--- a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/datasource/Messages.java
+++ /dev/null
@@ -1,40 +0,0 @@
-// $Id$
-/**
- * Copyright (C) 2014 EDIT
- * European Distributed Institute of Taxonomy
- * http://www.e-taxonomy.eu
- *
- * The contents of this file are subject to the Mozilla Public License Version 1.1
- * See LICENSE.TXT at the top of this package for the full license terms.
- */
-package eu.etaxonomy.taxeditor.view.datasource;
-
-import org.eclipse.osgi.util.NLS;
-
-/**
- * @author d.schild
- * @date 18.06.2014
- *
- */
-public class Messages extends NLS {
-    private static final String BUNDLE_NAME = "OSGI-INF/l10n/messages"; //$NON-NLS-1$
-    public static String CdmDataSourceViewPart_1;
-    public static String CdmDataSourceViewPart_10;
-    public static String CdmDataSourceViewPart_11;
-    public static String CdmDataSourceViewPart_12;
-    public static String CdmDataSourceViewPart_2;
-    public static String CdmDataSourceViewPart_3;
-    public static String CdmDataSourceViewPart_4;
-    public static String CdmDataSourceViewPart_5;
-    public static String CdmDataSourceViewPart_6;
-    public static String CdmDataSourceViewPart_7;
-    public static String CdmDataSourceViewPart_8;
-    public static String CdmDataSourceViewPart_9;
-    static {
-        // initialize resource bundle
-        NLS.initializeMessages(BUNDLE_NAME, Messages.class);
-    }
-
-    private Messages() {
-    }
-}
