Uploaded image for project: 'Jira Data Center'
  1. Jira Data Center
  2. JRASERVER-31298

project config plugin does not translate permission names

    XMLWordPrintable

Details

    Description

      When viewing project permissions the names of permissions are not translated.

      Steps to Reproduce
      • Set a non-default language in JIRA's General Configuration
        • Spanish for example
      • Notice there are several strings not being translated. The property value is being overruled as the translated string appears to be picked up:

      Original description below:

      For more info see https://jira.atlassian.com/browse/JRA-28198?focusedCommentId=429561&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-429561

      I also try to fix it and I think I did. I did not test fully yet. But correct text is showing as permission name and InProduct Translation lists new value as available for translation.

      I made changes in

      package com.atlassian.jira.projectconfig.contextproviders;
      ...
      public class ProjectPermissionContextProvider implements CacheableContextProvider
      ...
      method private List<SimplePermission> getPermission(I18nHelper i18nHelper, GenericValue scheme, Collection<Permission> permissions)

      I replaced this line

      returnPermissions.add(new SimplePermission(Permissions.getShortName(Integer.valueOf(permission.getId())), permission.getName()), permission.getDescription(), entityDisplays));

      with this line

      returnPermissions.add(new SimplePermission(Permissions.getShortName(Integer.valueOf(permission.getId())), i18nHelper.getText(permission.getNameKey()), permission.getDescription(), entityDisplays));

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              2587644597b9 Boris T
              Votes:
              1 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: