Open source and multilingual
In keeping with Zooniverse’s philosophy of openness, the code for Snapshot Serengeti was released back in February. (And the code for several other Zooniverse projects has been released, as well). What this means is that you — or anyone else — can contribute directly to the development of Snapshot Serengeti!
In particular, we’d love to internationalize the site so non-English speakers can participate. If you go and classify images in Snapshot Serengeti right now, you can see a beta version of a Polish translation of the site. Look for the word “English” in the upper left, pull down the arrow, and select “Polski (beta)”. You can now develop your Polish vocabulary, if you don’t happen to be a native Polish speaker. (Seriously. I studied for my high school AP French exam by installing Civilization in French on my computer and playing it endlessly. I’ll admit it was tricky to work the words caserne (barracks) and galère (galley) into my exam essay, but playing Civilization was so much more fun than flash cards…)
All the text you see on Snapshot Serengeti is in what is called a “localization file.” If you look at Snapshot Serengeti’s English localization file, you’ll see all the English text that you could possibly encounter on the site, starting like this:
And if you wanted to, say, create a Swahili version of Snapshot Serengeti (which would be awesome), you would change the text that reads ‘Welcome to Snapshot Serengeti!’ to ‘Karibu Snapshot Serengeti!’. And you would continue doing that for all the English.
So, want to do some translating? If you’re tech-savvy, follow these instructions for translating Galaxy Zoo, but use the Snapshot Serengeti code instead of Galaxy Zoo’s. If those directions leave your head spinning, leave a comment below and we’ll help get you started.
I have some experience translating software would like to contribute, but I’m unsure of how the coffee and JSON files in this source tree are related: public/translations/README.md refers to app/translations/en_us.coffee (like the blog post above), but the es_ex and pl_pl translations in public/translations are JSON files without corresponding coffee files in app/translations. Do I base my translation on a copy of en_us.coffee or on one of the JSON files?
The Galaxy Zoo guide refers to a template-creating script, but that gives an error: “translate.rb:11: syntax error, unexpected ‘:’, expecting $end”
I will get an answer for you from the developers ASAP.
It looks like the script error you received was from a Ruby 1.9 style hash.
I’ve changed it to be back-compatible as well as added a note about installing the CoffeeScript gem.
Ultimately, all this script does is generate a JSON file from the language CoffeeScript file which will be loaded from the application.
You can submit pull requests using either CoffeeScript or JSON, whichever you prefer.
I also needed to install nodejs and tweak the file paths in translate.rb slightly, but now I have a new json file to work on and I think I’m all set. Thanks!
Sorry, that is confusing. The translations should be JSON files under the “public” directory. I’ve just added an English JSON example here: https://github.com/zooniverse/Serengeti/blob/master/public/translations/en_us_example.json
No problem, my confusion was already resolved (see above) and the example json file now helps others off to an easier start I’m sure.