Post on 12-Jan-2017
Raspberry Piで日本の子供たちに プログラミングのパッションを
伝えよう!
Let’s use Raspberry Pito share our passion of programming
with kids of Japan!
September 21-22, 2016Antoine Choppin @japonophile
ショパン アントワン
the World
世界
the story of a kidwho discovered programming...
a little about me
@japonophile
japonophile
from: Belgium, living in Japan work: software engineer in Healthcare hobby: neural nets, robots … langs: (Java / C#), Clojure, Python, JS … kids: 2 daughters (ES 5th and 2nd grade)
Antoine Choppin
agendaRecipe to share our passion of programming with kids
Small
Fun
Story
Language
Friends
Steve Jobs
Eben Upton
Small
Alex Klein
Small
Fun
Computer kit
OS
Apps & Games
Community
Kano
Kano OS
Make Minecraft
Terminal Quest
Make Art
CommunityEnjoy programming with friends
Small
Story
Fun
Bonjour, comment va?Apprenons a programmer
Connaissez-vous Kano?
Je m’appelle Jean
Que voudrais-tu fabriquer?
Jouons a un jeu!
Je vais te raconter une histoire
Translate Kano Apps
What is i18n?
= internationalization
modify a program to make it possible to support other languages
l11n = localization
add support for a foreign language to a program translation + ...
gettext intro... print _(“Hello, my name is Kano”) ...
Program: myapp-main.py
... src/myapp-main.py ...
PYPOTFILES: List of files to be processed by xgettext
#: src/myapp-main.py:36 msgid "Hello, my name is Kano" msgstr ""
Translation template: messages.pot
#: src/myapp-main.py:36 msgid "Hello, my name is Kano" msgstr "こんにちは、Kanoと言います。"
Japanese translation: ja.po
#: src/myapp-main.py:36 msgid "Hello, my name is Kano" msgstr "Bonjour, je m’appelle Kano"
French translation: fr.po
001110100110111101010001000010101110100010100101010100010101110101011101001010100100010101001000101010111
locales/ja/LC_MESSAGES/myapp.mo
000010101110100010100101010100010101110101011101001010111001110100110111101010001010101001000101010010001
locales/fr/LC_MESSAGES/myapp.mo
i18n tips● Use .format instead of %s, %d ● Use named params instead of
positional params: _(“Today is {} {}”) _(“Today is {month} {day}”)
● Write comments for the translators ● Do not split sentences:
_(“this is a “) + car.color + _(“car”) _(“this is a {color} car”).format(color=car.color)
● Avoid including HTML in strings: _(“<em>Welcome!</em>”) u”<em>” + _(“Welcome!”) + u”</em>”
https://www.youtube.com/watch?v=UOOMFGURr5I
Overview of Terminal Quest
StoryBook Terminal
Terminal.py
challenge1.py
challenge2.py
ASCII art
socke
t transm
ission
I18n of Terminal Quest
● Mark UI visible strings ● Update format (parameters etc) ● Copy ASCII art folder for each language ● Typewriter ○ Fix width computation (for wide characters) ○ Fix word-wrapping algorithm (for lg with no space)
● Adjust buffer size (for multi-byte strings)
Internationalisation is not just translation!
I18n of Terminal Quest
I18n of Make Light
● Python UI using gtk
● Content (challenges) in JSON format
How to switch Kano (RPi) to Japanese
$ sudo dpkg-reconfigure locales en_GB.UTF-8 UTF-8 ja_JP.EUC-JP EUC-JP * ja_JP.UTF-8 UTF-8
$ apt-get install ttf-kochi-gothic xfonts-intl-japanese xfonts-intl-japanese-big xfonts-kaname
Demo
Kano i18n status
i18n done PR merged terminal-quest ◯ ◯ make-art ◯ ◯ make-snake ◯ ◯ make-light ◯ × make-adventure × × make-minecraft × × kano-profile ◯ × kano-settings △ × kano-updater ◯ ◯ kano-vnc ◯ ◯ kano-apps ◯ ◯ kano-greeter ◯ ◯
Open issues for Japanese support in Kano
• IME (support Japanese input)
• i18n support for apps not (yet) open source
• Translation timing vs release timing
• Translation of community site
Small
LanguageStory
Fun
Ready forBeta Testing!
“Penguin”Programming Club
- For elementary school kids, parents welcome
- One Saturday morning every month
- Make programs (games etc) with our friends
- Use Kano or bring you own PC
- Mostly block-based language (like Scratch)
Topics
blocks vs code
Kano vs own PC
assignment vs free
learn from teacher vs friends
logic/math vs creativity
Small
Friends
LanguageStory
Fun
Let’s share our passion of programming with kids
Summary
- Raspberry Pi is a great platform to learn programming
- It is more fun to learn with friends
- Let’s go beyond frontiers and i18nalize our apps
- Let’s contribute to Open Source
Bonus
Questions?
Fin
https://www.raspberrypi.org/ https://kano.me/ https://github.com/KanoComputinghttps://www.gnu.org/software/gettext/https://art.kano.mehttps://chopp.in/penguin/