Open andytgeezer opened 10 years ago
The instruction for importing the lessions into Google Docs is surprisingly complicated. When you have time, call me over Hangout and I'll show you.
Ready when you are my man
OK. First, you'll have to install the Translate Toolkit by running these commands (assuming ur on a Mac and have Homebrew installed):
$ brew install python # to get pip
$ pip install translate-toolkit
Check that you can call txt2po
and po2csv
in the terminal. Then get the latest version of the CodeClub curriculum (not the one in our repo, it's outdated). For each lesson, find the .md file containing the lesson and run these commands to convert it into a .csv file (a primitive Excel file):
$ txt2po <lesson>.md <lesson>.po
$ po2csv <lesson>.po <lesson>.csv
Navigate to the corresponding folder on Google Drive for that lesson and upload the .csv file. Now, for ease of translation, open it then widen the source and target columns. Also select these two columns then turn on Format > Wrap Text in the menubar.
Hope that'll help.
Great instructions. I'm on the case now
Dang - I'm having a look in the CCWorld github at the lessons and they don't have .md files in them. https://github.com/CodeClub/CodeClubWorld-Projects/tree/gh-pages/en-GB
Have I missed something?
Ignore me! I've found them! https://github.com/CodeClub/webdev-curriculum
I see what you mean by complicated. Here's my latest error.
Traceback (most recent call last):
File "/usr/local/bin/txt2po", line 24, in <module>
from translate.convert import txt2po
ImportError: cannot import name txt2po
I ran all the first bits, imported the repo locally and done this
$ txt2po /Users/apple/Documents/Code Club Vietnam/webdev-curriculum/en-GB/01 The Web.md /Users/apple/Documents/Code Club Vietnam/webdev-curriculum/en-GB/01 The Web.po
OK - Now I've learnt how to actually use Terminal. I'm in the right directory...
Still getting an error though
$ txt2po "01 The Web.md" "01 The Web.po"
Traceback (most recent call last):
File "/usr/local/bin/txt2po", line 24, in <module>
from translate.convert import txt2po
ImportError: cannot import name txt2po
Hmm. Looks like brew installs its own version of Python (together with pip and its own set of libraries) whilst and /usr/local/bin/txt2po is using the system version (hence cannot import the txt2po name).
Try removing the brew Python version by brew uninstall python
and run this command to install pip for system python:
sudo easy_install -U pip
Done. New error
$ txt2po "01 The Web.md" "01 The Web.po" -bash: /usr/local/bin/txt2po: /usr/local/opt/python/bin/python2.7: bad interpreter: No such file or directory
Haha, this is so messed up. OK, I'll run through on my own machine and upload the csv files somewhere you can access.
ooooooh. I just typed in
"install python"
now I've run the command and voila! No error. No idea where the .po file is though...
It should be in the same directory that you run the command from. Try running ls
(list) to see the list of files in the current directory.
oh bollocks. That didn't actually work either.
$ txt2po "01 The Web.md" "01 The Web.po txt2po "01 The Web.md" "01 The Web.po -bash: /usr/local/bin/txt2po: /usr/local/opt/python/bin/python2.7: bad interpreter: No such file or directory
give me another half hour. I'll try and figure this one out and won't bother you too much I promise!
Alright I give up. Life is too short for this! Want to take over my computer? If you install all the stuff, I'll run through the donkey work
I've just checked on my virtual Mac OS X machine. Translate Toolkit is at fault, not you. Anw, here man: https://dl.dropboxusercontent.com/u/20007163/csv.zip
OK Term 3 is now good to go on drive. Can you work your magic on Term 4 when you get a moment.
Here, my man: https://dl.dropboxusercontent.com/u/20007163/term4csv.zip.
Also, could you tweak the spreadsheets like I said in a previous comment, https://github.com/codeclubvietnam/work-tracking/issues/64#issuecomment-44925267, so that they look more like this: https://docs.google.com/spreadsheets/d/11lzUbMgI20Knm0lUzP-ckhGMYRtu7jqlNxXKQjy11qE/edit#gid=2096598981?
Yup I'll tweak and upload this lot. Thanks for the converts. Don't need anything but the csv in there I presume? No need for images or anything else as the .csv will only reference the images once it's on github anyway right?
On 4 June 2014 23:34, Trung Ngo notifications@github.com wrote:
Here, my man: https://dl.dropboxusercontent.com/u/20007163/term4csv.zip.
Could you tweak the spreadsheets like I said in a previous comment, #64 (comment) https://github.com/codeclubvietnam/work-tracking/issues/64#issuecomment-44925267, so that they look more like this: https://docs.google.com/spreadsheets/d/11lzUbMgI20Knm0lUzP-ckhGMYRtu7jqlNxXKQjy11qE/edit#gid=2096598981 ?
— Reply to this email directly or view it on GitHub https://github.com/codeclubvietnam/work-tracking/issues/64#issuecomment-45114562 .
Exactly. The translators can use the rendered version here for reference.
What about the Volunteer resources and worksheets from term 4? There's an .md in there
On 5 June 2014 00:27, Trung Ngo notifications@github.com wrote:
here
All imported and formatted. If you get a chance can you do the volunteer resource in term 4 and then we can close this issue and I can start getting folk onto the translations :-)
I'm happy to do this (I have lots of time on my hands at the moment) just let me know what needs doing. I intend to amass an army of translators for this. Mwahahahaha