Internationalization in workflow statuses

If people around the world, speaking different languages, use your JIRA instance, it is likely that you use internationalization to convert JIRA into their own language. But things like the workflow action name, button name, and so on are configured in the workflow and not as i18n properties. And therefore, they are limited to a single language.

This is where workflow properties come to our rescue, again!

How to do it...

We can modify the workflow action submit button name or the action name using the properties jira.i18n.submit or jira.i18n.title, respectively. The following is the step-by-step procedure:

  1. Identify the i18n file to modify. For the default language, you can find it in the atlassian-jira/WEB-INF/classes/com/atlassian/jira/web/action/JiraWebActionSupport.properties file. For other languages, the i18n file is embedded in the atlassian-jira/WEB-INF/atlassian-bundled-plugins/jira-core-language-pack-_<language code>_<country code>-<jira version>-<jar version>.jar file.
  2. Edit the JiraWebActionSupport.properties file or the appropriate file inside the identified i18n jar file at comatlassianjirawebactionJiraWebActionSupport_<language code>_<country code>.properties. You can use a utility, such as 7Zip, to edit the file inside the jar. Alternatively, you can extract the jar, modify the file, and archive it again!
  3. Add your i18n property and its value: my.submit.button=My Submit Button in English.
  4. Update the file and restart JIRA to pick up the new property.
  5. Log in as a JIRA administrator.
  6. Navigate to Administration | Issues | Workflows.
  7. Create a draft of the workflow, if it is active. Navigate to the transition, which needs to be modified.
  8. Click on the View Properties link.
  9. Enter jira.i18n.submit or jira.i18n.title into the Property Key field, depending on whether you want to modify the submit button name or the action name. Let us consider the example of the submit button:
  10. Enter the i18n key that we used in the property file, under the Property Value field. In our example, the key is my.submit.button. The modified properties will be as shown here:
    How to do it...
  11. Click on Add.
  12. Go back and publish the workflow, if it was active. If not, associate the workflow with the appropriate schemes.

How it works...

Once the workflow is published, JIRA will populate the submit button name from the i18n property file the next time the transition happens. In our example, the transition screen will look like the following screenshot:

How it works...

As you can see, the button name is changed to My Submit Button in English. All you need to do now is modify the other language jars to include the proper translations!

See also

  • The Editing an active workflow recipe in this chapter
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
13.58.212.170