Add-on deployed disabled if translations mentioned in descriptor

I started to develop a simple add-on. Once I started to add the translations descriptors in atlassian-connect.json

"translations": {
        "paths": {
            "en-US": "/i18n/en_US.json"
        }
    }

the deployment has as result the add-on disabled.

The message I get is

Registered with host at https://<my site>.atlassian.net/wiki
Add-on is disabled on https://<my site>.atlassian.net/wiki. Enable manually via upm

When I try to manually enable it from UPM, i receive an error message

This add-on failed to enable. Contact the add-on vendor for support.

I can reproduce the behavior very easy. If I take out the translations section, everything goes well, but as soon as I reintroduce it, I get the add-on disabled.

Hello @cpitis,

I was able to replicate the same error a few minutes ago. Upon installation, the app is disabled and enabling it results in that error. I was able to fix it, and apparently, the problem on my end is the incorrect location of the translation file. Once I got the location sorted out, I was able to install it as expected.

Here’s the test app I created in case you want to play around with it and/or use as a reference.

Cheers,
Ian

1 Like

I finally found out what the issue was: the JSON file containing the translations was malformed (missing a comma). I corrected it, and suddenly the macro is installed and enabled at installation.

I discovered this accidentally. I am wondering how can I get more detailed diagnostic in such cases using the development cloud instance.

2 Likes

Hi Guys,
I am working on internalization for the Jira Cloud app, I just added a translation object to Atlassian-connect.json, but after installation, the app getting in disable mode and trying to enabling getting the below error.

Any help would be appreciated.

“translations”: {
“paths”: {
“es-ES”: “/locales/es-ES/translation.json”,
“de-DE”: “/locales/de-DE/translation.json”,
“fr-FR”: “/locales/fr-FR/translation.json”
}
}

Hi @DharmaTeja ,

Can you please produce a minimal app (like that of @iragudo’s above) that demonstrates the issue.

Regards,
Dugald

Hi @dmorrow ,

Thanks for your quick response.

I resolved this issue. After keeping some plain JSON format like below, i am getting the display.

“i18n”: “websection.addon.name”

{
“websection.addon.name” : “Example app name”,
“websection.addon.header”: “Example header”
}

In my error case my valid JSON will be like below format. When i used 11kB huge formatted JSON the app is getting disabled mode. May be the JSON should simple format form.

{
“appname”: “example appname”,
“vendor”: “example vendor name”,
“headers”: {
“header1”: “Hello”
}
…
}