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

fix(i18n): regression where emitted URLs had // #10067

Merged
merged 5 commits into from
Feb 9, 2024

Conversation

ematipico
Copy link
Member

@ematipico ematipico commented Feb 9, 2024

Changes

This PR fixes a bug where, under certain situations, the absolute URL emitted by the utility has a double slash.

I removed logic that wasn't needed and used the existing logic coming from getRelativeLocaleUrl.

Testing

I added a new unit test and used the validateConfig function that emits the correct defaults from the Astro configuration. That's handy because I was struggling to get Astro defaults when running the unit tests. Ideally I could port all tests to use this pattern, and I'll do it in another PR.

I also updated an integration test; for some reason, the configuration passed to that test wasn't updated. Regardless, the test case that I updated works as I wanted.

Docs

Copy link

changeset-bot bot commented Feb 9, 2024

🦋 Changeset detected

Latest commit: 5402a1b

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@ematipico ematipico force-pushed the fix/regression-for-i18n-virtual-module branch from 7050e7a to 73d1e41 Compare February 9, 2024 10:18
@ematipico ematipico marked this pull request as ready for review February 9, 2024 10:57
@ematipico ematipico changed the title fix(i18n): regression fix(i18n): regression where emitted URLs had // Feb 9, 2024
@github-actions github-actions bot added the pkg: astro Related to the core `astro` package (scope) label Feb 9, 2024
@ematipico ematipico merged commit 989ea63 into main Feb 9, 2024
13 checks passed
@ematipico ematipico deleted the fix/regression-for-i18n-virtual-module branch February 9, 2024 14:58
@astrobot-houston astrobot-houston mentioned this pull request Feb 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pkg: astro Related to the core `astro` package (scope)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants