@Override public Locale getLocale() { return jiraAuthenticationContext.getLocale(); }
@Override public Locale getLocale(final HttpServletRequest request) { return jiraAuthenticationContext.getLocale(); }
@Override public Locale getLocale() { return jiraAuthenticationContext.getLocale(); }
/** Retrieve name translation in current locale */ public String getNameTranslation() { return nameTranslations.getUnchecked(authenticationContext.getLocale().toString()); }
/** Retrieve desc translation in current locale */ public String getDescTranslation() { return descriptionTranslations.getUnchecked(authenticationContext.getLocale().toString()); }
@Override public String getCustomFieldNameTranslation(final CustomField customField) { return getCustomFieldNameTranslation(customField, authenticationContext.getLocale()); }
@Override public String getRawText(String key) { return getRawText(jiraAuthenticationContext.getLocale(), key); }
@Override public String getCustomFieldDescriptionTranslation(final CustomField customField) { return getCustomFieldDescriptionTranslation(customField, authenticationContext.getLocale()); }
public Map<String, String> getAllTranslationsForPrefix(final String prefix) { return getAllTranslationsForPrefix(prefix, jiraAuthenticationContext.getLocale()); }
private Long convertDurationIntoSeconds(final String estimate) { try { return jiraDurationUtils.parseDuration(estimate, authenticationContext.getLocale()); } catch (InvalidDurationException e) { log.error("Error occurred while converting time estimates."); throw new IllegalArgumentException("Error occurred while converting time estimates:" + e.getMessage()); } }
/** * Returns a name for the selected locale in the user's language for display purposes. */ public String getSelectedLocaleDisplayName() { final Locale selectedLocale = localeManager.getLocale(getSelectedLocale()); return selectedLocale.getDisplayName(authenticationContext.getLocale()); }
@Nonnull @Override public HelpUrlsLoaderKey keyForCurrentUser() { return new LoaderKey(ctx.getLocale(), helpUrlsApplicationKeyProvider.getApplicationKeyForUser()); }
public List<ApplicationUser> findAllAndSort() { List<ApplicationUser> users = findAll(); // Sort on Full Name (the compareTo in ApplicationUser is on username so we need our own Comparator) Collections.sort(users, new UserCachingComparator(authenticationContext.getLocale())); return users; } }
public String resolveText(String key, Serializable[] arguments) { final I18nHelper bean = beanFactory.getInstance(jiraAuthenticationContext.getLocale()); return bean.getText(key, arguments); }
@VisibleForTesting Long convertDurationToMins(final String duration) throws InvalidDurationException { return getJiraDurationUtils().parseDuration(duration, getAuthenticationContext().getLocale()); }
/** * @return the current date and time, formatted for the date time picker by the {@link OutlookDateManager}. */ private String getCurrentDateTimeFormatted() { return getOutlookDateManager().getOutlookDate(authenticationContext.getLocale()).formatDateTimePicker(new Date()); }
private String createTooComplexError(Clause clause) throws IOException { if (clause instanceof TerminalClause) { return i18n.getInstance(authenticationContext.getLocale()).getText("search.request.clause.too.complex", jqlStringSupport.generateJqlString(clause)); } else { return i18n.getInstance(authenticationContext.getLocale()).getText("search.request.clause.query.complex"); } }
public String getHtml(final UserPickerLayoutBean layoutBean, final Collection<ApplicationUser> currentUsers, final boolean canEdit, final Long id) { final List<UserBean> userBeans = UserBean.convertUsersToUserBeans(authenticationContext.getLocale(), currentUsers); return getHtml(layoutBean, userBeans, canEdit, id, getI18nBean()); }
public String getHtmlForUsernames(final UserPickerLayoutBean layoutBean, final List<String> usernames, final boolean canEdit, final Long id) { final List<UserBean> userBeans = UserBean.convertUsernamesToUserBeans(authenticationContext.getLocale(), usernames); return getHtml(layoutBean, userBeans, canEdit, id, getI18nBean()); }
final public String getHtml(Project project, ApplicationUser user) { final Locale locale = authenticationContext.getLocale(); final CalendarResourceIncluder calendarResourceIncluder = new CalendarResourceIncluder(); calendarResourceIncluder.includeForLocale(locale); webResourceManager.requireResource(AbstractCopyIssueAction.RESOURCES_ADMIN_JS); ImmutableMap<String, ?> params = ImmutableMap.of( "projectKey", project.getKey() ); return descriptor.getHtml("view", params); }