Package org.olat.core.gui.translator

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


      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
        sb.append("<a href=\"");
        ubu.buildURI(sb, new String[]{ TabbedPane.PARAM_PANE_ID }, new String[]{ String.valueOf(i) }, iframePostEnabled? AJAXFlags.MODE_TOBGIFRAME : AJAXFlags.MODE_NORMAL);
        sb.append("\" onclick=\"return o2cl()\"");
View Full Code Here


        sb.append("\" onclick=\"return o2cl()\"");
        if (iframePostEnabled) {
          ubu.appendTarget(sb);
        }
        sb.append(">");
        sb.append(comptrans.translate("sr.tab.normal", new String[] {tabName}));       
        sb.append("</a>");
      }
    }
    sb.append(comptrans.translate("sr.introcontent"));
    // now let the selected component render itself
View Full Code Here

        sb.append(">");
        sb.append(comptrans.translate("sr.tab.normal", new String[] {tabName}));       
        sb.append("</a>");
      }
    }
    sb.append(comptrans.translate("sr.introcontent"));
    // now let the selected component render itself
    Component paneToRender = tb.getTabAt(selPane);
    if (paneToRender == null) throw new RuntimeException("a tabbed pane must not be null, but a component");
    renderer.render(sb, paneToRender, null);
  }
View Full Code Here

        } else if (CMD_DELETE.equals(tEvent.getAction())) {
          List<Versions> versionsToDelete = getSelectedVersions(tEvent.getSelection());
          if (!versionsToDelete.isEmpty()) {
           
            Translator trans = getTranslator();
            String msg = trans.translate("version.del.confirm") + "<p>" + renderVersionsAsHtml(versionsToDelete) + "</p>";
            // create dialog controller
            dialogCtr = activateYesNoDialog(ureq, trans.translate("version.del.header"), msg, dialogCtr);
            dialogCtr.setUserObject(versionsToDelete);
          }
        }
View Full Code Here

          if (!versionsToDelete.isEmpty()) {
           
            Translator trans = getTranslator();
            String msg = trans.translate("version.del.confirm") + "<p>" + renderVersionsAsHtml(versionsToDelete) + "</p>";
            // create dialog controller
            dialogCtr = activateYesNoDialog(ureq, trans.translate("version.del.header"), msg, dialogCtr);
            dialogCtr.setUserObject(versionsToDelete);
          }
        }
      }
    } else if (source == dialogCtr) {
View Full Code Here

       }
       // Add pseudo focus marker on fake file chooser button
       sb.append(" onfocus=\"this.form.fake_").append(id).append(".nextSibling.style.border = '1px dotted black';\"");
       sb.append(" onblur=\"this.form.fake_").append(id).append(".nextSibling.style.border = '0';\"");
       // Add select text (hover)
       sb.append(" title=\"").append(StringEscapeUtils.escapeHtml(trans.translate("file.element.select"))).append("\"/>")
      sb.append("<div class='b_fileinput_fakechooser'>")
      // Add the visible but fake input field and a styled faked file chooser button
      sb.append("<input name='fake_").append(id).append("' value=\"").append(StringEscapeUtils.escapeHtml(fileName)).append("\"/>")
      sb.append("<a href='#' class='b_with_small_icon_left b_fileinput_icon'><span>").append(trans.translate("file.element.select")).append("</span></a>")
      // Add Max upload size
View Full Code Here

       // Add select text (hover)
       sb.append(" title=\"").append(StringEscapeUtils.escapeHtml(trans.translate("file.element.select"))).append("\"/>")
      sb.append("<div class='b_fileinput_fakechooser'>")
      // Add the visible but fake input field and a styled faked file chooser button
      sb.append("<input name='fake_").append(id).append("' value=\"").append(StringEscapeUtils.escapeHtml(fileName)).append("\"/>")
      sb.append("<a href='#' class='b_with_small_icon_left b_fileinput_icon'><span>").append(trans.translate("file.element.select")).append("</span></a>")
      // Add Max upload size
      if (fileElem.getMaxUploadSizeKB() != FileElement.UPLOAD_UNLIMITED) {
        String maxUpload = Formatter.roundToString((fileElem.getMaxUploadSizeKB()+0f) / 1024, 1);
        sb.append("<span class='b_fileinput_maxsize'>(").append(trans.translate("file.element.select.maxsize", new String[]{maxUpload})).append(")</span>")
      }
View Full Code Here

      sb.append("<input name='fake_").append(id).append("' value=\"").append(StringEscapeUtils.escapeHtml(fileName)).append("\"/>")
      sb.append("<a href='#' class='b_with_small_icon_left b_fileinput_icon'><span>").append(trans.translate("file.element.select")).append("</span></a>")
      // Add Max upload size
      if (fileElem.getMaxUploadSizeKB() != FileElement.UPLOAD_UNLIMITED) {
        String maxUpload = Formatter.roundToString((fileElem.getMaxUploadSizeKB()+0f) / 1024, 1);
        sb.append("<span class='b_fileinput_maxsize'>(").append(trans.translate("file.element.select.maxsize", new String[]{maxUpload})).append(")</span>")
      }
      sb.append("</div></div>")
     
      // Add IE fix to deal with SSL and server timeouts
      // See http://bugs.olat.org/jira/browse/OLAT-1299
View Full Code Here

     * add pop js for date chooser, if componente is enabled
     */
    if (source.isEnabled()) {
     
      //date chooser button
      content.append("<span class=\"b_form_datechooser\" id=\"").append(triggerId).append("\" title=\"").append(StringEscapeUtils.escapeHtml(sourceTranslator.translate("calendar.choose"))).append("\">&nbsp;</span>");
      // date chooser javascript
      content.append("<script type=\"text/javascript\">\n /* <![CDATA[ */ \n").append("Calendar.setup({").append("inputField:\"").append(receiverId).append("\",")
          .append("ifFormat:\"");
      if (jsdcc.getDateChooserDateFormat() == null) {
        // use default format from default locale file
View Full Code Here

          BusinessGroup bg =BusinessGroupManagerImpl.getInstance().loadBusinessGroup(Long.parseLong(tokenKey), true);
          return bg.getName();
        }
       
        Translator translator = Util.createPackageTranslator(this.getClass(), locale);
        String translated = translator.translate(tokenType);
        if (translated == null || translated.length() > 64) {
          return token;//no translation, translator return an error
        }
        return translated;
      }
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.