swcarpentry / DEPRECATED-bc

DEPRECATED: This repository is now frozen - please see individual lesson repositories.
Other
299 stars 383 forks source link

[meta] Add translation of index.html #602

Closed rgaiacs closed 9 years ago

rgaiacs commented 10 years ago

What is the best way to us provide translation of index.html?

Please add others suggestions, make comments and vote.

Suggestion 1

Have index-en.html(for the English version), index-es.html (for the Spanish version), index-pt.html (for the Portuguese version) and so on. The instructor leader should rename the desired file to index.html.

This approach will make clear for new instructors that some translation is or not available. The side effect is that we will have many files at the root our repository.

Suggestion 2

Have translations/es/index.html (for the Spanish version), translations/pt/index.html (for the Portuguese version) and so on. The instructor leader should copy the desired file to index.html.

This approach will keep the translation in its own source tree (as proposed by the team translating our lesson to Spanish).

philippbayer commented 10 years ago

Could you have a yml file for each translations and a single index.html without any text, just placeholders for the different paragraphs of text like {{ Introduction }}, and on compilation each block is inserted from the central yml file with all text? The instructors only need to specify the needed language in the header, with 'english' or 'en' as default. If a block isn't present in the central yml file the default locale English is loaded, so that if the translation is outdated we still get the entire page.

Kind of like this: http://stackoverflow.com/questions/6392677/include-different-file-in-jekyll-depending-on-the-locale

This way, you don't run the risk of having different languages in different versions like it will happen in suggestion 1 and 2 - most contributors will work on index-en.html, and if the people who look after the Portuguese version don't keep up the Portuguese version will quickly miss some paragraphs, and bootcamp participants might miss some information.

Edit: This is also how it's done in Rails' i8n module: http://guides.rubyonrails.org/i18n.html

rgaiacs commented 10 years ago

@philippbayer Thanks for the suggestion. I agree with you that this approach will reduce "the risk of having different languages in different versions" but IMHO this approach will make difficult to almost all of ours instructors to change index.html.

Right now, we only have a few non-English workshops and because of that I'm -1 to any approach that increase the complexity of index.html. But to help our non-English instructors we should have a translation of index.html and I don't see big problem letting the non-English instructor update the translation when setting up the non-English workshop.

gvwilson commented 9 years ago

Closing for now - once we explode the repo, we'll be able to maintain lessons in other (human) languages more easily.