-
Notifications
You must be signed in to change notification settings - Fork 1
Home
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.
h2.goal
NLize makes novice users become familiar to read Ruby’s error messages for understanding what causes the exception.
h2.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’ .
h2.restriction
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.
h2.example
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.
0.gemspec:11
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.
0.gemspec:11