Repository navigation
Restore choosing the language with LOCALE - #1727
Merged
Merged
Conversation
**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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 wasdeleted in the move to Rails (#903). Since then every page has been in
English, whatever LOCALE says.
Notes
default_localestays English, so missing translations still fall backto it in production. About 50 newer keys aren't translated yet in any
other language.