Skip to content

Restore implicit locale state after with_locale - #745

Open
OskarEichler wants to merge 1 commit into
ruby-i18n:masterfrom
OskarEichler:codex/with-locale-default
Open

Restore implicit locale state after with_locale#745
OskarEichler wants to merge 1 commit into
ruby-i18n:masterfrom
OskarEichler:codex/with-locale-default

Conversation

@OskarEichler

Copy link
Copy Markdown

Summary

Preserve whether the locale was explicitly set when entering with_locale.

The existing implementation reads the resolved locale, so an implicit default becomes a stale explicit locale after the block. Restoring the raw value keeps later default_locale changes visible.

This directly addresses #703 and the restoration behavior discussed in #625.

Verification

  • focused external default-locale restoration model
  • 1,607 base-suite runs / 2,674 assertions
  • 1,888 Rails-suite runs / 3,020 assertions
  • Rails 8.1.3.1 / Ruby 4.0.6 integration

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.

1 participant