Package org.olat.core.gui.translator

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


    GenericTreeModel gtm = new GenericTreeModel();
    rootTreeNode = new GenericTreeNode();
    //there should be i18n key for main.menu.title for the rootNode in package of implementing type
    rootTreeNode.setTitle(translator.translate("main.menu.title"));
    rootTreeNode.setAltText(translator.translate("main.menu.title.alt"));
    gtm.setRootNode(rootTreeNode);

    // Prepend
    boolean rootNodeSet = false;
    if (nodesToPrepend.size() != 0) {
View Full Code Here


    if (lastDot > 0) {
      if (lastDot < filePath.length())
        return filePath.substring(lastDot + 1).toLowerCase();
    }
    Translator translator = Util.createPackageTranslator(FolderHelper.class, locale);
    return translator.translate("UnknownFile");
  }


  /**
   * @param fileType
View Full Code Here

        target.append("<input type=\"checkbox\" disabled=\"disabled\" />");
        target.append(translator.translate("uncheckall"));
        target.append("</a></div>");
      }
    }
    else target.append(internalTranslator.translate("selectiontree.noentries"));
    target.append("<br /><br />");
    if (atLeastOneIsAccessible) {
      target.append("<button type=\"submit\" class=\"b_button\" name=\"" + Form.SUBMIT_IDENTIFICATION + "\" value=\"");
      target.append(StringEscapeUtils.escapeHtml(translator.translate(tree.getFormButtonKey())));
      if (!tree.isAllowEmptySelection()) {
View Full Code Here

    }
    // fix detailed message
    if (detailedmessage == null) {
      if (o3e instanceof StaleObjectRuntimeException) {
        StaleObjectRuntimeException soe = (StaleObjectRuntimeException) o3e;
        detailedmessage = trans.translate("error.staleobjectexception") + "<br />(" + soe.getKey() + " : " + soe.getPersClassName() + ")";
      }
      else detailedmessage = "-";
    }

    // fetch more info
View Full Code Here

        i++;
      }
    }
    if (foundKey) {
      // it is a tab which we know
      myTabbedPane.setSelectedPane(translator.translate(viewIdentifier));
    } else {
      // it may be a tab of our children
      ActivateableTabbableDefaultController[] children = getChildren();
      for (int j = 0; j < children.length; j++) {
        children[j].activate(ureq, viewIdentifier);
View Full Code Here

    } else {
     trans = Util.createPackageTranslator(NotificationHelper.class, I18nManager.getInstance().getLocaleOrDefault(
        ident.getUser().getPreferences().getLanguage()));
     user = ident.getUser();
    }
    if (user == null) return trans.translate("user.unknown");
    return user.getProperty(UserConstants.FIRSTNAME, null) + " " + user.getProperty(UserConstants.LASTNAME, null);
  }

  /**
   * @param mimeType
View Full Code Here

      locale = I18nModule.getDefaultLocale();
    }
    Translator trans = getTranslator(locale);
    if (sender == null) {
      // mail sent by plattform configured sender address
      return trans.translate("footer.no.userdata", new String[] { Settings.getServerContextPathURI() });
    }
    // mail sent by a system user
    User user = sender.getUser();
    String institution = user.getProperty(UserConstants.INSTITUTIONALNAME, null);
    if (institution == null) institution = "";
View Full Code Here

    }
    // mail sent by a system user
    User user = sender.getUser();
    String institution = user.getProperty(UserConstants.INSTITUTIONALNAME, null);
    if (institution == null) institution = "";
    return trans.translate("footer.with.userdata", new String[] { user.getProperty(UserConstants.FIRSTNAME, null), user.getProperty(UserConstants.LASTNAME, null), sender.getName(),
        institution, Settings.getServerContextPathURI() });

  }
 
  public static String getTitleForFailedUsersError(Locale locale) {
View Full Code Here

    int selPane = tb.getSelectedPane();
    boolean iframePostEnabled = renderer.getGlobalSettings().getAjaxFlags().isIframePostEnabled();
   
    // add overview info for screenreader
    Translator comptrans = tb.getCompTrans();
    sb.append(comptrans.translate("sr.intro", new String[] {String.valueOf(cnt)}));
    for (int i = 0; i < cnt; i++) {
      String tabName = tb.getDisplayNameAt(i);
      if (!tb.isEnabled(i)) {
        // if a pane is not enabled
        sb.append(comptrans.translate("sr.tab.notenabled", new String[] {tabName}));
View Full Code Here

    sb.append(comptrans.translate("sr.intro", new String[] {String.valueOf(cnt)}));
    for (int i = 0; i < cnt; i++) {
      String tabName = tb.getDisplayNameAt(i);
      if (!tb.isEnabled(i)) {
        // if a pane is not enabled
        sb.append(comptrans.translate("sr.tab.notenabled", new String[] {tabName}));
      } else if (i == selPane) {
        // mark active pane
        sb.append(comptrans.translate("sr.tab.active", new String[] {tabName}));
      } else {
        // normal, enabled, but not active pane
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.