yassinedoghri / astro-i18next

An astro integration of i18next + some utility components to help you translate your astro websites!
https://astro-i18next.yassinedoghri.com
MIT License
521 stars 37 forks source link

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

Open BaseCrusher opened 1 year ago

BaseCrusher commented 1 year ago

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):

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

itsmatteomanf commented 1 year ago

Seeing the same behaviour.

koppk001 commented 8 months ago

Anybody found a solution on this? I'm hardstuck