astro-i18next icon indicating copy to clipboard operation
astro-i18next copied to clipboard

Using `astro-i18next generate` with `showDefaultLocale` does throw an error

Open BaseCrusher opened this issue 1 year ago • 2 comments

Describe the bug

When running astro-i18next generate an error is thrown. It looks to me, like the path is not being resolved correctly.

To Reproduce

  1. Take any example and set showDefaultLocale to true.
  2. Upgrade astro-i18nex to beta.20 or higher.
  3. Move the index.astro to an en subfolder.
  4. Run astro-i18next generate

Expected behavior

astro-i18next generate should generate the translated files.

Screenshots

image

Context (please complete the following information):

  • astro-i18next version: ^1.0.0-beta.20

Possible fixes

The issue is probably in this function: https://github.com/yassinedoghri/astro-i18next/blob/681e8384270b2b9ad384f83411075c9c3ee33f2d/src/cli/utils.ts#L123 Or here: https://github.com/yassinedoghri/astro-i18next/blob/681e8384270b2b9ad384f83411075c9c3ee33f2d/src/cli/generate.ts#L33

BaseCrusher avatar May 14 '23 19:05 BaseCrusher

Seeing the same behaviour.

itsmatteomanf avatar May 20 '23 14:05 itsmatteomanf

Anybody found a solution on this? I'm hardstuck

koppk001 avatar Mar 05 '24 14:03 koppk001