Package org.olat.core.gui.translator

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


    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

    } 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

      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"));
        warnings.append("<ul>");
        for (Identity identity : failedIdentites) {
          User user = identity.getUser();
          warnings.append("<li>");
          warnings.append(trans.translate("mailhelper.error.failedusers.user", new String[] { user.getProperty(UserConstants.FIRSTNAME, null), user.getProperty(UserConstants.LASTNAME, null),
View Full Code Here

        warnings.append("<p>").append(trans.translate("mailhelper.error.failedusers"));
        warnings.append("<ul>");
        for (Identity identity : failedIdentites) {
          User user = identity.getUser();
          warnings.append("<li>");
          warnings.append(trans.translate("mailhelper.error.failedusers.user", new String[] { user.getProperty(UserConstants.FIRSTNAME, null), user.getProperty(UserConstants.LASTNAME, null),
              user.getProperty(UserConstants.EMAIL, null), identity.getName() }));
          warnings.append("</li>");
        }
        warnings.append("</ul></p>");
      }
View Full Code Here

      String pageIdentifyer = pageIdentifyers.get(i);
      int splitPos = pageIdentifyer.indexOf(":");
      String bundleName = pageIdentifyer.substring(0, splitPos);
      String page = pageIdentifyer.substring(splitPos+1);
      PackageTranslator pageTans = new PackageTranslator(bundleName, getLocale());
      String pageTitle = pageTans.translate("chelp." + page.split("\\.")[0] + ".title");
      Link link = LinkFactory.createLink(i+"", tocVC, this);
      link.setCustomDisplayText(pageTitle);
      link.setUserObject(pageIdentifyer);
      // add to list of links and names
      tocVC.put(i+"", link);
View Full Code Here

      String pageIdentifyer = (String) link.getUserObject();
      int splitPos = pageIdentifyer.indexOf(":");
      String bundleName = pageIdentifyer.substring(0, splitPos);
      String page = pageIdentifyer.substring(splitPos+1);
      PackageTranslator pageTans = new PackageTranslator(bundleName, locale);
      String pageTitle = pageTans.translate("chelp." + page.split("\\.")[0] + ".title");
      link.setCustomDisplayText(pageTitle);
    }
    // Update title in view
    tocVC.setDirty(true);
    // Update next crumb in chain
View Full Code Here

          "" + RepositoryEntry.ACC_OWNERS_AUTHORS,
          "" + RepositoryEntry.ACC_USERS,
          "" + RepositoryEntry.ACC_USERS_GUESTS
        };
      String[] values = new String[] {
        pt.translate("cif.access.owners"),
        pt.translate("cif.access.owners_authors"),
        pt.translate("cif.access.users"),
        pt.translate("cif.access.users_guests"),
      };
      //use the addDropDownSingleselect method with null as label i18n - key, because there is no label to set. OLAT-3682
View Full Code Here

          "" + RepositoryEntry.ACC_USERS,
          "" + RepositoryEntry.ACC_USERS_GUESTS
        };
      String[] values = new String[] {
        pt.translate("cif.access.owners"),
        pt.translate("cif.access.owners_authors"),
        pt.translate("cif.access.users"),
        pt.translate("cif.access.users_guests"),
      };
      //use the addDropDownSingleselect method with null as label i18n - key, because there is no label to set. OLAT-3682
      accessSelbox = uifactory.addDropdownSingleselect("accessBox",null, fic, keys, values, null);
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.