ref #8147 Store representation if only plural is set
authorPatrick Plitzner <p.plitzner@bgbm.org>
Thu, 4 Apr 2019 13:18:39 +0000 (15:18 +0200)
committerPatrick Plitzner <p.plitzner@bgbm.org>
Thu, 4 Apr 2019 13:18:55 +0000 (15:18 +0200)
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/vocabulary/TermTranslationWizard.java

index 467242e9f9b88ce0d4f682a34c45438eb3f936e2..391bde5b41bf65bd1e67672cab39e06193157acc 100644 (file)
@@ -10,6 +10,7 @@ package eu.etaxonomy.taxeditor.ui.section.vocabulary;
 
 import org.eclipse.jface.wizard.Wizard;
 
+import eu.etaxonomy.cdm.common.CdmUtils;
 import eu.etaxonomy.cdm.model.term.Representation;
 import eu.etaxonomy.cdm.model.term.TermBase;
 import eu.etaxonomy.taxeditor.ui.translation.TermTranslationWizardPage;
@@ -52,11 +53,14 @@ public class TermTranslationWizard extends Wizard {
     @Override
     public boolean performFinish() {
         Representation representation = page.getTargetRepresentation();
-        
+
         if (representation.getLanguage() == null){
                return false;
         }
-        if (!representation.getText().equals("") || !representation.getLabel().equals("") || !representation.getAbbreviatedLabel().equals("")) {
+        if (CdmUtils.isNotBlank(representation.getText())
+                || CdmUtils.isNotBlank(representation.getLabel())
+                || CdmUtils.isNotBlank(representation.getAbbreviatedLabel())
+                || CdmUtils.isNotBlank(representation.getPlural())){
             term.addRepresentation(representation);
         }