Skip to content

refactor(i18n): improve locale handling#72641

Merged
artem-vavilov merged 2 commits into
stagingfrom
dashboard-i18n-refactoring
May 12, 2026
Merged

refactor(i18n): improve locale handling#72641
artem-vavilov merged 2 commits into
stagingfrom
dashboard-i18n-refactoring

Conversation

@artem-vavilov

@artem-vavilov artem-vavilov commented May 12, 2026

Copy link
Copy Markdown
Member

Refactors request-locale handling by removing the legacy VarnishEnvironment middleware and shifting locale resolution/cookie+redirect behavior into a new Middleware::I18n, making I18n.locale the request-locale source of truth across Dashboard (and updating related Global Edition behavior and tests).

Changes:

  • Replace VarnishEnvironment with Middleware::I18n in the Dashboard Rack middleware stack and remove controller-level locale wrapping.
  • Update Global Edition routing/redirect behavior and related tests to operate with I18n.locale as the authoritative locale.
  • Remove legacy shared Varnish middleware/tests and adjust request/test helpers to set locale via I18n.locale.

Links

@artem-vavilov artem-vavilov requested a review from Hamms May 12, 2026 03:21

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 55273a765c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread lib/cdo/rack/request.rb

@Hamms Hamms left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Verified via an adhoc that this works even on chef-managed environments 👍

@artem-vavilov artem-vavilov merged commit 4b67264 into staging May 12, 2026
8 checks passed
@artem-vavilov artem-vavilov deleted the dashboard-i18n-refactoring branch May 12, 2026 21:04
Hamms added a commit that referenced this pull request May 15, 2026
* Rename copilot-instructions.md to copilot.instructions.md

* refactor(i18n): improve locale handling (#72641)

* add indices (#72648)

* Update schema cache dump after schema changes.

* Restore Original Drone Cache (#72649)

* Restore Original Drone Cache

Follow-up to #68860,
which targeted a temporary cache file to minimize disruption.

* rebuild original cache image

* Revert "rebuild original cache image"

This reverts commit f323260.

* Font size updates for external file types (#72660)

* update stylesheet for external files

* add label and li

* script

* video tylsheet

* Revert "video tylsheet"

This reverts commit cbf9bf1.

* update external files

* update script

* delete script

* Video levels CSS change/markdown edit (#72662)

* Font size updates for free-response levels (#72667)

* Update application.scss

* remove updates from .text-match and .peer-review

* Update application.scss

* consolidate

* Update application.scss

* Adds a fairly complete Tanstack-query API using ky as a configurable transport. (#72026)

* Adds a fairly complete Tanstack-query API using ky as a configurable transport.

* Adds transports documentation.

* Commits yarn.lock.

* Type fixes for music lab

* Updates music-lab tests to wrap the mock transport.

* Update frontend/packages/core/src/api/QueryClientProvider.tsx

Co-authored-by: Stephen Liang <stephenliang@users.noreply.github.com>

* Update frontend/packages/core/src/api/bootstrapApiClient.ts

Co-authored-by: Stephen Liang <stephenliang@users.noreply.github.com>

* Apply suggestion from @wilkie

* Refactors the level properties request params and API calls.

* Determines level properties URL with type discrimination.

* Places @tanstack/react-query into catalog.

* Fixes type issue in design-system-storybook

* Fixes format issue.

---------

Co-authored-by: Stephen Liang <538214+stephenliang@users.noreply.github.com>
Co-authored-by: Stephen Liang <stephenliang@users.noreply.github.com>

* levelbuilder content changes (-robo-commit) (#72682)

Co-authored-by: Continuous Integration <dev@code.org>
Co-authored-by: Stephen Liang <538214+stephenliang@users.noreply.github.com>

* Update header font sizes for free-response questions (#72684)

* update header sizes

* revert header size changes for video and external

* remove header styling for free-response

* manually resolve merge conflict with levelbuilder

---------

Co-authored-by: Hannah Bergam <hannahbergam@gmail.com>
Co-authored-by: Artem Vavilov <artem.vavilov.7@gmail.com>
Co-authored-by: Code.org Deploy Systems <dev@code.org>
Co-authored-by: Mark Barnes <mark.barnes@code.org>
Co-authored-by: fisher-alice <107423305+fisher-alice@users.noreply.github.com>
Co-authored-by: Eric Aderhold <eric.aderhold@code.org>
Co-authored-by: alex-m-brown <alex.brown@code.org>
Co-authored-by: wilkie <david.wilkinson@code.org>
Co-authored-by: Stephen Liang <538214+stephenliang@users.noreply.github.com>
Co-authored-by: Stephen Liang <stephenliang@users.noreply.github.com>
Co-authored-by: Alice Fisher <alice.fisher@code.org>
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