/** * Actually submits the selected translation * * @param userName The content of the User Name Field * @param userEmail The content of the User E-Mail address Field */ public void submitTranslation(String userName, String userEmail, boolean contribute) { if (this.isValidEmailAddress(userEmail)) { this.ui.alert(InternationalisationUtils.getI18NString(I18N_COMMON_INVALID_EMAIL)); } else { String subject = "FrontlineSMS translation: " + this.languageBundle.getLanguageName(); String textContent = "Sent translation: " + this.languageBundle.getLanguageName() + " (" + this.languageBundle.getLanguageCode() + ").\n" + userName + (contribute ? " would" : " wouldn't") + " like to appear as a contributor for this translation."; try { FrontlineUtils.sendToFrontlineSupport( userName, userEmail, subject, textContent, InternationalisationUtils.getLanguageDirectory() + File.separator + languageBundle.getFilename()); this.removeDialog(); this.ui.infoMessage(InternationalisationUtils.getI18NString(I18N_TRANSLATION_SENT)); } catch (EmailException e) { this.ui.alert(InternationalisationUtils.getI18NString(I18N_UNABLE_SEND_TRANSLATION)); } } }