[i18n] Internationalization for ruby site #1361
Draft
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.
I have to run just now, but this is a 'getting started' example for i18n with ruby - I didn't want to finish extracting strings until we had a chance to take a look and see if we want to tackle this. I think it would be a really good thing for JOSS to be accessible to languages other than english, but for the ruby site it would require a decent amount of awkward i18n mostly because some pages have a lot of text directly expressed as HTML/erb, but i think it's very doable.
This initial push just sets up english and spanish locales (untranslated) with a few basic pages extracted. I haven't set up the routes yet, but we would presumably want to have it s.t. we send back a locale depending on the languages-accepted header or put language selection dropdown somewhere and serve pages from like
joss.theoj.org/es/{pagename}
.Anyway just a draft as an example, if we like this and want to move forward with it i can finish it up for review :)