-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
Low
-
Component/s: Work Item - Backend - Read
-
3
-
Minor
-
25
Issue Summary
Calling Jira cloud REST API using asApp() in Forge app, the response is wrong locale zh_CN instead of en-US
Steps to Reproduce
- Make a request to REST API endpoint. For example, call “rest/api/3/issue/{issue-key}?fields=project,issuetype,status” using the asApp() method. This issue doesn't occur if the API is called using the asUser() method.
- Observe that the text in the response are in Chinese.
Expected Results
API responses should return text in English.
Actual Results
API responses return text in Chinese.
issue.fields.status {
self: 'https://api.atlassian.com/ex/jira/{cloud-ID}/rest/api/3/status/10001',
description: '',
iconUrl: 'https://api.atlassian.com/ex/jira/{cloud-ID}/',
name: '审查中',
id: '10001',
statusCategory: {
self: 'https://api.atlassian.com/ex/jira/{cloud-ID}/rest/api/3/statuscategory/4',
id: 4,
key: 'indeterminate',
colorName: 'yellow',
name: '正在进行'
Workaround
Add the headers below to API calls, which should fix this translation issue.
headers: {
'X-Force-Accept-Language': 'true',
'Accept-Language': 'en'
}