Class TranslationsStore

java.lang.Object
org.pentaho.di.ui.i18n.TranslationsStore

public class TranslationsStore extends Object
This class contains and handles all the translations for the keys specified in the Java source code.
Author:
matt
  • Constructor Details

    • TranslationsStore

      public TranslationsStore(org.pentaho.di.core.logging.LogChannelInterface log, List<String> localeList, String mainLocale, Map<String,Map<String,List<KeyOccurrence>>> sourcePackageOccurrences)
      Parameters:
      localeList -
      messagesPackages -
      map -
  • Method Details

    • read

      public void read(List<String> directories) throws org.pentaho.di.core.exception.KettleException
      Read all the translated messages for all the specified locale and all the specified locale
      Parameters:
      directories - The reference source directories to search packages in
      Throws:
      org.pentaho.di.core.exception.KettleException
    • getLocaleList

      public List<String> getLocaleList()
      Returns:
      the localeList
    • setLocaleList

      public void setLocaleList(List<String> localeList)
      Parameters:
      localeList - the localeList to set
    • getMainLocale

      public String getMainLocale()
      Returns:
      the mainLocale
    • setMainLocale

      public void setMainLocale(String mainLocale)
      Parameters:
      mainLocale - the mainLocale to set
    • lookupKeyValue

      public String lookupKeyValue(String locale, String messagesPackage, String key)
      Look up the translation for a key in a certain locale
      Parameters:
      locale - the locale to hunt for
      sourceFolder - the source folder to look in
      messagesPackage - the messages package to look in
      key - the key
      Returns:
      the translation for the specified key in the desired locale, from the requested package
    • removeValue

      public void removeValue(String locale, String sourceFolder, String messagesPackage, String key)
    • storeValue

      public void storeValue(String locale, String sourceFolder, String messagesPackage, String key, String value)
    • getChangedMessagesStores

      public List<MessagesStore> getChangedMessagesStores()
      Returns:
      the list of changed messages stores.
    • getMessagesStores

      public List<MessagesStore> getMessagesStores(String searchLocale, String messagesPackage)
      Parameters:
      searchLocale - the locale the filter on.
      messagesPackage - the messagesPackage to filter on. Specify null to get all message stores.
      Returns:
      the list of messages stores for the main locale
    • findMainLocaleMessagesStore

      public MessagesStore findMainLocaleMessagesStore(String sourceFolder, String messagesPackage)
    • getSourcePackageOccurrences

      public Map<String,Map<String,List<KeyOccurrence>>> getSourcePackageOccurrences()
    • setSourcePackageOccurrences

      public void setSourcePackageOccurrences(Map<String,Map<String,List<KeyOccurrence>>> sourcePackageOccurrences)