public class TranslationManagerImpl extends Object implements TranslationManager
| Modifier and Type | Field and Description |
|---|---|
static String |
JIRA_CF_TRANSLATION_PREFIX |
static String |
JIRA_ISSUETYPE_TRANSLATION_PREFIX |
static String |
JIRA_PRIORITY_TRANSLATION_PREFIX |
static String |
JIRA_RESOLUTION_TRANSLATION_PREFIX |
static String |
JIRA_STATUS_TRANSLATION_PREFIX |
static String |
NONE |
| Constructor and Description |
|---|
TranslationManagerImpl(JiraAuthenticationContext authenticationContext,
ApplicationProperties applicationProperties,
I18nHelper.BeanFactory beanFactory) |
| Modifier and Type | Method and Description |
|---|---|
void |
deleteCustomFieldTranslation(CustomField customField,
Locale locale) |
void |
deleteIssueConstantTranslation(IssueConstant issueConstant,
String issueConstantPrefix,
Locale locale) |
String |
getCustomFieldDescriptionTranslation(CustomField customField)
Get the translated name for the custom field or null if no translation exists.
|
String |
getCustomFieldDescriptionTranslation(CustomField customField,
Locale locale)
Get the translated name for the custom field or null if no translation exists.
|
String |
getCustomFieldNameTranslation(CustomField customField)
Get the translated name for the custom field or null if no translation exists.
|
String |
getCustomFieldNameTranslation(CustomField customField,
Locale locale)
Get the translated name for the custom field or null if no translation exists.
|
Map |
getInstalledLocales()
Retrieves the installed locales in the user's language.
|
String |
getIssueConstantTranslation(IssueConstant issueConstant,
boolean name,
Locale locale) |
String |
getIssueConstantTranslation(IssueConstant issueConstant,
boolean name,
String locale) |
String |
getIssueConstantTranslation(IssueConstant issueConstant,
boolean name,
String locale,
I18nHelper i18n)
Extract the desired string (name/description) from the specified issue constant.
|
String |
getTranslatedDescriptionFromString(String translationString) |
String |
getTranslatedNameFromString(String translationString) |
boolean |
hasLocaleTranslation(IssueConstant issueConstant,
String locale) |
void |
setCustomFieldTranslation(CustomField customField,
Locale locale,
String translatedName,
String translatedDesc)
Store the translated name and description for a custom field in a particular locale
|
void |
setIssueConstantTranslation(IssueConstant issueConstant,
String issueConstantPrefix,
Locale locale,
String translatedName,
String translatedDesc) |
public static final String JIRA_ISSUETYPE_TRANSLATION_PREFIX
public static final String JIRA_PRIORITY_TRANSLATION_PREFIX
public static final String JIRA_RESOLUTION_TRANSLATION_PREFIX
public static final String JIRA_STATUS_TRANSLATION_PREFIX
public static final String JIRA_CF_TRANSLATION_PREFIX
public static final String NONE
public TranslationManagerImpl(JiraAuthenticationContext authenticationContext, ApplicationProperties applicationProperties, I18nHelper.BeanFactory beanFactory)
public Map getInstalledLocales()
getInstalledLocales in interface TranslationManagerpublic String getTranslatedNameFromString(String translationString)
getTranslatedNameFromString in interface TranslationManagerpublic String getTranslatedDescriptionFromString(String translationString)
getTranslatedDescriptionFromString in interface TranslationManagerpublic String getIssueConstantTranslation(IssueConstant issueConstant, boolean name, String locale, I18nHelper i18n)
If a system defined translation does not exist, the property file associated with the i18nHelper is checked.
getIssueConstantTranslation in interface TranslationManagerissueConstant - name - boolean - fetch name or descriptionlocale - used to check if system defined property existsi18n - the i18nHelper to use to retrieve the translation from property files if no defined within systempublic String getIssueConstantTranslation(IssueConstant issueConstant, boolean name, String locale)
getIssueConstantTranslation in interface TranslationManagerpublic boolean hasLocaleTranslation(IssueConstant issueConstant, String locale)
hasLocaleTranslation in interface TranslationManagerpublic String getIssueConstantTranslation(IssueConstant issueConstant, boolean name, Locale locale)
getIssueConstantTranslation in interface TranslationManagerpublic void setIssueConstantTranslation(IssueConstant issueConstant, String issueConstantPrefix, Locale locale, String translatedName, String translatedDesc)
setIssueConstantTranslation in interface TranslationManagerpublic void deleteIssueConstantTranslation(IssueConstant issueConstant, String issueConstantPrefix, Locale locale)
deleteIssueConstantTranslation in interface TranslationManagerpublic String getCustomFieldNameTranslation(CustomField customField)
TranslationManagergetCustomFieldNameTranslation in interface TranslationManagercustomField - a custom fieldpublic String getCustomFieldNameTranslation(CustomField customField, Locale locale)
TranslationManagergetCustomFieldNameTranslation in interface TranslationManagercustomField - a custom fieldlocale - The locale to get the translation for.public String getCustomFieldDescriptionTranslation(CustomField customField)
TranslationManagergetCustomFieldDescriptionTranslation in interface TranslationManagercustomField - a custom fieldpublic String getCustomFieldDescriptionTranslation(CustomField customField, Locale locale)
TranslationManagergetCustomFieldDescriptionTranslation in interface TranslationManagercustomField - a custom fieldlocale - The locale to get the translation for.public void setCustomFieldTranslation(CustomField customField, Locale locale, String translatedName, String translatedDesc)
TranslationManagersetCustomFieldTranslation in interface TranslationManagercustomField - a custom fieldlocale - the localetranslatedName - the translated nametranslatedDesc - the translated descriptionpublic void deleteCustomFieldTranslation(CustomField customField, Locale locale)
deleteCustomFieldTranslation in interface TranslationManagerCopyright © 2002-2019 Atlassian. All Rights Reserved.