Examples of countI18nItems()


Examples of org.olat.core.util.i18n.I18nManager.countI18nItems()

   *
   */
  private void updateStatistics() {
    I18nManager i18nMgr = I18nManager.getInstance();
    // update progress bar with all package values
    int toTranslateCount = i18nMgr.countI18nItems(referenceLocale, null, true);
    int translatedCount = i18nMgr.countI18nItems(targetLocale, null, true);
    progressBar.setMax(toTranslateCount);
    progressBar.setActual(translatedCount);
    // calculate package dependent values for missing keys display
    String missingBundle = missingBundlesSelection.getSelectedKey();
View Full Code Here

Examples of org.olat.core.util.i18n.I18nManager.countI18nItems()

   */
  private void updateStatistics() {
    I18nManager i18nMgr = I18nManager.getInstance();
    // update progress bar with all package values
    int toTranslateCount = i18nMgr.countI18nItems(referenceLocale, null, true);
    int translatedCount = i18nMgr.countI18nItems(targetLocale, null, true);
    progressBar.setMax(toTranslateCount);
    progressBar.setActual(translatedCount);
    // calculate package dependent values for missing keys display
    String missingBundle = missingBundlesSelection.getSelectedKey();
    if (missingBundle.equals(ALL_BUNDLES_IDENTIFYER)) {
View Full Code Here

Examples of org.olat.core.util.i18n.I18nManager.countI18nItems()

    // calculate package dependent values for missing keys display
    String missingBundle = missingBundlesSelection.getSelectedKey();
    if (missingBundle.equals(ALL_BUNDLES_IDENTIFYER)) {
      this.flc.contextPut("missingCount", (toTranslateCount - translatedCount));
    } else {
      int missingToTranslateCount = i18nMgr.countI18nItems(referenceLocale, missingBundle, missingBundlesIncludeBundlesChildrenSwitch
          .isSelected(0));
      int missingTranslatedCount = i18nMgr.countI18nItems(targetLocale, missingBundle, missingBundlesIncludeBundlesChildrenSwitch
          .isSelected(0));
      this.flc.contextPut("missingCount", (missingToTranslateCount - missingTranslatedCount));
    }
View Full Code Here

Examples of org.olat.core.util.i18n.I18nManager.countI18nItems()

    if (missingBundle.equals(ALL_BUNDLES_IDENTIFYER)) {
      this.flc.contextPut("missingCount", (toTranslateCount - translatedCount));
    } else {
      int missingToTranslateCount = i18nMgr.countI18nItems(referenceLocale, missingBundle, missingBundlesIncludeBundlesChildrenSwitch
          .isSelected(0));
      int missingTranslatedCount = i18nMgr.countI18nItems(targetLocale, missingBundle, missingBundlesIncludeBundlesChildrenSwitch
          .isSelected(0));
      this.flc.contextPut("missingCount", (missingToTranslateCount - missingTranslatedCount));
    }
    String existingBundle = existingBundlesSelection.getSelectedKey();
    if (existingBundle.equals(ALL_BUNDLES_IDENTIFYER)) {
View Full Code Here

Examples of org.olat.core.util.i18n.I18nManager.countI18nItems()

    }
    String existingBundle = existingBundlesSelection.getSelectedKey();
    if (existingBundle.equals(ALL_BUNDLES_IDENTIFYER)) {
      this.flc.contextPut("existingCount", translatedCount);
    } else {
      int existingTranslateCount = i18nMgr.countI18nItems(referenceLocale, existingBundle, existingBundlesIncludeBundlesChildrenSwitch.isSelected(0));
      this.flc.contextPut("existingCount", existingTranslateCount);
    }
    // calculate package dependent values for all keys display
    String allBundle = allBundlesSelection.getSelectedKey();
    if (allBundle.equals(ALL_BUNDLES_IDENTIFYER)) {
View Full Code Here

Examples of org.olat.core.util.i18n.I18nManager.countI18nItems()

    // calculate package dependent values for all keys display
    String allBundle = allBundlesSelection.getSelectedKey();
    if (allBundle.equals(ALL_BUNDLES_IDENTIFYER)) {
      this.flc.contextPut("allCount", toTranslateCount);
    } else {
      int allToTranslateCount = i18nMgr.countI18nItems(referenceLocale, allBundle, allBundlesIncludeBundlesChildrenSwitch.isSelected(0));
      this.flc.contextPut("allCount", allToTranslateCount);
    }
  }

  /**
 
View Full Code Here

Examples of org.olat.core.util.i18n.I18nManager.countI18nItems()

    defaultLangSelection.select(defaultLocale.toString(), true);
    //
    // Add enabled languages checkboxes
    String[] availablelangKeys = ArrayHelper.toArray(availableKeys);
    String[] availableValues = new String[availablelangKeys.length];
    int referenceKeyCount = i18nMgr.countI18nItems(I18nModule.getFallbackLocale(), null, true);
    for (int i = 0; i < availablelangKeys.length; i++) {
      String key = availablelangKeys[i];
      String explLang = i18nMgr.getLanguageInEnglish(key, I18nModule.isOverlayEnabled());
      String all = explLang;
      if (explLang != null && !explLang.equals(key)) all += " (" + key + ")";
View Full Code Here

Examples of org.olat.core.util.i18n.I18nManager.countI18nItems()

      String key = availablelangKeys[i];
      String explLang = i18nMgr.getLanguageInEnglish(key, I18nModule.isOverlayEnabled());
      String all = explLang;
      if (explLang != null && !explLang.equals(key)) all += " (" + key + ")";
      // count translation status
      int keyCount = i18nMgr.countI18nItems(i18nMgr.getLocaleOrNull(key), null, true);
      all += "   <span class='b_translation_status'>" + (keyCount * 100 / referenceKeyCount) + "%</span>";
      availableValues[i] = all;
    }
    ArrayHelper.sort(availablelangKeys, availableValues, false, true, false);
    String[] availableLangCssClasses = i18nMgr.createLanguageFlagsCssClasses(availablelangKeys, "b_with_small_icon_left");
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.