Fixes #2427
authorl.morris <l.morris@localhost>
Tue, 17 Jan 2012 12:24:26 +0000 (12:24 +0000)
committerl.morris <l.morris@localhost>
Tue, 17 Jan 2012 12:24:26 +0000 (12:24 +0000)
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/translation/TranslationWizard.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/translation/TranslationWizardPage.java

index dd079db6e55e2063c50d9bdc387a88bacc1d81f5..93c48b11f0ac99906713b3646919d88271b2577e 100644 (file)
@@ -57,6 +57,12 @@ public class TranslationWizard extends Wizard {
        /** {@inheritDoc} */
        @Override
        public boolean performFinish() {
        /** {@inheritDoc} */
        @Override
        public boolean performFinish() {
+               LanguageString languageString = page.getTargetLanguageString();
+               
+               if (!languageString.getText().equals("")) {
+                       multilanguageText.put(languageString.getLanguage(), languageString);
+               }
+               
                return true;
        }
        
                return true;
        }
        
index 4f1f5071812d1aeb7bf5e5d5e4d8e26e03fcef43..111a86e9e2494088f8a7ed9e19fe1d419ceea9aa 100644 (file)
@@ -129,7 +129,7 @@ public class TranslationWizardPage extends WizardPage{
         */
        private void createLeftControls(ICdmFormElement element){
                
         */
        private void createLeftControls(ICdmFormElement element){
                
-               combo_sourceLanguage = formFactory.createTermComboElement(null, element, null, null, SWT.NULL);
+               combo_sourceLanguage = formFactory.createTermComboElement(Language.class, element, null, null, SWT.NULL);
                combo_sourceLanguage.setTerms(getLanguages());
                
                combo_sourceLanguage.addSelectionListener(new SelectionAdapter() {
                combo_sourceLanguage.setTerms(getLanguages());
                
                combo_sourceLanguage.addSelectionListener(new SelectionAdapter() {
@@ -171,7 +171,6 @@ public class TranslationWizardPage extends WizardPage{
                                        languageString = multilanguageText.get(language);
                                }else{
                                        languageString = LanguageString.NewInstance("", language);
                                        languageString = multilanguageText.get(language);
                                }else{
                                        languageString = LanguageString.NewInstance("", language);
-                                       multilanguageText.put(language, languageString);
                                }
                                
                                text_target.setLanguageString(languageString);
                                }
                                
                                text_target.setLanguageString(languageString);
@@ -227,4 +226,12 @@ public class TranslationWizardPage extends WizardPage{
        public void dispose() {
                super.dispose();
        }
        public void dispose() {
                super.dispose();
        }
+
+       /**
+        * @return 
+        * 
+        */
+       public LanguageString getTargetLanguageString() {
+               return text_target.getLanguageString();
+       }
 }
 }