public class

TranslationManagerImpl

extends Object
implements TranslationManager
java.lang.Object
   ↳ com.atlassian.jira.web.action.admin.translation.TranslationManagerImpl

Summary

Constants
String JIRA_CF_TRANSLATION_PREFIX
String JIRA_ISSUETYPE_TRANSLATION_PREFIX
String JIRA_PRIORITY_TRANSLATION_PREFIX
String JIRA_RESOLUTION_TRANSLATION_PREFIX
String JIRA_STATUS_TRANSLATION_PREFIX
String NONE
Public Constructors
TranslationManagerImpl(JiraAuthenticationContext authenticationContext, ApplicationProperties applicationProperties, I18nHelper.BeanFactory beanFactory)
Public Methods
void deleteCustomFieldTranslation(CustomField customField, Locale locale)
void deleteIssueConstantTranslation(IssueConstant issueConstant, String issueConstantPrefix, Locale locale)
String getCustomFieldDescriptionTranslation(CustomField customField, Locale locale)
Get the translated name for the custom field or null if no translation exists.
String getCustomFieldDescriptionTranslation(CustomField customField)
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)
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.atlassian.jira.web.action.admin.translation.TranslationManager

Constants

public static final String JIRA_CF_TRANSLATION_PREFIX

Constant Value: "jira.translation.custom.field"

public static final String JIRA_ISSUETYPE_TRANSLATION_PREFIX

Constant Value: "jira.translation.issuetype"

public static final String JIRA_PRIORITY_TRANSLATION_PREFIX

Constant Value: "jira.translation.priority"

public static final String JIRA_RESOLUTION_TRANSLATION_PREFIX

Constant Value: "jira.translation.resolution"

public static final String JIRA_STATUS_TRANSLATION_PREFIX

Constant Value: "jira.translation.status"

public static final String NONE

Constant Value: "None"

Public Constructors

public TranslationManagerImpl (JiraAuthenticationContext authenticationContext, ApplicationProperties applicationProperties, I18nHelper.BeanFactory beanFactory)

Public Methods

public void deleteCustomFieldTranslation (CustomField customField, Locale locale)

public void deleteIssueConstantTranslation (IssueConstant issueConstant, String issueConstantPrefix, Locale locale)

public String getCustomFieldDescriptionTranslation (CustomField customField, Locale locale)

Get the translated name for the custom field or null if no translation exists.

Parameters
customField a custom field
locale The locale to get the translation for.
Returns
  • the translated name

public String getCustomFieldDescriptionTranslation (CustomField customField)

Get the translated name for the custom field or null if no translation exists. This will use the current authentication context

Parameters
customField a custom field
Returns
  • the translated name

public String getCustomFieldNameTranslation (CustomField customField)

Get the translated name for the custom field or null if no translation exists. This will use the current authentication context

Parameters
customField a custom field
Returns
  • the translated name

public String getCustomFieldNameTranslation (CustomField customField, Locale locale)

Get the translated name for the custom field or null if no translation exists.

Parameters
customField a custom field
locale The locale to get the translation for.
Returns
  • the translated name

public Map getInstalledLocales ()

Retrieves the installed locales in the user's language.

Returns
  • A map containing the installed locales indexed by each locale's string representation.

public String getIssueConstantTranslation (IssueConstant issueConstant, boolean name, Locale locale)

public String getIssueConstantTranslation (IssueConstant issueConstant, boolean name, String locale)

public String getIssueConstantTranslation (IssueConstant issueConstant, boolean name, String locale, I18nHelper i18n)

Extract the desired string (name/description) from the specified issue constant.

If a system defined translation does not exist, the property file associated with the i18nHelper is checked.

Parameters
name boolean - fetch name or description
locale used to check if system defined property exists
i18n the i18nHelper to use to retrieve the translation from property files if no defined within system
Returns
  • String translated issue constant name or description

public String getTranslatedDescriptionFromString (String translationString)

public String getTranslatedNameFromString (String translationString)

public boolean hasLocaleTranslation (IssueConstant issueConstant, String locale)

public void setCustomFieldTranslation (CustomField customField, Locale locale, String translatedName, String translatedDesc)

Store the translated name and description for a custom field in a particular locale

Parameters
customField a custom field
locale the locale
translatedName the translated name
translatedDesc the translated description

public void setIssueConstantTranslation (IssueConstant issueConstant, String issueConstantPrefix, Locale locale, String translatedName, String translatedDesc)