Package org.apache.hop.ui.i18n
Class TranslationsStore
- java.lang.Object
-
- org.apache.hop.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.
-
-
Constructor Summary
Constructors Constructor Description TranslationsStore(ILogChannel log, List<String> localeList, String mainLocale, Map<String,Map<String,List<KeyOccurrence>>> sourcePackageOccurrences, BundlesStore bundlesStore)
-
Method Summary
-
-
-
Constructor Detail
-
TranslationsStore
public TranslationsStore(ILogChannel log, List<String> localeList, String mainLocale, Map<String,Map<String,List<KeyOccurrence>>> sourcePackageOccurrences, BundlesStore bundlesStore)
- Parameters:
log-localeList-mainLocale-sourcePackageOccurrences-bundlesStore-
-
-
Method Detail
-
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 formessagesPackage- the messages package to look inkey- 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)
-
getChangedBundleFiles
public List<BundleFile> getChangedBundleFiles()
- Returns:
- the list of changed messages stores.
-
findBundleFiles
public List<BundleFile> findBundleFiles(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 bundle files for the locale
-
findMainBundleFile
public BundleFile findMainBundleFile(String messagesPackage)
-
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
-
getSourcePackageOccurrences
public Map<String,Map<String,List<KeyOccurrence>>> getSourcePackageOccurrences()
-
setSourcePackageOccurrences
public void setSourcePackageOccurrences(Map<String,Map<String,List<KeyOccurrence>>> sourcePackageOccurrences)
-
getBundleStore
public BundlesStore getBundleStore()
Gets bundleStore- Returns:
- value of bundleStore
-
getLog
public ILogChannel getLog()
Gets log- Returns:
- value of log
-
setLog
public void setLog(ILogChannel log)
- Parameters:
log- The log to set
-
-