Class CamelCaseProvider
java.lang.Object
com.e1c.langtool.v8.dt.internal.provider.CamelCaseProvider
- All Implemented Interfaces:
IExternalTranslationProvider
-
Field Summary
Fields inherited from interface com.e1c.langtool.external.IExternalTranslationProvider
EXTENSION_POINT_ID -
Constructor Summary
ConstructorsConstructorDescriptionCamelCaseProvider(ITranslatingProjectManager translatingProjectManager, ICamelCaseManager camelCaseManager) CamelCase provider from interface strings -
Method Summary
Modifier and TypeMethodDescriptionReturns the set of supported language codes by this service.getLanguages(String targetLocale) Returns a map of supported language codes and localized names of languages using the given target language or null if service doesn't support the given language.Returns a list of translations by the given query.Translates text from a given language to another given language.Translates text from a given language to another given language.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.e1c.langtool.external.IExternalTranslationProvider
getTranslationItemImageName, isActive
-
Constructor Details
-
CamelCaseProvider
@Inject public CamelCaseProvider(ITranslatingProjectManager translatingProjectManager, ICamelCaseManager camelCaseManager) CamelCase provider from interface strings- Parameters:
translatingProjectManager- The reference to theITranslatingProjectManager. May not benullcamelCaseManager- The reference to theICamelCaseManager. May not benull
-
-
Method Details
-
translate
Description copied from interface:IExternalTranslationProviderTranslates text from a given language to another given language.- Specified by:
translatein interfaceIExternalTranslationProvider- Parameters:
text- the string to translatesourceLocale- the code of language to translate fromtargetLocale- the code of language to translate to- Returns:
- the list of possible translations for given text
-
translate
public Map<String,List<String>> translate(List<String> texts, String sourceLocale, String targetLocale) Description copied from interface:IExternalTranslationProviderTranslates text from a given language to another given language. In contrast toIExternalTranslationProvider.translate(String, String, String)this method allows to translate a list of strings for one query to translation service.- Specified by:
translatein interfaceIExternalTranslationProvider- Parameters:
texts- the list of strings to translate in the same languagesourceLocale- the code of language to translate fromtargetLocale- the code language to translate to- Returns:
- the map where keys are elements of the given list with strings and values are possible translations for every key in the map
-
translate
Description copied from interface:IExternalTranslationProviderReturns a list of translations by the given query.Default implementation of this method uses
IExternalTranslationProvider.translate(String, String, String)with the following arguments:- text -
ISingleTranslationQuery.getText() - source language -
ITranslationQuery.getSourceLanguage() - target language -
ITranslationQuery.getTargetLanguage()}
- Specified by:
translatein interfaceIExternalTranslationProvider- Parameters:
query- the query for translating- Returns:
- a list of translations
- text -
-
getLanguageCodes
Description copied from interface:IExternalTranslationProviderReturns the set of supported language codes by this service.- Specified by:
getLanguageCodesin interfaceIExternalTranslationProvider- Returns:
- the set of supported language codes
-
getLanguages
Description copied from interface:IExternalTranslationProviderReturns a map of supported language codes and localized names of languages using the given target language or null if service doesn't support the given language.- Specified by:
getLanguagesin interfaceIExternalTranslationProvider- Parameters:
targetLocale- the locale to localize names of languages- Returns:
- map with language codes and localized names of languages
-