Package org.olat.core.gui.translator

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


    Translator t = new PackageTranslator(OperatorManager.class.getPackage().getName(), locale);
    String[] tmp = new String[ops.size()];
    int i = 0;
    for (Operator o : ops) {
      if(keys.contains(o.getOperatorKey())) {
        tmp[i++] = t.translate(o.getLabelKey());
      }
    }
    return tmp;
  }
 
View Full Code Here


   *
   */
  public RepositorySite(Locale loc) {
    //TODO:fj:b cache all Translators in olat, introduce ChangeableTranslator (with method setLocale(...))
    Translator trans = new PackageTranslator(PACKAGE, loc);
    origNavElem = new DefaultNavElement(trans.translate("topnav.dr"), trans.translate("topnav.dr.alt"), "o_site_repository");   
    origNavElem.setAccessKey("r".charAt(0));
    curNavElem = new DefaultNavElement(origNavElem);
  }

  /**
 
View Full Code Here

   *
   */
  public RepositorySite(Locale loc) {
    //TODO:fj:b cache all Translators in olat, introduce ChangeableTranslator (with method setLocale(...))
    Translator trans = new PackageTranslator(PACKAGE, loc);
    origNavElem = new DefaultNavElement(trans.translate("topnav.dr"), trans.translate("topnav.dr.alt"), "o_site_repository");   
    origNavElem.setAccessKey("r".charAt(0));
    curNavElem = new DefaultNavElement(origNavElem);
  }

  /**
 
View Full Code Here

  public boolean readyToDelete(OLATResourceable res, UserRequest ureq, WindowControl wControl) {
    ReferenceManager refM = ReferenceManager.getInstance();
    String referencesSummary = refM.getReferencesToSummary(res, ureq.getLocale());
    if (referencesSummary != null) {
      Translator translator = new PackageTranslator(PACKAGE, ureq.getLocale());
      wControl.setError(translator.translate("details.delete.error.references",
          new String[] { referencesSummary }));
      return false;
    }
    if (CoordinatorManager.getCoordinator().getLocker().isLocked(res, null)) {
      Translator translator = new PackageTranslator(PACKAGE, ureq.getLocale());
View Full Code Here

          new String[] { referencesSummary }));
      return false;
    }
    if (CoordinatorManager.getCoordinator().getLocker().isLocked(res, null)) {
      Translator translator = new PackageTranslator(PACKAGE, ureq.getLocale());
      wControl.setError(translator.translate("details.delete.error.editor"));
      return false;
    }
    return true;
  }
 
View Full Code Here

  public boolean readyToDelete(OLATResourceable res, UserRequest ureq, WindowControl wControl) {
    ReferenceManager refM = ReferenceManager.getInstance();
    String referencesSummary = refM.getReferencesToSummary(res, ureq.getLocale());
    if (referencesSummary != null) {
      Translator translator = new PackageTranslator(PACKAGE, ureq.getLocale());
      wControl.setError(translator.translate("details.delete.error.references", new String[] { referencesSummary }));
      return false;
    }
    return true;
  }
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_cp");
  }

  /**
   * @see org.olat.course.nodes.CourseNodeConfiguration#getCSSClass()
   */
 
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_tu");
  }

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

    Locale loc = ureq.getLocale();
    Translator trans = new PackageTranslator(PACKAGE, loc);
    TableGuiConfiguration tableConfig = new TableGuiConfiguration();
    tableConfig.setDownloadOffered(true);
    tableConfig.setPreferencesOffered(true, "ExtendedIdentitiesTable");   
    tableConfig.setTableEmptyMessage(trans.translate("error.no.user.found"));

    trans = UserManager.getInstance().getPropertyHandlerTranslator(trans);
    TableController tableCtr = new TableController(tableConfig, ureq, wControl, trans, listeningController);
    dataModel.addColumnDescriptors(tableCtr, trans);
    tableCtr.setTableDataModel(dataModel);
View Full Code Here

  public SAPCampusMgntExtension() {

    elements.putExtensionElement(ArchiverMainController.class.getName(), new ActionExtension() {
      public String getDescription(Locale loc) {
        Translator trans = new PackageTranslator(PACKAGE, loc);
        return trans.translate("tool.description");
      }

      public String getActionText(Locale loc) {
        Translator trans = new PackageTranslator(PACKAGE, loc);
        return trans.translate("tool.actiontext");
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.