Examples of PackageTranslator


Examples of org.olat.core.gui.translator.PackageTranslator

   */
  public String informOnDelete(Locale locale, ICourse course) {
    CoursePropertyManager cpm = PersistingCoursePropertyManager.getInstance(course);
    Property forumKeyProperty = cpm.findCourseNodeProperty(this, null, null, FORUM_KEY);
    if (forumKeyProperty == null) return null; // no forum created yet
    return new PackageTranslator(PACKAGE_FO, locale).translate("warn.forumdelete");
  }
View Full Code Here

Examples of org.olat.core.gui.translator.PackageTranslator

   * @param ureq
   * @param wControl
   */
  protected InfoMsgPortletRunController(UserRequest ureq, WindowControl wControl) {
    super(wControl);
    this.trans = new PackageTranslator(Util.getPackageName(InfoMsgPortletRunController.class), ureq.getLocale());
    this.infoVC = new VelocityContainer("infoVC", VELOCITY_ROOT + "/portlet.html", trans, this);
    InfoMessageManager mrg = (InfoMessageManager)CoreSpringFactory.getBean(InfoMessageManager.class);
    String infoMsg = mrg.getInfoMessage();
    if (StringHelper.containsNonWhitespace(infoMsg)) {
      infoVC.contextPut("content", infoMsg);
View Full Code Here

Examples of org.olat.core.gui.translator.PackageTranslator

  /**
   * @see org.olat.gui.control.generic.portal.AbstractPortlet#createInstance(org.olat.gui.control.WindowControl, org.olat.gui.UserRequest, java.util.Map)
   */
  public Portlet createInstance(WindowControl wControl, UserRequest ureq, Map configuration) {
    setConfiguration(configuration);
    setTranslator(new PackageTranslator(Util.getPackageName(InfoMsgPortlet.class), ureq.getLocale()));
    return this;
  }
View Full Code Here

Examples of org.olat.core.gui.translator.PackageTranslator

  /**
   * @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_scorm");
  }
View Full Code Here

Examples of org.olat.core.gui.translator.PackageTranslator

   * @param ureq
   * @param wControl
   */
  public PersonalSettingsController(UserRequest ureq, WindowControl wControl) {
    super(wControl);
      translator = new PackageTranslator(PACKAGE, ureq.getLocale());
      Manager mgr = ManagerFactory.getManager();
      if (!mgr.isIdentityPermittedOnResourceable(
          ureq.getIdentity(),
          Constants.PERMISSION_ACCESS,
          OresHelper.lookupType(this.getClass())))
View Full Code Here

Examples of org.olat.core.gui.translator.PackageTranslator

  public ChangePrefsController(UserRequest ureq, WindowControl wControl, Identity changeableIdentity) {
    super(wControl);

    this.changeableIdentity = changeableIdentity;

    this.translator = new PackageTranslator(PACKAGE, ureq.getLocale());

    myContent = new VelocityContainer("settings", VELOCITY_ROOT + "/prefs.html", translator, this);

    prefsCtr = new PreferencesFormController(ureq, wControl, changeableIdentity);
    prefsCtr.addControllerListener(this);
View Full Code Here

Examples of org.olat.core.gui.translator.PackageTranslator

   */
  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;
    }
    /*
     * make an archive of the course nodes with valuable data
View Full Code Here

Examples of org.olat.core.gui.translator.PackageTranslator

   */
  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

Examples of org.olat.core.gui.translator.PackageTranslator

   * @param isNew    If it is a new event, display a list of calendars to choose from.
   * @param locale
   */
  public KalendarEntryForm(String name, KalendarEvent event, KalendarRenderWrapper choosenWrapper,
      Collection availableCalendars, boolean isNew, Locale locale) {
    super(name, new PackageTranslator(PACKAGE, locale));
    this.event = event;
    this.choosenWrapper = choosenWrapper;
    this.readOnly = choosenWrapper.getAccess() == KalendarRenderWrapper.ACCESS_READ_ONLY;
   
    List writeableCalendars = new ArrayList();
View Full Code Here

Examples of org.olat.core.gui.translator.PackageTranslator

   * @see org.olat.gui.control.generic.portal.AbstractPortlet#createInstance(org.olat.core.gui.control.WindowControl, org.olat.core.gui.UserRequest, java.util.Map)
   */
  public Portlet createInstance(WindowControl wControl, UserRequest ureq, Map configuration) {
    CalendarPortlet p = new CalendarPortlet();
    p.setConfiguration(configuration);
    p.setTranslator(new PackageTranslator(Util.getPackageName(CalendarPortlet.class), ureq.getLocale()));
    p.setLocale(ureq.getLocale());
    return p;
  }
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.