gnunn1 / tilix-web

Website for the Terminix project
Mozilla Public License 2.0
14 stars 20 forks source link

Web site localizations #13

Open f2404 opened 7 years ago

f2404 commented 7 years ago

Would be nice to have as Terminix is translated to many languages.

bilelmoussaoui commented 7 years ago

Will add it later Edit: using github pages, we have a limited plugins that we can use. We have used on of the solutions on the lollypop web page. Using the same method is going to be hard as we will have too many translations files..... I will wait until the website is "ready". And after that either we move from github pages host or we find a better solution ;)

bilelmoussaoui commented 7 years ago

@gnunn1 What do you think about that? We have two options, we either use a proper plugin, and for that we should host the website elsewhere, or i can use the same method we have used on the lollypop website which works perfectly! I will fix this by the end of this month :+1:

gnunn1 commented 7 years ago

What does it take to host it elsewhere, does jekyll generate a static set of pages that we could upload somewhere? My personal website runs on stablehost and it's easy enough for me to add a new domain to it at minimal cost.

bilelmoussaoui commented 7 years ago

Well, jekyll has too many plugins that can help making the translations pretty easy :) but they are not supported by Github pages.. The thing is that having the website hosted somewhere, we can easily install the needed ruby gem for the jekyll plugin and keeping the source code here on Github. It can be easily mirrored to your stablehost, and we can host the translations either on weblate or transifex. Anyway i've found a better way to do it, i have to test it first and see if it will works :) I will keep you updated

bilelmoussaoui commented 7 years ago

@f2404 @gnunn1 I was able to implement a "good" way of making the website translatable. But for now, i still need the possibllity to change the language to another one. All the work is under i18 branch if you want to take a look. The UI of changing the language isn't complete. I've thought of storing the current language or the selected language as a cookie, which is a good idea. But i don't know how to make jekyll read the js value without having to do some hackish way....

Anyway in order to translate the website all you have to do is: Under those folder : _faqs, _features, _manual, _packages, _posts there's a folder "en", just copy the folder and rename it to an other language id, for example "fr". Open the files under this folder and translate them, don't forget to set the "lang: en" to the new language id under each file you've translated. Once you've finished that, open the _config.yml and copy the "en" key with all the values under it rename it to "fr"/language id you've chosen; and translate all the contents. And voila you've done translating the website