arton edited this page Sep 13, 2010 · 3 revisions

Welcome to the nlize wiki!

NLize is Ruby extended library that changes the most error message into native language with Ruby-GetText.


NLize makes novice users become familiar to read Ruby’s error messages for understanding what causes the exception.

how to enable NLize

NLize starts conversion automaticaly. So you only put the line – require ‘nlize’ on top of the script, or simply add command line argument ‘-rnlize’ .


Currently NLize can only support i386. It replaces original vsnprintf function with its code to convert the format string. So it deeply depends on the native machine language.


c:\home\test>irb -rubygems
irb(main):001:0> require 'nlize'
=> true
irb(main):002:0> x
NameError: 'x'はmain:Objectの未定義のローカル変数かメソッドです
        from (irb):2
        from c:/PROGRA~2/ruby-1.8/lib/ruby/gems/1.8/specifications/gettext-1.92.
irb(main):003:0> Integer(3,2,1)
ArgumentError: 引数の数が不正です(3は1であるべきです)
        from (irb):3:in `Integer'
        from (irb):3
        from c:/PROGRA~2/ruby-1.8/lib/ruby/gems/1.8/specifications/gettext-1.92.

How to setup

If you would like to help me, please pull the repositry, then run Rake with ‘init_po’ task with LANG setting.

ie) rake init_po LANG=ja

Then, you can get po/-your-lang-/rubymsg.po file for translationg.
After you finish the translation, then again with rake, ‘rake make_mo LANG=??’, it creates mo file into data/locale/??/LC_MESSAGES/ .
Then you can install it with setup.rb or make Gem with ‘rake’ without task spcification.


If you can push your translation, I pull it in the master repositry.

Clone this wiki locally
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.