Closed Dagolin closed 7 years ago
Work in progress
Hi @raisedadead I have a question for you, I know how it sounds stupid but I did googled/ search on forum/ github/ all possible files in the repository, that is, I couldn't find a way to switch language to check my translation work locally
The most related doc I have found is guidelines-for-translating-free-code-camp-to-any-language, which mentioned follow the step of this commit, however the file has been changed a lot and not able to reproduce it.
Change the language code inside the URL (ex: /en/challenges/ to /es/challenges/) only works under certain circumstances like ES, but not other languages like Fr, Li
thanks in advance @raisedadead.
Hi @Dagolin no issues, and apologies for not having this in clarification at first place, our code base has changed a bit since the time of that article, and it sure needs some updating.
You need to temporarily edit this file to add the language code of your choice here: https://github.com/freeCodeCamp/freeCodeCamp/blob/staging/common/utils/supported-languages.js
Test your changes.
Make sure after testing you reset that file and NOT commit it.
$ git reset -- common/utils/supported-languages.js
Hope this helps, please reach out to the Contributors Chat room, should you need any assistance.
Thanks a lot for your help, and on that note, would you be interested in updating the guide, given the fact that you have recently worked on this, and you might have the updated process known better than anyone?
Thanks, happy translating!
Thanks for your fast reply and supported-language.js
works beautifully, that's great.
And for the guild, I am totally OK with this, I think it could be done after I finished some translate PR, that would be great if we could have an issue to track the update of the guilds
Well its the issue no 1 on this tracker: https://github.com/freeCodeCamp/TranslationExpansion/issues/1
Please feel free to add comments an update as necessary. Thanks a lot once again.
Ignore that issue, its pointing to things way too old. Here is a fresh one. https://github.com/freeCodeCamp/TranslationExpansion/issues/90
Well the old translate does great, however I couldn't make new languages work. I added in supported-language.js
export default {
en: 'English',
es: 'Spanish',
ru: 'Russia',
tw: 'Traditional Chinese'
};
And in getting-started.json
I added a small paragraph with key 'tw' in the section "Learn how Free Code Camp Works" as the others do, and run gulp
But it keep saying "We haven't translated this challenge yet." when I visit tw/challenges/join-the-free-code-camp-community/learn-how-free-code-camp-works
, in my expectation it should have my translated pages shown
The 'ru' works perfectly when I visit ru/challenges/join-the-free-code-camp-community/learn-how-free-code-camp-works
Am I missing anything?
Have you seeded with node seed
before running gulp
?
@raisedadead Wow..you are genius!! 👍
Getting Started - Translation in Traditional Chinese (zh-TW)