Hi guys,
I tried atlassian forge translator example app out and unfortunately though I did everything what the instructions says I get a validation error.
I registered on Microsoft azure as required and added my keys. Do you have a clue what mistake it might be?
Hey Peter,
I just ran through the example app setup, and got the same error.
To fix it you’ll need to make a few changes:
- In index.jsx replace the Import ForgeUI statement with:
import ForgeUI, { render, Fragment, Text, Button, ButtonSet, useState, useProductContext, IssuePanel } from “@forge/ui”;
- In index.jsx replace the last line with:
export const run = render();
- In manifest.yml above app definition, add
permissions:
scopes:
- ‘read:jira-work’
Hope that helps. I’ll see what I can do about getting the sample app updated.
Hi man,
thanks for your reply. I’ve already fixed my problem by myself.
Did the same as you but at the root I’ve explicitly mentioned IssuePanel.
In index.jsx replace the last line with:
export const run = render( <IssuePanel>
<Panel />
</IssuePanel>
);
I also changed TRANSLATE_APT_KEY because it didn’t work out. Created a separate key. And had to add a region.
const key = 'xxx';
const region = 'xxx';
headers: {
'Content-Type': 'application/json; charset=UTF-8',
'Ocp-Apim-Subscription-Key': key,
'Ocp-Apim-Subscription-Region': region,
},