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

BUG: Windows 10 backend loadPath #105

Closed
timeshift92 opened this issue Jan 16, 2023 · 4 comments · Fixed by #112
Closed

BUG: Windows 10 backend loadPath #105

timeshift92 opened this issue Jan 16, 2023 · 4 comments · Fixed by #112
Assignees
Labels
bug Something isn't working released on @beta

Comments

@timeshift92
Copy link

timeshift92 commented Jan 16, 2023

Describe the bug
version 1.0.0-beta.14
had
backend: {
loadPath: '/C:/Projects/OTHER/js/github-euxovv/public/locales/{{lng}}/{{ns}}.json', --- incorrect path
version 1.0.0-beta.15
backend: {
loadPath: 'C:ProjectsOTHERjsgithub-euxovvpubliclocales/{{lng}}/{{ns}}.json', -- incorrect pat

A clear and concise description of what the bug is.

To Reproduce

Steps to reproduce the behavior:

  1. Go to '…'
  2. Click on '…'
  3. Scroll down to '…'
  4. See error

Expected behavior

A clear and concise description of what you expected to happen.

Screenshots

If applicable, add screenshots to help explain your problem.

Context (please complete the following information):

  • astro-i18next version: [e.g. 1.0.0-beta.14,1.0.0-beta.15]
  • astro version: [e.g. 1.9.1]
  • OS: [e.g. Windows 10]
  • Browser: [e.g. chrome]

Add any other context about the problem here.

Possible fixes

version 1.0.0-beta.13 correct

@drumsta
Copy link

drumsta commented Jan 16, 2023

Hello,

Your issue looks similar to the one I've encountered as well, #103. Until developers will fix the issue, you can use a workaround which worked for me.

Define i18nextServer config entry in astro-i18next.config:

  i18nextServer: {
    backend: {
      loadPath: './public/locales/{{lng}}/{{ns}}.json',
    },
  },

@yassinedoghri yassinedoghri self-assigned this Jan 18, 2023
@yassinedoghri yassinedoghri added the bug Something isn't working label Jan 18, 2023
@yassinedoghri
Copy link
Owner

My bad, thought that using Node's fileURLToPath would fix this. It'll be fixed on next release.

yassinedoghri added a commit that referenced this issue Jan 22, 2023
yassinedoghri added a commit that referenced this issue Jan 22, 2023
yassinedoghri pushed a commit that referenced this issue Jan 22, 2023
# [1.0.0-beta.16](v1.0.0-beta.15...v1.0.0-beta.16) (2023-01-22)

### Bug Fixes

* use unjs/pathe to resolve cross OS public path ([ad1d24f](ad1d24f)), closes [#105](#105)
@github-actions
Copy link

🎉 This issue has been resolved in version 1.0.0-beta.16 🎉

The release is available on:

Your semantic-release bot 📦🚀

@yassinedoghri
Copy link
Owner

Alright, hopefully this should be fixed now.

Thanks to @florian-lefebvre for mentioning https://github.com/unjs/pathe, super useful 👍

AliLee0923 pushed a commit to AliLee0923/astro-i18N that referenced this issue Dec 2, 2023
# [1.0.0-beta.16](yassinedoghri/astro-i18next@v1.0.0-beta.15...v1.0.0-beta.16) (2023-01-22)

### Bug Fixes

* use unjs/pathe to resolve cross OS public path ([ad1d24f](yassinedoghri/astro-i18next@ad1d24f)), closes [#105](yassinedoghri/astro-i18next#105)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working released on @beta
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants