Details

    • Feedback Policy:

      JIRA feedback is collected from a number of different sources and is evaluated when planning the product roadmap. If you would like to know more about how JIRA Product Management uses customer input during the planning process, please see our post on Atlassian Answers.

      Description

      NOTE: This suggestion is for JIRA Cloud. Using JIRA Server? See the corresponding suggestion.

      Following an old issue (JRA-6481), our requirment for i18n implementation is more and mroe important at the moment.

      • May we know when a such feature will be implemented in future release ?
      • Trying to understand how customfield rendering is done, I found a way to apply i18n translation.
        I proceed so :
        • Creating the CustomField as i18n keys : myCustomField
        • Adding the CustomField property value in a rebuild language_fr_FR.jar
          com/atlassian/jira/web/action/JiraWebActionSupport_fr.properties
          myCustomField=Mon Champ personnalisé
        • Adding the CustomField property value in a rebuild language_en_UK.jar
          com/atlassian/jira/web/action/JiraWebActionSupport_en.properties
          myCustomField=My Custom Field
        • ... and alos for any other required languages.
        • Modifying templates/plugins/jira/macros.vm as follow :
          • a new Macro
            ## I18n Headers required for CustomFields
            #macro(i18nCustomName $action $name)
                #set ($wordPos = $name.indexOf(" "))
                #if ($wordPos>0) 
                	#set($key=$name.substring(0,$wordPos)) 
                	$action.getText($key) $name.substring($wordPos,$name.length())
                #else
                	$action.getText($name)
                #end
            #end
          • Replacement of
            #if ($required)
                <span class="required" title="$action.getText("common.forms.requiredfields")"><sup>*</sup>
                $name:
                </span>
            #else
                $name:
            #end

            by

            #if ($required)
                <span class="required" title="$action.getText("common.forms.requiredfields")"><sup>*</sup>
                #i18nCustomName($action $name) :
                </span>
            #else
                #i18nCustomName($action $name) :
            #end
        • Modify includes/panels/issue/view_customfields.jsp as follow :
          Replacement of
          <tr id="rowFor<webwork:property value="./id" />">
              <td bgcolor="f0f0f0" width="20%" valign="top"><b><webwork:property value="name" />:</b></td>
              <td bgcolor="ffffff" width="80%">
                  <webwork:property value="/customFieldHtml(../fieldLayoutItem,., /issueObject)" escape="false" />
              </td>
          </tr>

          by

          <tr id="rowFor<webwork:property value="./id" />">
              <td bgcolor="f0f0f0" width="20%" valign="top"><b><webwork:property value="text(./name)" />:</b></td>
              <td bgcolor="ffffff" width="80%">
                  <webwork:property value="/customFieldHtml(../fieldLayoutItem,., /issueObject)" escape="false" />
              </td>
          </tr>

      Please, let me know if I may implement this, waiting the future feature ?
      What other problem may I encounter ? Probably Word and Excel rendering, I suppose ?

      Rgds
      Vincent

        Attachments

        1. customfieldtrans.png
          customfieldtrans.png
          39 kB
        2. src.zip
          23 kB

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                v_thoule Vincent Thoulé
              • Votes:
                60 Vote for this issue
                Watchers:
                45 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: