Package org.olat.core.gui.translator

Examples of org.olat.core.gui.translator.Translator.translate()


    int returnCode = mailerResult.getReturnCode();
    List<Identity> failedIdentites = mailerResult.getFailedIdentites();

    // first the severe errors
    if (returnCode == MailerResult.SEND_GENERAL_ERROR) {
      errors.append("<p>").append(trans.translate("mailhelper.error.send.general")).append("</p>");
    } else if (returnCode == MailerResult.SENDER_ADDRESS_ERROR) {
      errors.append("<p>").append(trans.translate("mailhelper.error.sender.address")).append("</p>");
    } else if (returnCode == MailerResult.RECIPIENT_ADDRESS_ERROR) {
      errors.append("<p>").append(trans.translate("mailhelper.error.recipient.address")).append("</p>");
    } else if (returnCode == MailerResult.TEMPLATE_GENERAL_ERROR) {
View Full Code Here


    // first the severe errors
    if (returnCode == MailerResult.SEND_GENERAL_ERROR) {
      errors.append("<p>").append(trans.translate("mailhelper.error.send.general")).append("</p>");
    } else if (returnCode == MailerResult.SENDER_ADDRESS_ERROR) {
      errors.append("<p>").append(trans.translate("mailhelper.error.sender.address")).append("</p>");
    } else if (returnCode == MailerResult.RECIPIENT_ADDRESS_ERROR) {
      errors.append("<p>").append(trans.translate("mailhelper.error.recipient.address")).append("</p>");
    } else if (returnCode == MailerResult.TEMPLATE_GENERAL_ERROR) {
      errors.append("<p>").append(trans.translate("mailhelper.error.template.general")).append("</p>");
    } else if (returnCode == MailerResult.TEMPLATE_PARSE_ERROR) {
View Full Code Here

   * @author Florian Gnaegi, frentix GmbH, http://www.frentix.com
   */
  public static DialogBoxController createYesNoDialog(UserRequest ureq, WindowControl wControl, String title, String text) {
    Translator trans = Util.createPackageTranslator(DialogBoxUIFactory.class, ureq.getLocale());
    List<String> yesNoButtons = new ArrayList<String>();
    yesNoButtons.add(trans.translate("yes"));
    yesNoButtons.add(trans.translate("no"));
    DialogBoxController dialogCtr = new DialogBoxController(ureq, wControl, title, text, yesNoButtons);
    return dialogCtr;
  }

View Full Code Here

   */
  public static DialogBoxController createYesNoDialog(UserRequest ureq, WindowControl wControl, String title, String text) {
    Translator trans = Util.createPackageTranslator(DialogBoxUIFactory.class, ureq.getLocale());
    List<String> yesNoButtons = new ArrayList<String>();
    yesNoButtons.add(trans.translate("yes"));
    yesNoButtons.add(trans.translate("no"));
    DialogBoxController dialogCtr = new DialogBoxController(ureq, wControl, title, text, yesNoButtons);
    return dialogCtr;
  }

  /**
 
View Full Code Here

    if (returnCode == MailerResult.SEND_GENERAL_ERROR) {
      errors.append("<p>").append(trans.translate("mailhelper.error.send.general")).append("</p>");
    } else if (returnCode == MailerResult.SENDER_ADDRESS_ERROR) {
      errors.append("<p>").append(trans.translate("mailhelper.error.sender.address")).append("</p>");
    } else if (returnCode == MailerResult.RECIPIENT_ADDRESS_ERROR) {
      errors.append("<p>").append(trans.translate("mailhelper.error.recipient.address")).append("</p>");
    } else if (returnCode == MailerResult.TEMPLATE_GENERAL_ERROR) {
      errors.append("<p>").append(trans.translate("mailhelper.error.template.general")).append("</p>");
    } else if (returnCode == MailerResult.TEMPLATE_PARSE_ERROR) {
      errors.append("<p>").append(trans.translate("mailhelper.error.template.parse")).append("</p>");
    } else if (returnCode == MailerResult.ATTACHMENT_INVALID) {
View Full Code Here

    } else if (returnCode == MailerResult.SENDER_ADDRESS_ERROR) {
      errors.append("<p>").append(trans.translate("mailhelper.error.sender.address")).append("</p>");
    } else if (returnCode == MailerResult.RECIPIENT_ADDRESS_ERROR) {
      errors.append("<p>").append(trans.translate("mailhelper.error.recipient.address")).append("</p>");
    } else if (returnCode == MailerResult.TEMPLATE_GENERAL_ERROR) {
      errors.append("<p>").append(trans.translate("mailhelper.error.template.general")).append("</p>");
    } else if (returnCode == MailerResult.TEMPLATE_PARSE_ERROR) {
      errors.append("<p>").append(trans.translate("mailhelper.error.template.parse")).append("</p>");
    } else if (returnCode == MailerResult.ATTACHMENT_INVALID) {
      errors.append("<p>").append(trans.translate("mailhelper.error.attachment")).append("</p>");
    } else {
View Full Code Here

    } else if (returnCode == MailerResult.RECIPIENT_ADDRESS_ERROR) {
      errors.append("<p>").append(trans.translate("mailhelper.error.recipient.address")).append("</p>");
    } else if (returnCode == MailerResult.TEMPLATE_GENERAL_ERROR) {
      errors.append("<p>").append(trans.translate("mailhelper.error.template.general")).append("</p>");
    } else if (returnCode == MailerResult.TEMPLATE_PARSE_ERROR) {
      errors.append("<p>").append(trans.translate("mailhelper.error.template.parse")).append("</p>");
    } else if (returnCode == MailerResult.ATTACHMENT_INVALID) {
      errors.append("<p>").append(trans.translate("mailhelper.error.attachment")).append("</p>");
    } else {
      // mail could be send, but maybe not to all the users (e.g. invalid mail
      // adresses or a temporary problem)
View Full Code Here

   * @author Florian Gnaegi, frentix GmbH, http://www.frentix.com
   */
  public static DialogBoxController createOkCancelDialog(UserRequest ureq, WindowControl wControl, String title, String text) {
    Translator trans = Util.createPackageTranslator(DialogBoxUIFactory.class, ureq.getLocale());
    List<String> okCancelButtons = new ArrayList<String>();
    okCancelButtons.add(trans.translate("ok"));
    okCancelButtons.add(trans.translate("cancel"));
    DialogBoxController dialogCtr = new DialogBoxController(ureq, wControl, title, text, okCancelButtons);
    return dialogCtr;
  }

View Full Code Here

    } else if (returnCode == MailerResult.TEMPLATE_GENERAL_ERROR) {
      errors.append("<p>").append(trans.translate("mailhelper.error.template.general")).append("</p>");
    } else if (returnCode == MailerResult.TEMPLATE_PARSE_ERROR) {
      errors.append("<p>").append(trans.translate("mailhelper.error.template.parse")).append("</p>");
    } else if (returnCode == MailerResult.ATTACHMENT_INVALID) {
      errors.append("<p>").append(trans.translate("mailhelper.error.attachment")).append("</p>");
    } else {
      // mail could be send, but maybe not to all the users (e.g. invalid mail
      // adresses or a temporary problem)
      if (failedIdentites != null && failedIdentites.size() > 0) {
        warnings.append("<p>").append(trans.translate("mailhelper.error.failedusers"));
View Full Code Here

   */
  public static DialogBoxController createOkCancelDialog(UserRequest ureq, WindowControl wControl, String title, String text) {
    Translator trans = Util.createPackageTranslator(DialogBoxUIFactory.class, ureq.getLocale());
    List<String> okCancelButtons = new ArrayList<String>();
    okCancelButtons.add(trans.translate("ok"));
    okCancelButtons.add(trans.translate("cancel"));
    DialogBoxController dialogCtr = new DialogBoxController(ureq, wControl, title, text, okCancelButtons);
    return dialogCtr;
  }

  /**
 
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.