Skip to content

Restore choosing the language with LOCALE - #1727

Merged
mockdeep merged 1 commit into
mainfrom
rf-restore-locale
Nov 28, 2026
Merged

mockdeep merged 1 commit into
mainfrom
rf-restore-locale

Conversation

@mockdeep

Copy link
Copy Markdown
Collaborator

What

Render each request in the language named by the LOCALE environment
variable, defaulting to English. An unsupported LOCALE now stops the
app at boot with an error listing the supported languages.

Limit the available locales to Stringer's own translation files,
dropping the ones GoodJob adds. Replace the i18n spec with request
specs that check pages render in the chosen language.

Show Turkish page counts as "1 / 3" instead of "1 of 3".

Why

The LOCALE handling lived in the old Sinatra app.rb, which was
deleted in the move to Rails (#903). Since then every page has been in
English, whatever LOCALE says.

Notes

default_locale stays English, so missing translations still fall back
to it in production. About 50 newer keys aren't translated yet in any
other language.

**What**

Render each request in the language named by the LOCALE environment
variable, defaulting to English. An unsupported LOCALE now stops the
app at boot with an error listing the supported languages.

Limit the available locales to Stringer's own translation files,
dropping the ones GoodJob adds. Replace the i18n spec with request
specs that check pages render in the chosen language.

Show Turkish page counts as "1 / 3" instead of "1 of 3".

**Why**

The LOCALE handling lived in the old Sinatra `app.rb`, which was
deleted in the move to Rails (#903). Since then every page has been in
English, whatever LOCALE says.

**Notes**

`default_locale` stays English, so missing translations still fall back
to it in production. About 50 newer keys aren't translated yet in any
other language.
@mockdeep mockdeep self-assigned this Nov 28, 2026
@mockdeep
mockdeep enabled auto-merge (squash) November 28, 2026 18:48
@mockdeep
mockdeep merged commit 731fa13 into main Nov 28, 2026
4 checks passed
@mockdeep
mockdeep deleted the rf-restore-locale branch November 28, 2026 18:51
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