I18n for bulkeditor type #4553
authorAndreas Müller <a.mueller@bgbm.org>
Wed, 22 Apr 2015 16:09:54 +0000 (16:09 +0000)
committerAndreas Müller <a.mueller@bgbm.org>
Wed, 22 Apr 2015 16:09:54 +0000 (16:09 +0000)
.gitattributes
eu.etaxonomy.taxeditor.bulkeditor/OSGI-INF/l10n/messages.properties [new file with mode: 0644]
eu.etaxonomy.taxeditor.bulkeditor/OSGI-INF/l10n/messages_de.properties [new file with mode: 0644]
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/input/BulkEditorInputType.java
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/input/Messages.java [new file with mode: 0644]

index 8bed8115a6aa7a8403f6dab9f3e8e57950f2c6bc..05ad65ab39d9fb835b8a018efb4b39933a4ad21c 100644 (file)
@@ -47,6 +47,8 @@ eu.etaxonomy.taxeditor.bulkeditor/.project -text
 eu.etaxonomy.taxeditor.bulkeditor/META-INF/MANIFEST.MF -text
 eu.etaxonomy.taxeditor.bulkeditor/OSGI-INF/l10n/bundle.properties -text
 eu.etaxonomy.taxeditor.bulkeditor/OSGI-INF/l10n/bundle_de.properties -text
+eu.etaxonomy.taxeditor.bulkeditor/OSGI-INF/l10n/messages.properties -text
+eu.etaxonomy.taxeditor.bulkeditor/OSGI-INF/l10n/messages_de.properties -text
 eu.etaxonomy.taxeditor.bulkeditor/build.properties -text
 eu.etaxonomy.taxeditor.bulkeditor/icons/merge_candidate.gif -text
 eu.etaxonomy.taxeditor.bulkeditor/icons/merge_target.gif -text
@@ -96,6 +98,7 @@ eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkedito
 eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/input/AgentEditorInput.java -text
 eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/input/BulkEditorInputType.java -text
 eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/input/GroupEditorInput.java -text
+eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/input/Messages.java -text
 eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/input/NameEditorInput.java -text
 eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/input/NameRelationshipEditorInput.java -text
 eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/input/OccurrenceEditorInput.java -text
diff --git a/eu.etaxonomy.taxeditor.bulkeditor/OSGI-INF/l10n/messages.properties b/eu.etaxonomy.taxeditor.bulkeditor/OSGI-INF/l10n/messages.properties
new file mode 100644 (file)
index 0000000..00a528b
--- /dev/null
@@ -0,0 +1,8 @@
+BulkEditorInputType_0=Person and Team\r
+BulkEditorInputType_1=Reference\r
+BulkEditorInputType_2=Name\r
+BulkEditorInputType_3=Name Relationship\r
+BulkEditorInputType_4=Specimen and Observation\r
+BulkEditorInputType_5=User\r
+BulkEditorInputType_6=Group\r
+BulkEditorInputType_7=Taxon\r
diff --git a/eu.etaxonomy.taxeditor.bulkeditor/OSGI-INF/l10n/messages_de.properties b/eu.etaxonomy.taxeditor.bulkeditor/OSGI-INF/l10n/messages_de.properties
new file mode 100644 (file)
index 0000000..98b9344
--- /dev/null
@@ -0,0 +1,8 @@
+BulkEditorInputType_0=Person und Team \r
+BulkEditorInputType_1=Referenz\r
+BulkEditorInputType_2=Name\r
+BulkEditorInputType_3=Namensbeziehung\r
+BulkEditorInputType_4=Beleg und Beobachtung\r
+BulkEditorInputType_5=Nutzer\r
+BulkEditorInputType_6=Nutzergruppe\r
+BulkEditorInputType_7=Taxon\r
index dd3df61989234c1c41db2cc9c26a9df296affc39..cb7020b31117300c060f6101c4e07fecb1344f01 100644 (file)
@@ -1,7 +1,9 @@
 package eu.etaxonomy.taxeditor.bulkeditor.input;
 
 import java.util.HashMap;
+import java.util.Locale;
 import java.util.Map;
+import java.util.ResourceBundle;
 
 import org.eclipse.jface.action.IContributionItem;
 import org.eclipse.swt.SWT;
@@ -26,19 +28,22 @@ import eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationBase;
 import eu.etaxonomy.cdm.model.reference.Reference;
 import eu.etaxonomy.cdm.model.taxon.Taxon;
 import eu.etaxonomy.taxeditor.bulkeditor.IBulkEditorConstants;
+import eu.etaxonomy.taxeditor.preference.IPreferenceKeys;
+import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
 
 public enum BulkEditorInputType {
-       AGENT("Authors and Author Teams", AgentEditorInput.ID), 
-       REFERENCE("Reference", ReferenceEditorInput.ID), 
-       NAME("Name", NameEditorInput.ID), 
-       NAME_RELATIONSHIP("Name Relationship", NameRelationshipEditorInput.ID), 
-       OCCURRENCE("Specimens and Observations", OccurrenceEditorInput.ID), 
-       USER("User", UserEditorInput.ID), 
-       GROUP("Group", GroupEditorInput.ID),
-       TAXON("Taxon", TaxonEditorInput.ID);
+       AGENT(Messages.BulkEditorInputType_0, AgentEditorInput.ID), 
+       REFERENCE(Messages.BulkEditorInputType_1, ReferenceEditorInput.ID), 
+       NAME(Messages.BulkEditorInputType_2, NameEditorInput.ID), 
+       NAME_RELATIONSHIP(Messages.BulkEditorInputType_3, NameRelationshipEditorInput.ID), 
+       OCCURRENCE(Messages.BulkEditorInputType_4, OccurrenceEditorInput.ID), 
+       USER(Messages.BulkEditorInputType_5, UserEditorInput.ID), 
+       GROUP(Messages.BulkEditorInputType_6, GroupEditorInput.ID),
+       TAXON(Messages.BulkEditorInputType_7, TaxonEditorInput.ID);
 
        public String id;
        public String label;
+       public ResourceBundle resourceBundle; 
 
        BulkEditorInputType(String label, String id) {
                this.id = id;
@@ -143,7 +148,7 @@ public enum BulkEditorInputType {
                        return new TaxonEditorInput();
                default:
                        throw new IllegalStateException(
-                                       "No input class for the given input type defined.");
+                                       "No input class for the given input type defined."); //$NON-NLS-1$
                }
        }
        
@@ -168,7 +173,7 @@ public enum BulkEditorInputType {
                        return ITaxonService.class;
                default:
                        throw new IllegalStateException(
-                                       "No input class for the given input type defined.");
+                                       "No input class for the given input type defined."); //$NON-NLS-1$
                }
        }
 }
\ No newline at end of file
diff --git a/eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/input/Messages.java b/eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/input/Messages.java
new file mode 100644 (file)
index 0000000..5d046af
--- /dev/null
@@ -0,0 +1,22 @@
+package eu.etaxonomy.taxeditor.bulkeditor.input;\r
+\r
+import org.eclipse.osgi.util.NLS;\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 BulkEditorInputType_0;\r
+       public static String BulkEditorInputType_1;\r
+       public static String BulkEditorInputType_2;\r
+       public static String BulkEditorInputType_3;\r
+       public static String BulkEditorInputType_4;\r
+       public static String BulkEditorInputType_5;\r
+       public static String BulkEditorInputType_6;\r
+       public static String BulkEditorInputType_7;\r
+       static {\r
+               // initialize resource bundle\r
+               NLS.initializeMessages(BUNDLE_NAME, Messages.class);\r
+       }\r
+\r
+       private Messages() {\r
+       }\r
+}\r