ref #6321 i18n
authorPatrick Plitzner <p.plitzner@bgbm.org>
Mon, 4 Jun 2018 09:04:47 +0000 (11:04 +0200)
committerPatrick Plitzner <p.plitzner@bgbm.org>
Mon, 4 Jun 2018 09:04:47 +0000 (11:04 +0200)
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/input/AbstractBulkEditorInput.java
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/l10n/Messages.java
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/l10n/messages.properties
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/l10n/messages_de.properties

index 73ec63a69a4b480e7a1f9de911935d9be0f339c6..ffb762dc449cc686e80f4fbab3bdec5eea80b9d4 100644 (file)
@@ -42,6 +42,7 @@ import eu.etaxonomy.taxeditor.bulkeditor.input.sortprovider.CdmBaseSortProvider;
 import eu.etaxonomy.taxeditor.bulkeditor.input.sortprovider.TitleCacheComparator;
 import eu.etaxonomy.taxeditor.bulkeditor.internal.TaxeditorBulkeditorPlugin;
 import eu.etaxonomy.taxeditor.editor.CdmEntitySessionInput;
+import eu.etaxonomy.taxeditor.l10n.Messages;
 import eu.etaxonomy.taxeditor.model.MessagingUtils;
 import eu.etaxonomy.taxeditor.store.CdmStore;
 
@@ -143,7 +144,7 @@ public abstract class AbstractBulkEditorInput<T extends CdmBase> extends CdmEnti
 
        public void performSearch(final BulkEditorQuery bulkEditorQuery) {
            if(searchJob!=null && searchJob.getState()!=Job.NONE){
-               MessagingUtils.informationDialog("Search not possible", "Please wait for the last search to finish or cancel it.");
+               MessagingUtils.informationDialog(Messages.AbstractBulkEditorInput_MULTIPLE_SEARCH_TITLE, Messages.AbstractBulkEditorInput_MULTIPLE_SEARCH_MESSAGE);
                return;
            }
            model.clear();
@@ -158,7 +159,7 @@ public abstract class AbstractBulkEditorInput<T extends CdmBase> extends CdmEnti
                        IIdentifiableEntityServiceConfigurator configurator = bulkEditorQuery.getSearchConfigurator();
                        Comparator queryComparator = (bulkEditorQuery.getComparator() != null) ? bulkEditorQuery.getComparator() : new TitleCacheComparator();
 
-                       String jobLabel = "Loading "+getName();
+                       String jobLabel = Messages.AbstractBulkEditorInput_LOADING+getName();
                searchJob = Job.create(jobLabel, (ICoreRunnable) monitor -> {
                    monitor.beginTask(jobLabel, IProgressMonitor.UNKNOWN);
                    int pageNumber = 0;
@@ -199,9 +200,9 @@ public abstract class AbstractBulkEditorInput<T extends CdmBase> extends CdmEnti
                        try {
                                CdmStore.getCommonService().merge(mergeTarget.getUuid(), entity.getUuid(), (Class<? extends CdmBase>)entity.getClass());
                        } catch (MergeException e) {
-                               MessagingUtils.errorDialog("Bulk Editor Merge Error",
+                               MessagingUtils.errorDialog(Messages.AbstractBulkEditorInput_MERGE_ERROR_TITLE,
                                                this,
-                                               "Could not merge chosen objects of type " + entity.getClass().getName(),
+                                               String.format(Messages.AbstractBulkEditorInput_MERGE_ERROR_MESSAGE, entity.getClass().getName()),
                                                TaxeditorBulkeditorPlugin.PLUGIN_ID,
                                                e,
                                                true);
@@ -282,18 +283,18 @@ public abstract class AbstractBulkEditorInput<T extends CdmBase> extends CdmEnti
        public String getText(T entity) {
                if(entity instanceof IdentifiableEntity){
                        IdentifiableEntity identifiableEntity = (IdentifiableEntity) HibernateProxyHelper.deproxy(entity);
-                       String text = "";
+                       String text = ""; //$NON-NLS-1$
                        if(markedMergeCandidates.contains(entity)){
-                           text += "[Candidate] ";
+                           text += Messages.AbstractBulkEditorInput_CANDIDATE;
                        }
                        else if(markedMergeTarget==entity){
-                           text += "[Target] ";
+                           text += Messages.AbstractBulkEditorInput_TARGET;
                        }
                        text += identifiableEntity.getTitleCache();
                        return text;
                }
 
-               return "No text. Implement in subclass";
+               return "No text. Implement in subclass"; //$NON-NLS-1$
        }
 
        public BasicEventList<T> getModel() {
index c5206d5b9eab36baa506c5c1c64baaf4a57a4d40..f9417080edf1f4e5c31edb78868efcef6af0ca97 100644 (file)
@@ -4,6 +4,13 @@ import org.eclipse.osgi.util.NLS;
 
 public class Messages extends NLS {
     private static final String BUNDLE_NAME = "src/main/java/eu.etaxonomy.taxeditor.l10n.messages"; //$NON-NLS-1$
+    public static String AbstractBulkEditorInput_CANDIDATE;
+    public static String AbstractBulkEditorInput_LOADING;
+    public static String AbstractBulkEditorInput_MERGE_ERROR_MESSAGE;
+    public static String AbstractBulkEditorInput_MERGE_ERROR_TITLE;
+    public static String AbstractBulkEditorInput_MULTIPLE_SEARCH_MESSAGE;
+    public static String AbstractBulkEditorInput_MULTIPLE_SEARCH_TITLE;
+    public static String AbstractBulkEditorInput_TARGET;
     public static String USER_CREATOR_user_exists_title;
     public static String USER_CREATOR_user_exists;
        public static String BulkEditorE4_CANCEL;
index f77fcd922a359fe5a242414501eb1c13511501b9..0890b6cc93ca2ba6a18639269ac677aedccd326b 100644 (file)
@@ -1,3 +1,10 @@
+AbstractBulkEditorInput_CANDIDATE=[Candidate] 
+AbstractBulkEditorInput_LOADING=Loading 
+AbstractBulkEditorInput_MERGE_ERROR_MESSAGE=Could not merge chosen objects of type %s
+AbstractBulkEditorInput_MERGE_ERROR_TITLE=Merging failes
+AbstractBulkEditorInput_MULTIPLE_SEARCH_MESSAGE=Please wait for the last search to finish or cancel it.
+AbstractBulkEditorInput_MULTIPLE_SEARCH_TITLE=Search not possible
+AbstractBulkEditorInput_TARGET=[Target] 
 BulkEditorE4_CANCEL=Cancel
 BulkEditorE4_DONT_SAVE=Don't save (and Search)
 BulkEditorE4_SAVE_AND_SEARCH=Save (and Search)
index ffa76cf49281359119dd4d6db41e6d5a07f3d55c..a5c1d3e7bdd01f201d064983eddcf54a90dd8177 100644 (file)
@@ -1,3 +1,10 @@
+AbstractBulkEditorInput_CANDIDATE=[Kandidat] 
+AbstractBulkEditorInput_LOADING=Lade 
+AbstractBulkEditorInput_MERGE_ERROR_MESSAGE=Zusammenführen von Objekten des Typen %s fehlgeschlagen 
+AbstractBulkEditorInput_MERGE_ERROR_TITLE=Zusammenführen fehlgeschlagen
+AbstractBulkEditorInput_MULTIPLE_SEARCH_MESSAGE=Bitte warten Sie, bis die letzte Suche beendet wurde oder brechen Sie sie ab.
+AbstractBulkEditorInput_MULTIPLE_SEARCH_TITLE=Suche nicht möglich
+AbstractBulkEditorInput_TARGET=[Ziel] 
 BulkEditorE4_CANCEL=Abbrechen
 BulkEditorE4_DONT_SAVE=Nicht specichern (und suchen)
 BulkEditorE4_SAVE_AND_SEARCH=Speichern (und suchen)