Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Schema Translations not being added - bug, or user error? #90

Open
matt-bailey opened this issue Mar 3, 2022 · 0 comments
Open

Schema Translations not being added - bug, or user error? #90

matt-bailey opened this issue Mar 3, 2022 · 0 comments

Comments

@matt-bailey
Copy link

matt-bailey commented Mar 3, 2022

I can't seem to get the schema_translations.json file to be merged-in on publish - if I check via the API after publishing, the schema_translations property of the widget template JSON is empty.

When I run the validate script I get the following error:

widget-builder validate --translation <MyWidget>
[2022-03-03T15:53:16.714Z] There was a problem loading the schema_translation.json file.

This is what my translations schema looks like - just simple for now as I'm testing it out:

{
  "i18n.ProgramType": {
    "default": "Program type",
    "en": "Program type",
    "en-GB": "Programme type",
    "en-US": "Program type",
    "fr-FR": "Type de programme"
  },
  "i18n.FormType": {
    "default": "Form type",
    "en": "Form type",
    "en-GB": "Form type",
    "en-US": "Form type",
    "fr-FR": "Type de forme"
  }
}

When I stringify the translations above and manually update the widget via the API (PUT) they work just fine, so I don't think the format of the translations is incorrect. It seems like it's something to do with how the file is being read/imported?

I'm running node v14.13.1 and npm 6.14.8.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant