Translate the description

Use case

Translate the description of the issue to English using the DeepL API.

🗒️ Prerequisites

Connection with DeepL

In Jira administration > Manage apps > Remote actions > Connections, create a new connection and name it. 

Set the following base URL.

Bash
https://api-free.deepl.com/v2

 If you are already have a DeepL API Pro plan, use the following base URL instead.

Bash
https://api.deepl.com/v2

 Select No authentication as authentication method.


⚒️ Configuration

Add the Execute remote action post function to the transition of your choice.

Action

In Expert mode, create a new action with the following parameters:

Name

Enter Translate description as the name of the new action.

Method

Select the POST method.

Default connection

Select the connection with DeepL.

REST path.

Use the following REST path after replacing nnnnn-nnnnn with the authorization key from your DeepL account.

Bash
/translate?auth_key=nnnnn-nnnnn

Action

In Expert mode, create a new action with the following parameters:

Action body

Enter this action body.

Bash
 {
	"text": ["%{issue.description}"],
    "target_lang": "EN"
}

The target language of the translation can be edited by changing the value of the "target_lang" key according to the DeepL specifications.

Update issue fields

Update a Text Field (multi-line).

 Select the option Set field value manually (parser expression).

Enter the following expression with the expression editor in General mode.

Bash
%{findReplaceAll(%{action.response.translations[*].text}, "/n", "//")}


📚   Related examples