Great news from Japan :)

35 views
Skip to first unread message

Sven Fuchs

unread,
Jul 30, 2008, 2:15:51 PM7/30/08
to rails...@googlegroups.com
So, as I said I sent a couple of messages to Japanese Rails developers
through GitHub last weekend regarding the question how YAML does (or
does not) cause problems when used to store translations.

Akira answered with a long message and told me about what's going on
in Japan and how they are exited about our work. This is really
awesome! It totally moved me to read about how much response to the
new Rails I18n API there is in Japan, so I wanted to share that with
the rest of this group.

Akira kindly allowed me to forward his message to this list and I'll
include it below.

Also, welcome Akira, and welcome everybody else from Japan to this
group! It's great to have you on board :)

On 28.07.2008, at 11:18, GitHub wrote:
> akira sent you a message.
>
> --------------------
> Subject:
>
> Hello Sven,
>
> Thank you for your email!
> My name is Akira Matsuda, one of the target of your indiscriminate
> email attack against Japanese I18n watchers :)
> I was so much surprized(and felt so happy) with the fact that you
> noticed me(though I had not yet published any information about Ruby/
> Rails in English).
>
> Firstly, let me introduce myself a little bit.
> I'm a freelance Rails programmer in Tokyo/Japan, I'm a regular
> member of Rails Benkyo-kai@Tokyo(Rails study meeting held every
> month in tokyo. I'm gonna talk about it later), I'm a founder of
> Asakusa.rb(a Ruby hackers group including ko1 Sasada --the developer
> of YARV-- launched last month with a lot of respect for Seattle.rb.
> I'm sorry, there's only Japanese website now: http://asakusa.rubyist.net/)
> , one of my hobby is Rails edge watcing, and my another hobby is
> Music. My favourite Musician is L. v. Beethoven(truly).
>
> Well, yes, as you expected, I'm watching your Rails I18n project
> with a big big interest and anticipation. Because we also always
> have been annoyed and frustrated by Japanizing every Rails
> application we make.
>
> So, of course I knew that your I18n library has been merged into
> Rails edge, I read the announcement on your blog post in almost real-
> time(twittered like this at that time http://twitter.com/a_matsuda/statuses/862447811)
> .
> After reading your announcement, I tried it by myself and found it
> very useful. It worked pretty well on Japanese!
>
> Then I thought I have to let other Japanese Railers know about it,
> so I held a learning session about the Rails I18n on the 31st Rails
> Benkyo-kai@Tokyo held on yesterday(http://wiki.fdiary.net/rails/?RailsMeetingTokyo-0031
> ) with a very simple material like this(http://blog.dio.jp/2008/7/27/rails-2-2-i18n
> ).
>
> What I did through the session was, I described the history of the
> project, introduced some materials on the web, talked about how and
> where to follow the commits on Github, grabbed the edge Rails from
> Github, read some points in the source code, did some basic
> translation live demo on irb, and made a very simple Rails app with
> a Japanese translated AR validation error message.
> I believe I succeeded to inform more than 50 people there about the
> Rails I18n!
> And I feel it's so funny that the session was accidentally held on
> just the same day as I received your email.
>
> So, I showed them your message there as well, and we discussed about
> using YAML for that purpose. Everybody there, of course, agreed that
> that format is preferable than the current hash one, but no one
> could clearly explain the problem you were told by someone(though
> there were certain number of famous Ruby/Rails library developers
> and book writers there).
>
> One of my colleague at Asakusa.rb, Kakutani-san (I think you've sent
> the same email to him, and he's gonna send the reply to you sooner
> or later), has poited out that storing Japanese string into YAML
> returns binary output like this,
> % ruby -ryaml -e 'puts "あ".to_yaml'
> --- !binary |44GC
> Thus we may face this problem when we trying to generate the ja-
> JP.yml by Ruby script. That's the only problem we counld notice at
> this moment, and you know, it's qwite a slight problem.
>
> So, I personally think it's OK to use YAML in this case. I'm sure we
> Japanese can also be happy with it, and It's not going to cause much
> problem.
> In fact, I made a little adhoc test implementation with YAML ->
> I18n::Backend::Simple => AR validation error message, and it worked
> perfectly again.
> Here's my testing code<<EOF
>
> lib/locale.ja-JP.rb
> I18n.backend.store_translations :'ja-JP',
> YAML.load_file("#{Rails.root}/lib/locale/ja-JP.yml")
>
> lib/locale/ja-JP.yml
> active_record:
> error:
> header_message: '{{object_name}}に{{count}}つのエラーが発
> 生しました。'
> message: 次の項目を確認してください。
> error_messages:
> inclusion: は一覧にありません。
> exclusion: は予約されています。
> invalid: は不正な値です。
> confirmation: は確認されませんでした。
> accepted: を受諾してください。
> empty: を入力してください。
> blank: を入力してください。
> too_long: is too long (maximum is {{count}} characters)
> too_short: is too short (minimum is {{count}} characters)
> wrong_length: is the wrong length (should be {{count}} characters)
> taken: はすでに存在します。
> not_a_number: は数値で入力してください。
> greater_than: must be greater than {{count}}
> greater_than_or_equal_to: must be greater than or equal to
> {{count}}
> equal_to: must be equal to {{count}}
> less_than: must be less than {{count}}
> less_than_or_equal_to: must be less than or equal to {{count}}
> odd: must be odd
> even: must be even
> human_attribute_names:
> user:
> name: なまえ
> user: 'ユーザー'
>
> EOF
>
> Finally, I'm sorry that I joined the I18n Google groups the last
> day, but not yet followed all of the discussions there.I'll try to
> catch them up as qwickly as I can.
> And, of course I promise that I'm willing to do any help and
> cooperation for the project if you need.
> Please ask me any question or problem or task around Japanese. I'll
> do my best :)
> Thank you.
>
> Akira
>
> --------------------
>
> Reply on GitHub: http://github.com/inbox/13655#reply

--
sven fuchs sven...@artweb-design.de
artweb design http://www.artweb-design.de
grünberger 65 + 49 (0) 30 - 47 98 69 96 (phone)
d-10245 berlin + 49 (0) 171 - 35 20 38 4 (mobile)

Jeremy Kemper

unread,
Jul 30, 2008, 4:17:30 PM7/30/08
to rails...@googlegroups.com
2008/7/30 Sven Fuchs <sven...@artweb-design.de>:

> Akira answered with a long message and told me about what's going on
> in Japan and how they are exited about our work. This is really
> awesome! It totally moved me to read about how much response to the
> new Rails I18n API there is in Japan, so I wanted to share that with
> the rest of this group.

Awesome! I'm happy to see the worldwide community getting behind this effort :)

Best,
jeremy

Joshua Harvey

unread,
Jul 30, 2008, 4:27:45 PM7/30/08
to rails...@googlegroups.com
Great letter! Welcome, Akira and the Japanese contingent :)

-- Josh

2008/7/30 Sven Fuchs <sven...@artweb-design.de>

Julian Tarkhanov

unread,
Aug 4, 2008, 6:58:55 AM8/4/08
to rails...@googlegroups.com

On 30 jul 2008, at 20:15, Sven Fuchs wrote:

>> returns binary output like this,
>> % ruby -ryaml -e 'puts "あ".to_yaml'
>> --- !binary |44GC


It doesn't return "binary" output, rather a base64-encoded byte form
of the Unicode string. This is something that has been on the Syck
todo list for years and years but _why never got to fixing it. So the
problem is that as soon as you try to _save_ a Unicode string into
YAML programmatically (as opposed to typing it) it becomes human-
unreadable (it will load fine when unserializing YAML).

So YAML is perfectly suitable for translations as long as you only and
exclusively edit it by hand.

Sven Fuchs

unread,
Aug 4, 2008, 2:39:38 PM8/4/08
to rails...@googlegroups.com
Cool. Thanks for the additional details, Julian!

Saimon Moore

unread,
Aug 5, 2008, 8:10:05 AM8/5/08
to rails...@googlegroups.com
Didn't see the beginning of this thread so I may be off track here but:

http://github.com/ptb/ya2yaml/tree/master

(just a quick interlude)
--
Saimon Moore
Freelance Web Developer
(Available for hire - For details visit http://saimonmoore.net)

Skype: saimonmoore
Yahoo IM: saimonmoore
Google IM: saimonmoore



Julian Tarkhanov

unread,
Aug 5, 2008, 8:44:45 AM8/5/08
to rails...@googlegroups.com

On 5 aug 2008, at 14:10, Saimon Moore wrote:
> Didn't see the beginning of this thread so I may be off track here
> but:
> http://github.com/ptb/ya2yaml/tree/master
> (just a quick interlude)

Nice. But might it be an idea to setup a small bounty for fixing Syck?
I'd chip in for one.

Reply all
Reply to author
Forward
0 new messages