Package org.olat.core.gui.translator

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


    Controller controller;
    // Do not allow guests to start tests
    Roles roles = ureq.getUserSession().getRoles();
    if (roles.isGuestOnly()) {
      Translator trans = new PackageTranslator(PACKAGE, ureq.getLocale());
      String title = trans.translate("guestnoaccess.title");
      String message = trans.translate("guestnoaccess.message");
      controller = MessageUIFactory.createInfoMessage(ureq, wControl, title, message);
    } else {
      AssessmentManager am = userCourseEnv.getCourseEnvironment().getAssessmentManager();
      IQSecurityCallback sec = new CourseIQSecurityCallback(this, am, ureq.getIdentity());
View Full Code Here


    // Do not allow guests to start tests
    Roles roles = ureq.getUserSession().getRoles();
    if (roles.isGuestOnly()) {
      Translator trans = new PackageTranslator(PACKAGE, ureq.getLocale());
      String title = trans.translate("guestnoaccess.title");
      String message = trans.translate("guestnoaccess.message");
      controller = MessageUIFactory.createInfoMessage(ureq, wControl, title, message);
    } else {
      AssessmentManager am = userCourseEnv.getCourseEnvironment().getAssessmentManager();
      IQSecurityCallback sec = new CourseIQSecurityCallback(this, am, ureq.getIdentity());
      RepositoryEntry repositoryEntry = ne.getCourseNode().getReferencedRepositoryEntry();
View Full Code Here

      if(!CoordinatorManager.getCoordinator().getLocker().isLocked(fr, null)) {
        //QTI1
        controller = new IQRunController(userCourseEnv, this.getModuleConfiguration(), sec, ureq, wControl, this);
      } else {
        Translator trans = new PackageTranslator(PACKAGE, ureq.getLocale());
        String title = trans.translate("editor.lock.title");
        String message = trans.translate("editor.lock.message");
        controller = MessageUIFactory.createInfoMessage(ureq, wControl, title, message);
      }
    }
   
View Full Code Here

        //QTI1
        controller = new IQRunController(userCourseEnv, this.getModuleConfiguration(), sec, ureq, wControl, this);
      } else {
        Translator trans = new PackageTranslator(PACKAGE, ureq.getLocale());
        String title = trans.translate("editor.lock.title");
        String message = trans.translate("editor.lock.message");
        controller = MessageUIFactory.createInfoMessage(ureq, wControl, title, message);
      }
    }
   
    Controller ctrl = TitledWrapperHelper.getWrapper(ureq, wControl, controller, this, "o_iqtest_icon");
View Full Code Here

      typeDisplayText.append("\">");
      String tName = ControllerFactory.translateResourceableTypeName(typeName, getLocale());
      typeDisplayText.append(tName);
      if (repositoryEntry != null && RepositoryManager.getInstance().createRepositoryEntryStatus(repositoryEntry.getStatusCode()).isClosed()) {
        PackageTranslator pT = new PackageTranslator(RepositoryEntryStatus.class.getPackage().getName(), ureq.getLocale());
        typeDisplayText.append(" " + "(" + pT.translate("title.prefix.closed") + ")");
      }
      typeDisplayText.append("</span>");
    } else {
      typeDisplayText.append(translate("cif.type.na"));
    }
View Full Code Here

    // Otherwise you become an exception when you check owner-group.
    repositoryEntry = (RepositoryEntry) DBFactory.getInstance().loadObject(repositoryEntry);
    String displayName = repositoryEntry.getDisplayname();
    if (repositoryEntry != null && RepositoryManager.getInstance().createRepositoryEntryStatus(repositoryEntry.getStatusCode()).isClosed()) {
      PackageTranslator pT = new PackageTranslator(RepositoryEntryStatus.class.getPackage().getName(), locale);
      displayName = "[" + pT.translate("title.prefix.closed") + "] ".concat(displayName);
    }
   
    return displayName;
  }
View Full Code Here

       
        PackageTranslator userTrans = new PackageTranslator("org.olat.user", ureq.getLocale());
        PackageTranslator properyHandlersTrans = new PackageTranslator("org.olat.user.propertyhandlers", ureq.getLocale());
        olatKeys = new ArrayList();
        // adding order is relevant for the "if-else if"-statement below at events from step 3
        olatKeys.add(properyHandlersTrans.translate("form.name.institutionalUserIdentifier"));
        olatKeys.add(userTrans.translate("form.username"));
        olatKeys.add(userTrans.translate("form.email"));
       
        // add olatKeys and columnsNames to the form which displays it as pulldown menus
        kwcForm = new KeyWithColumnForm("keywithcolform", trans, olatKeys, columnNames);
View Full Code Here

  /**
   * @see org.olat.course.nodes.CourseNodeConfiguration#getLinkText(java.util.Locale)
   */
  public String getLinkText(Locale locale) {
    PackageTranslator translator = new PackageTranslator(PACKAGE, locale);
    return translator.translate("title_bc");
  }

  /**
   * @see org.olat.course.nodes.CourseNodeConfiguration#getCSSClass()
   */
 
View Full Code Here

  /**
   *
   */
  public GroupsManagementSite(Locale loc) {
    Translator trans = new PackageTranslator(PACKAGE, loc);
    origNavElem = new DefaultNavElement(trans.translate("topnav.gm"), trans.translate("topnav.gm.alt"), "o_site_groupsmanagement");
    curNavElem = new DefaultNavElement(origNavElem);
  }

  /**
   * @see org.olat.navigation.SiteInstance#getNavElement()
View Full Code Here

  /**
   *
   */
  public GroupsManagementSite(Locale loc) {
    Translator trans = new PackageTranslator(PACKAGE, loc);
    origNavElem = new DefaultNavElement(trans.translate("topnav.gm"), trans.translate("topnav.gm.alt"), "o_site_groupsmanagement");
    curNavElem = new DefaultNavElement(origNavElem);
  }

  /**
   * @see org.olat.navigation.SiteInstance#getNavElement()
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.