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

Url normalization fails when url has language tag that is current language #2920

Closed
mathieuprog opened this issue Apr 26, 2023 · 1 comment · Fixed by #2921
Closed

Url normalization fails when url has language tag that is current language #2920

mathieuprog opened this issue Apr 26, 2023 · 1 comment · Fixed by #2921
Labels
bug feature: 🗺 i18n Internationalization and localization of Eleventy projects

Comments

@mathieuprog
Copy link
Contributor

mathieuprog commented Apr 26, 2023

PR: #2921

Operating system

Windows 11

Eleventy

2.0.1

Describe the bug

When setting the errorMode to strict, I have the following error when trying to use lcoale_url (when pages for default language are being built):

[11ty] Error: Localized file for URL /en/en/features/ was not found in your project. A non-localized version does exist—are you sure you meant to use the locale_url filter for this? You can bypass this error using the errorMode option in the I18N plugin (current value: "strict"). (via Template render error)

Demo: https://github.com/mathieuprog/11ty_website

When setting errorMode to "allow-fallback" it works.

Reproduction steps

clone
npm start

Expected behavior

No response

Reproduction URL

No response

Screenshots

No response

@mathieuprog mathieuprog changed the title Translations of URLs doesn't work with strict errorMode Url normalization fails when url has language tag that is current language Apr 26, 2023
@zachleat zachleat added feature: 🗺 i18n Internationalization and localization of Eleventy projects bug and removed needs-triage labels Nov 7, 2023
@zachleat zachleat added this to the Eleventy 3.0.0 milestone Nov 7, 2023
@zachleat
Copy link
Member

zachleat commented Nov 7, 2023

Shipping with 3.0, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug feature: 🗺 i18n Internationalization and localization of Eleventy projects
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants