Skip to content

Conversation

mportiz08
Copy link
Contributor

Bug/issue #, if applicable: 160500944

Summary

Previously, the locale was only being updated in routing hooks for documentation pages. This should be done for all view components to ensure that the appropriate locale metadata is updated and tracked, regardless of how a page is entered (directly loading a URL or clicking through links between pages).

Testing

Steps:

  1. Try to open a URL containing localized tutorial content (or other non-doc pages), like http://localhost:8080/ja-JP/tutorials/example
  2. Verify that hardcoded UI strings are presented in the appropriate language

Checklist

Make sure you check off the following items. If they cannot be completed, provide a reason.

  • Added tests
  • Ran npm test, and it succeeded
  • Updated documentation if necessary

@mportiz08 mportiz08 requested a review from marinaaisa October 9, 2025 17:23
@marinaaisa marinaaisa force-pushed the update-locale-on-route-enter branch from 7e32ad8 to 33ea299 Compare October 10, 2025 15:34
Copy link
Member

@marinaaisa marinaaisa left a comment

Choose a reason for hiding this comment

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

Tested and it looks great, thanks!
I rebased this branch to test with the latest changes introduced in the router.

@mportiz08
Copy link
Contributor Author

@swift-ci test

@mportiz08 mportiz08 merged commit a2ac150 into swiftlang:main Oct 10, 2025
1 check passed
@mportiz08 mportiz08 deleted the update-locale-on-route-enter branch October 10, 2025 17:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants