- i18n language preferences
authorPatric Plitzner <p.plitzner@bgbm.org>
Tue, 14 Apr 2015 14:57:55 +0000 (14:57 +0000)
committerPatric Plitzner <p.plitzner@bgbm.org>
Tue, 14 Apr 2015 14:57:55 +0000 (14:57 +0000)
.gitattributes
eu.etaxonomy.taxeditor.store/OSGI-INF/l10n/messages.properties
eu.etaxonomy.taxeditor.store/OSGI-INF/l10n/messages_de.properties
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/Messages.java [moved from eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/datasource/Messages.java with 74% similarity]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/LanguageEditorPreferencePage.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/datasource/CdmDataSourceViewPart.java

index cf5f071..e8b0c30 100644 (file)
@@ -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
index 887b082..9db526a 100644 (file)
@@ -10,3 +10,7 @@ CdmDataSourceViewPart_6=Nomenclatural Code
 CdmDataSourceViewPart_7=Database\r
 CdmDataSourceViewPart_8=Type\r
 CdmDataSourceViewPart_9=Up\r
+LanguageEditorPreferencePage_ChooseDefaultLanguage=Please choose your default language for the editor: \r
+LanguageEditorPreferencePage_EditorHasToRestart=The Taxonomic Editor has to restart now, in order to complete the language switch.\nDo you want to restart now?\r
+LanguageEditorPreferencePage_PleaseRestart=Please Restart\r
+LanguageEditorPreferencePage_RestartRequired=After changing the default language, a restart is required,\nin order for the new settings to take effect.\r
index ca15205..86c8059 100644 (file)
@@ -10,3 +10,8 @@ CdmDataSourceViewPart_6=Nomenklaturcode
 CdmDataSourceViewPart_7=Datenquelle\r
 CdmDataSourceViewPart_8=Typ\r
 CdmDataSourceViewPart_9=Verf\u00FCgbar\r
+LanguageEditorPreferencePage_ChooseDefaultLanguage=Bitte wählen Sie die Standardsprache für den Taxonomischen Editor aus.\r
+LanguageEditorPreferencePage_EditorHasToRestart=Der Taxonomische Editor muss neu gestartet werden, um die Sprache zu wechseln.\nWollen Sie jetzt neu starten?\r
+LanguageEditorPreferencePage_PleaseRestart=Bitte neu starten\r
+LanguageEditorPreferencePage_RestartRequired=Nach dem Wechsel der Standardsprache ist ein Neustart erforderlich.\r
+\r
@@ -1,40 +1,44 @@
-// $Id$\r
-/**\r
- * Copyright (C) 2014 EDIT\r
- * European Distributed Institute of Taxonomy\r
- * http://www.e-taxonomy.eu\r
- *\r
- * The contents of this file are subject to the Mozilla Public License Version 1.1\r
- * See LICENSE.TXT at the top of this package for the full license terms.\r
- */\r
-package eu.etaxonomy.taxeditor.view.datasource;\r
-\r
-import org.eclipse.osgi.util.NLS;\r
-\r
-/**\r
- * @author d.schild\r
- * @date 18.06.2014\r
- *\r
- */\r
-public class Messages extends NLS {\r
-    private static final String BUNDLE_NAME = "OSGI-INF/l10n/messages"; //$NON-NLS-1$\r
-    public static String CdmDataSourceViewPart_1;\r
-    public static String CdmDataSourceViewPart_10;\r
-    public static String CdmDataSourceViewPart_11;\r
-    public static String CdmDataSourceViewPart_12;\r
-    public static String CdmDataSourceViewPart_2;\r
-    public static String CdmDataSourceViewPart_3;\r
-    public static String CdmDataSourceViewPart_4;\r
-    public static String CdmDataSourceViewPart_5;\r
-    public static String CdmDataSourceViewPart_6;\r
-    public static String CdmDataSourceViewPart_7;\r
-    public static String CdmDataSourceViewPart_8;\r
-    public static String CdmDataSourceViewPart_9;\r
-    static {\r
-        // initialize resource bundle\r
-        NLS.initializeMessages(BUNDLE_NAME, Messages.class);\r
-    }\r
-\r
-    private Messages() {\r
-    }\r
-}\r
+// $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() {
+    }
+}
index 16f8e7c..53ec063 100644 (file)
@@ -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();
index 7e9ce6d..dd2b91e 100644 (file)
@@ -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;