Skip to content

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

@matt-bailey

Description

@matt-bailey

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions