Translation
gotson opened this issue · 9 comments
Are there plans to translate the cards in English (at least), or other languages ?
Or to provide an easy way for contributors to translate cards ?
Hi @gotson
as cards are generated from an bunch of JSON files, I guess it could be pretty simple to translate the JSON sources (using PR) and then generate multiple versions of the cards. I'll try to think about something soon
Thanks @mathieuancelin, if you decide on a folder structure that could host translations we could start sending PRs indeed.
Hey @gotson
I started working on translation. I changed the structure of the files to be language aware, and I made an automated translation of the cards using google translate. Each cards has multiple translations (https://github.com/MAIF/cards/blob/master/src/cards/human/2-pizza-team.json) and there is a file with references to each available translations (https://github.com/MAIF/cards/blob/master/src/cards/lang.json)
Now everyone is welcome to enhance translations using github PR :)
Thanks @mathieuancelinserli, i started working on the English translation, will send a PR once i'm finished and it's peer-reviewed internally.
One question though, should the docs/
folder be committed in git? Looks like it's a build output from npm generator
.
Just so i know if i need to PR only the .json
files, or the generated .html
also.
Yes @gotson, docs/
is the output of yarn generator
and yes it should be commited because it is the content of https://maif.github.io/cards/ as it's hosted directly on github pages.
You can send your PR with docs/
updated, but it's okay if you only change src/cards/*
sources, I will generate docs/
after merging the PR. I think the PR will be clearer this way :)
Thanks for the clarification, indeed if it's directly hosted on github it makes sense.
Just noticed that in the left menu, the language title it taken from the lang
attribute of https://github.com/MAIF/cards/blob/master/src/cards/lang.json
I supposed it's used for other purposes than just display (like translating via Google Translate).
It would be good to have a separate display name, as it's usually a best practice to display the language name in that language itself (for example 日本語 instead of JA for Japanese).
@gotson that's a very good idea indeed ;)