gatsby-plugin-i18n-l10n icon indicating copy to clipboard operation
gatsby-plugin-i18n-l10n copied to clipboard

Deep translation structure breaks generating gatsby types for Translation

Open FrEaKmAn opened this issue 8 months ago • 1 comments

Describe the bug If we have a translation with deep structure, like

{
  "languages": {
     "en": "English",
     "de": "Deutsch"
  }
}

it fails to generate correct Translation type in gatsby-types.d.ts. The translation is missing message.

To Reproduce Steps to reproduce the behavior:

  1. Add example above as messages for any locale.
  2. Run build.
  3. Check gatsby-types.d.ts

Expected behavior

The Translation type should include

  readonly message: Maybe<Scalars['String']>;

FrEaKmAn avatar Mar 15 '25 20:03 FrEaKmAn

Thank you for reporting! As I completely migrated away from Gatsby, I don't want to invest further time into this, but I'm happy to merge and release a PR. :)

openscript avatar Jul 26 '25 11:07 openscript