Package org.olat.core.gui.translator

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


          if (tk == null) tk = rm.createTemporaryKeyByEmail(emailAdress, ip, rm.PW_CHANGE);
          myContent.contextPut("pwKey", tk.getRegistrationKey());
          body = userTrans.translate("pwchange.intro", new String[] { identity.getName() })
              + userTrans.translate("pwchange.body", new String[] { serverpath, tk.getRegistrationKey(),
                  I18nManager.getInstance().getLocaleKey(ureq.getLocale()) }) + SEPARATOR
              + userTrans.translate("reg.wherefrom", new String[] { serverpath, today, ip });
          subject = userTrans.translate("pwchange.subject");
          MailTemplate mailTempl = new MailTemplate(subject, body, null) {
            @Override
            public void putVariablesInMailContext(VelocityContext context, Identity recipient) {
              // nothing to do
View Full Code Here


          myContent.contextPut("pwKey", tk.getRegistrationKey());
          body = userTrans.translate("pwchange.intro", new String[] { identity.getName() })
              + userTrans.translate("pwchange.body", new String[] { serverpath, tk.getRegistrationKey(),
                  I18nManager.getInstance().getLocaleKey(ureq.getLocale()) }) + SEPARATOR
              + userTrans.translate("reg.wherefrom", new String[] { serverpath, today, ip });
          subject = userTrans.translate("pwchange.subject");
          MailTemplate mailTempl = new MailTemplate(subject, body, null) {
            @Override
            public void putVariablesInMailContext(VelocityContext context, Identity recipient) {
              // nothing to do
            }
View Full Code Here

    showOtherUsers.setTarget("_blanc");
    if (isGuest) showOtherUsers.setEnabled(false);
   
    // some variables displayed in the footer
    Translator translator = getTranslator();
    olatFootervc.contextPut("username", identity != null && !isGuest.booleanValue() ? translator.translate("username", new String[] { identity.getName() })
        : translator.translate("not.logged.in"));
    Version v = (Version) CoreSpringFactory.getBean("org.olat.core.Version");
    String nodeInfo = (!CoordinatorManager.getCoordinator().isClusterMode()) ? "" : (", N"+CoordinatorManager.getCoordinator().getNodeId());
    olatFootervc.contextPut("olatversion", v.getFullVersion() + nodeInfo);
    // instant messaging awareness
View Full Code Here

    if (isGuest) showOtherUsers.setEnabled(false);
   
    // some variables displayed in the footer
    Translator translator = getTranslator();
    olatFootervc.contextPut("username", identity != null && !isGuest.booleanValue() ? translator.translate("username", new String[] { identity.getName() })
        : translator.translate("not.logged.in"));
    Version v = (Version) CoreSpringFactory.getBean("org.olat.core.Version");
    String nodeInfo = (!CoordinatorManager.getCoordinator().isClusterMode()) ? "" : (", N"+CoordinatorManager.getCoordinator().getNodeId());
    olatFootervc.contextPut("olatversion", v.getFullVersion() + nodeInfo);
    // instant messaging awareness
    olatFootervc.contextPut("instantMessagingEnabled", new Boolean(InstantMessagingModule.isEnabled()));
View Full Code Here

  public CreateNewSharedFolderController(RepositoryAddCallback addCallback, UserRequest ureq, WindowControl wControl) {
    super(wControl);
    if (addCallback != null) {
      newFileResource = SharedFolderManager.getInstance().createSharedFolder();
      Translator trnsltr = new PackageTranslator("org.olat.repository", ureq.getLocale());
      addCallback.setDisplayName(trnsltr.translate(newFileResource.getResourceableTypeName()));
      addCallback.setResourceable(newFileResource);
      addCallback.setResourceName(SharedFolderFileResource.RESOURCE_NAME);

      addCallback.finished(ureq);
    }
View Full Code Here

    }
   
    if (headerId!=null) {
      Translator translator = Util.createPackageTranslator(ShibbolethModule.class, ureq.getLocale());
      if (translator!=null) {
        String newHeaderId = translator.translate("swissEduPersonStudyBranch3."+headerId);
        if (newHeaderId!=null && !newHeaderId.startsWith(Translator.NO_TRANSLATION_ERROR_PREFIX)) {
          headerId = newHeaderId;
        }
      }
    }
View Full Code Here

        DialogElementsPropertyManager mgr = DialogElementsPropertyManager.getInstance();
        DialogPropertyElements elements = mgr.findDialogElements(p.getResId(), p.getSubidentifier());
        final List<DialogElement> dialogElements = elements.getDialogPropertyElements();
        final Translator translator = Util.createPackageTranslator(FileUploadNotificationHandler.class, locale);

        si = new SubscriptionInfo(new TitleItem(translator.translate("notifications.header", new String[]{displayname}), CSSS_CLASS_UPLOAD_ICON), null);
        SubscriptionListItem subListItem;
        for (DialogElement element : dialogElements) {
          // do only show entries newer then the ones already seen
          if (element.getDate().after(compareDate)) {
            String filename = element.getFilename();
View Full Code Here

            String filename = element.getFilename();
            String creator = element.getAuthor();
            Identity ident = ManagerFactory.getManager().findIdentityByName(creator);
            Date modDate = element.getDate();

            String desc = translator.translate("notifications.entry", new String[] { filename, NotificationHelper.getFormatedName(ident) });
            String urlToSend = NotificationHelper.getURLFromBusinessPathString(p, p.getBusinessPath());
            String cssClass = CSSHelper.createFiletypeIconCssClassFor(filename);

            subListItem = new SubscriptionListItem(desc, urlToSend, modDate, cssClass);
            si.addSubscriptionListItem(subListItem);
View Full Code Here

      Translator translator = Util.createPackageTranslator(FileUploadNotificationHandler.class, locale);
      String displayname = RepositoryManager.getInstance().lookupDisplayNameByOLATResourceableId(subscriber.getPublisher().getResId());
      if(displayname == null) {
        checkPublisher(subscriber.getPublisher());
      }
      return translator.translate("notifications.header", new String[]{displayname});
    } catch (Exception e) {
      log.error("Error while creating assessment notifications for subscriber: " + subscriber.getKey(), e);
      checkPublisher(subscriber.getPublisher());
      return "-";
    }
View Full Code Here

   * @see org.olat.ims.qti.container.qtielements.GenericQTIElement#render(java.lang.StringBuilder, org.olat.ims.qti.container.qtielements.RenderInstructions)
   */
  public void render(StringBuilder buffer, RenderInstructions ri) {
    Translator translator = new PackageTranslator(PACKAGE_QTI, (Locale)ri.get(RenderInstructions.KEY_LOCALE));
    buffer.append("<div id=\"o_qti_hints\"><a href=\"#\" onclick=\"b_togglebox('o_qti_hints_inner', this);\" onkeypress=\"b_togglebox('o_qti_hints_inner', this);\">");
    buffer.append(translator.translate("render.hint"));
    buffer.append("</a><div id=\"o_qti_hints_inner\" style=\"display:none\"><div><div class=\"b_important\">");
    super.render(buffer, ri);
    buffer.append("</div></div></div></div>");
  }
 
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.