ref #4611 some l10n for taxeditor and taxeditor.editor plugin
[taxeditor.git] / eu.etaxonomy.taxeditor.editor / src / main / java / eu / etaxonomy / taxeditor / editor / name / TaxonNameEditor.java
index 7733dfd52805ae37089d6d70b08be14788b5d37a..96dca057e7010c956a6d830ffc4c408792efafd1 100644 (file)
@@ -55,6 +55,7 @@ import eu.etaxonomy.taxeditor.editor.CdmDataTransfer;
 import eu.etaxonomy.taxeditor.editor.IDropTargetable;
 import eu.etaxonomy.taxeditor.editor.IMultiPageTaxonEditorPage;
 import eu.etaxonomy.taxeditor.editor.ISecuredEditor;
+import eu.etaxonomy.taxeditor.editor.Messages;
 import eu.etaxonomy.taxeditor.editor.MultiPageTaxonEditor;
 import eu.etaxonomy.taxeditor.editor.SimpleSelectionProvider;
 import eu.etaxonomy.taxeditor.editor.TaxonEditorInput;
@@ -91,7 +92,7 @@ public class TaxonNameEditor extends EditorPart implements
                ISelectionListener, IDropTargetable, ISecuredEditor {
 
        /** Constant <code>ID="eu.etaxonomy.taxeditor.editor.taxon.name"</code> */
-       public static final String ID = "eu.etaxonomy.taxeditor.editor.taxon.name";
+       public static final String ID = "eu.etaxonomy.taxeditor.editor.taxon.name"; //$NON-NLS-1$
 
        private Taxon taxon;
 
@@ -240,6 +241,7 @@ public class TaxonNameEditor extends EditorPart implements
                ContainerFactory.createOrUpdateHeterotypicSynonymyGroups(this);
                ContainerFactory.createOrUpdateMisapplicationsGroup(this);
 
+
                // Redraw composite
                managedForm.reflow(true);
        }
@@ -275,7 +277,7 @@ public class TaxonNameEditor extends EditorPart implements
            PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell().setFocus();
                if (getSelectedContainer() == null) {
                        throw new IllegalStateException(
-                                       "There should always be a selected object.");
+                                       Messages.TaxonNameEditor_THERE_SHOULD_ALWAYS_BE);
                }
                getSelectedContainer().setSelected();
 
@@ -467,13 +469,13 @@ public class TaxonNameEditor extends EditorPart implements
        @Override
        public void doSave(IProgressMonitor monitor) {
 
-               monitor.beginTask("Saving names", getGroupedContainers().size());
+               monitor.beginTask(Messages.TaxonNameEditor_SAVING_NAMES, getGroupedContainers().size());
 
                try {
                        // check for empty names
                        for (AbstractGroupedContainer container : getGroupedContainers()) {
 
-                               monitor.subTask("Saving composite: "
+                               monitor.subTask(Messages.TaxonNameEditor_SAVING_COMPOSITES
                                                + container.getTaxonBase().getTitleCache());
                                container.persistName();
 
@@ -504,13 +506,13 @@ public class TaxonNameEditor extends EditorPart implements
                        throws PartInitException {
 
                if (!(input != null)) {
-            throw new PartInitException("Invalid Input: Must be IEditorInput");
+            throw new PartInitException(Messages.TaxonNameEditor_INVALID_INPUT);
         }
 
                if (input.getAdapter(Taxon.class) != null) {
                        taxon = CdmBase.deproxy(input.getAdapter(Taxon.class), Taxon.class);
                } else {
-                       throw new PartInitException("Invalid Input: Taxon cannot be null");
+                       throw new PartInitException(Messages.TaxonNameEditor_INVALID_INPUT_TAXON_NULL);
                }
 
                setSite(site);