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

refactor(i18n): remove routingStrategy in favour of routing object #5527

Merged
merged 4 commits into from
Nov 30, 2023

Conversation

ematipico
Copy link
Member

@ematipico ematipico commented Nov 29, 2023

Description (required)

RFC change: withastro/roadmap@089253d

This PR updates the page to use the new routing object. The old routingStrategy has been removed.

Here's how the old configuration is mapped to the new one

export default defineConfig({
  experimental: {
      i18n: {
-          routingStrategy: "prefix-always",
+          routing: {
+              prefixDefaultLocale: true,
+          }  
      }
  }
})
export default defineConfig({
  experimental: {
      i18n: {
-          routingStrategy: "prefix-other-locales",
+          routing: {
+              prefixDefaultLocale: false,
+          }  
      }
  }
})

Also, it's worth noting that routing contains a key called strategy, but since its value is only one, ** for now**, I decided not to mention it at all.

For Astro version: next release. See astro PR #9236.

Copy link

vercel bot commented Nov 29, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
docs ✅ Ready (Inspect) Visit Preview Nov 30, 2023 3:09pm

Copy link
Member

@sarah11918 sarah11918 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great to me! I'll just mention that I think the other open PR has routingStrategy in one of its examples, so that (and the implementation PR and changeset) should also be updated, if this is the new config option!

@ematipico
Copy link
Member Author

This looks great to me! I'll just mention that I think the other open PR has routingStrategy in one of its examples, so that (and the implementation PR and changeset) should also be updated, if this is the new config option!

Great call out! I update the PR once this one is merged

@sarah11918 sarah11918 added add new content Document something that is not in docs. May require testing, confirmation, or affect other pages. merge-on-release Don't merge this before the feature is released! (MQ=approved but WAIT for feature release!) 4.0 minor-release For the next minor release; in the milestone, "merge queue" when approved by Sarah! and removed 4.0 labels Nov 29, 2023
Co-authored-by: Sarah Rainsberger <[email protected]>
Co-authored-by: HiDeoo <[email protected]>
Co-authored-by: Atharva Pise <[email protected]>
Co-authored-by: Genteure <[email protected]>
Co-authored-by: Kevin Zuniga Cuellar <[email protected]>
Co-authored-by: Reuben Tier <[email protected]>
@ElianCodes ElianCodes merged commit cba7e56 into main Nov 30, 2023
@ElianCodes ElianCodes deleted the refactor/routing-strategy branch November 30, 2023 15:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
add new content Document something that is not in docs. May require testing, confirmation, or affect other pages. merge-on-release Don't merge this before the feature is released! (MQ=approved but WAIT for feature release!) minor-release For the next minor release; in the milestone, "merge queue" when approved by Sarah!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants