gettext 2.2.1 → 2.3.0
Sign up to get free protection for your applications and to get access to all the features.
- data/COPYING +2 -1
- data/README.rdoc +9 -9
- data/Rakefile +94 -149
- data/bin/rmsgfmt +23 -20
- data/bin/rmsginit +29 -0
- data/bin/rmsgmerge +22 -20
- data/bin/rxgettext +24 -0
- data/doc/text/news.md +60 -0
- data/gettext.gemspec +7 -4
- data/lib/gettext.rb +3 -3
- data/lib/gettext/core_ext/string.rb +2 -1
- data/lib/gettext/runtime/locale_path.rb +6 -4
- data/lib/gettext/runtime/textdomain.rb +14 -8
- data/lib/gettext/runtime/textdomain_manager.rb +3 -3
- data/lib/gettext/task.rb +203 -0
- data/lib/gettext/tools.rb +33 -24
- data/lib/gettext/tools/msgfmt.rb +104 -0
- data/lib/gettext/tools/msginit.rb +363 -0
- data/lib/gettext/tools/msgmerge.rb +510 -0
- data/lib/gettext/tools/parser/ruby.rb +12 -17
- data/lib/gettext/tools/pomessage.rb +37 -4
- data/lib/gettext/tools/poparser.rb +27 -24
- data/lib/gettext/tools/xgettext.rb +327 -0
- data/lib/gettext/version.rb +2 -2
- data/po/bg/rgettext.po +2 -2
- data/po/bs/rgettext.po +2 -2
- data/po/ca/rgettext.po +2 -2
- data/po/cs/rgettext.po +2 -2
- data/po/de/gettext.po +668 -0
- data/po/de/gettext.po.bak +589 -0
- data/po/de/rgettext.po +2 -2
- data/po/el/gettext.po +571 -0
- data/po/el/rgettext.po +2 -2
- data/po/eo/rgettext.po +2 -2
- data/po/es/rgettext.po +2 -2
- data/po/et/rgettext.po +2 -2
- data/po/fr/gettext.po +589 -0
- data/po/fr/rgettext.po +2 -2
- data/po/gettext.pot +638 -0
- data/po/gettext.pot~ +638 -0
- data/po/hr/rgettext.po +2 -2
- data/po/hu/rgettext.po +2 -2
- data/po/it/gettext.po +589 -0
- data/po/it/rgettext.po +2 -2
- data/po/ja/gettext.po +591 -0
- data/po/ja/rgettext.po +112 -69
- data/po/ko/rgettext.po +2 -2
- data/po/lv/rgettext.po +2 -2
- data/po/nb/rgettext.po +2 -2
- data/po/nl/rgettext.po +2 -2
- data/po/pt_BR/rgettext.po +2 -2
- data/po/ru/rgettext.po +2 -2
- data/po/sr/rgettext.po +2 -2
- data/po/sv/rgettext.po +2 -2
- data/po/uk/gettext.po +571 -0
- data/po/uk/rgettext.po +2 -2
- data/po/vi/rgettext.po +2 -2
- data/po/zh/rgettext.po +2 -2
- data/po/zh_TW/rgettext.po +2 -2
- data/samples/README +2 -4
- data/samples/cgi/README +1 -1
- data/samples/cgi/cookie.cgi +1 -1
- data/samples/cgi/gettext.css +1 -1
- data/samples/cgi/helloerb.rhtml +1 -1
- data/samples/cgi/hellolib.rb +1 -1
- data/samples/cgi/http.rb +2 -2
- data/samples/cgi/index.cgi +1 -1
- data/samples/cgi/locale/bg/LC_MESSAGES/helloerb1.mo +0 -0
- data/samples/cgi/locale/bg/LC_MESSAGES/helloerb2.mo +0 -0
- data/samples/cgi/locale/bg/LC_MESSAGES/main.mo +0 -0
- data/samples/cgi/locale/bs/LC_MESSAGES/helloerb1.mo +0 -0
- data/samples/cgi/locale/bs/LC_MESSAGES/helloerb2.mo +0 -0
- data/samples/cgi/locale/bs/LC_MESSAGES/main.mo +0 -0
- data/samples/cgi/locale/ca/LC_MESSAGES/helloerb1.mo +0 -0
- data/samples/cgi/locale/ca/LC_MESSAGES/helloerb2.mo +0 -0
- data/samples/cgi/locale/ca/LC_MESSAGES/main.mo +0 -0
- data/samples/cgi/locale/cs/LC_MESSAGES/helloerb1.mo +0 -0
- data/samples/cgi/locale/cs/LC_MESSAGES/helloerb2.mo +0 -0
- data/samples/cgi/locale/cs/LC_MESSAGES/main.mo +0 -0
- data/samples/cgi/locale/de/LC_MESSAGES/helloerb1.mo +0 -0
- data/samples/cgi/locale/de/LC_MESSAGES/helloerb2.mo +0 -0
- data/samples/cgi/locale/de/LC_MESSAGES/main.mo +0 -0
- data/samples/cgi/locale/el/LC_MESSAGES/helloerb1.mo +0 -0
- data/samples/cgi/locale/el/LC_MESSAGES/helloerb2.mo +0 -0
- data/samples/cgi/locale/el/LC_MESSAGES/main.mo +0 -0
- data/samples/cgi/locale/eo/LC_MESSAGES/helloerb1.mo +0 -0
- data/samples/cgi/locale/eo/LC_MESSAGES/helloerb2.mo +0 -0
- data/samples/cgi/locale/eo/LC_MESSAGES/main.mo +0 -0
- data/samples/cgi/locale/es/LC_MESSAGES/helloerb1.mo +0 -0
- data/samples/cgi/locale/es/LC_MESSAGES/helloerb2.mo +0 -0
- data/samples/cgi/locale/es/LC_MESSAGES/main.mo +0 -0
- data/samples/cgi/locale/fr/LC_MESSAGES/helloerb1.mo +0 -0
- data/samples/cgi/locale/fr/LC_MESSAGES/helloerb2.mo +0 -0
- data/samples/cgi/locale/fr/LC_MESSAGES/main.mo +0 -0
- data/samples/cgi/locale/hr/LC_MESSAGES/helloerb1.mo +0 -0
- data/samples/cgi/locale/hr/LC_MESSAGES/helloerb2.mo +0 -0
- data/samples/cgi/locale/hr/LC_MESSAGES/main.mo +0 -0
- data/samples/cgi/locale/hu/LC_MESSAGES/helloerb1.mo +0 -0
- data/samples/cgi/locale/hu/LC_MESSAGES/helloerb2.mo +0 -0
- data/samples/cgi/locale/hu/LC_MESSAGES/main.mo +0 -0
- data/samples/cgi/locale/it/LC_MESSAGES/helloerb1.mo +0 -0
- data/samples/cgi/locale/it/LC_MESSAGES/helloerb2.mo +0 -0
- data/samples/cgi/locale/it/LC_MESSAGES/main.mo +0 -0
- data/samples/cgi/locale/ja/LC_MESSAGES/helloerb1.mo +0 -0
- data/samples/cgi/locale/ja/LC_MESSAGES/helloerb2.mo +0 -0
- data/samples/cgi/locale/ja/LC_MESSAGES/main.mo +0 -0
- data/samples/cgi/locale/ko/LC_MESSAGES/helloerb1.mo +0 -0
- data/samples/cgi/locale/ko/LC_MESSAGES/helloerb2.mo +0 -0
- data/samples/cgi/locale/ko/LC_MESSAGES/main.mo +0 -0
- data/samples/cgi/locale/lv/LC_MESSAGES/helloerb1.mo +0 -0
- data/samples/cgi/locale/lv/LC_MESSAGES/helloerb2.mo +0 -0
- data/samples/cgi/locale/lv/LC_MESSAGES/main.mo +0 -0
- data/samples/cgi/locale/nb/LC_MESSAGES/helloerb1.mo +0 -0
- data/samples/cgi/locale/nb/LC_MESSAGES/helloerb2.mo +0 -0
- data/samples/cgi/locale/nb/LC_MESSAGES/main.mo +0 -0
- data/samples/cgi/locale/nl/LC_MESSAGES/helloerb1.mo +0 -0
- data/samples/cgi/locale/nl/LC_MESSAGES/helloerb2.mo +0 -0
- data/samples/cgi/locale/nl/LC_MESSAGES/main.mo +0 -0
- data/samples/cgi/locale/pt_BR/LC_MESSAGES/helloerb1.mo +0 -0
- data/samples/cgi/locale/pt_BR/LC_MESSAGES/helloerb2.mo +0 -0
- data/samples/cgi/locale/pt_BR/LC_MESSAGES/main.mo +0 -0
- data/samples/cgi/locale/ru/LC_MESSAGES/helloerb1.mo +0 -0
- data/samples/cgi/locale/ru/LC_MESSAGES/helloerb2.mo +0 -0
- data/samples/cgi/locale/ru/LC_MESSAGES/main.mo +0 -0
- data/samples/cgi/locale/sr/LC_MESSAGES/helloerb1.mo +0 -0
- data/samples/cgi/locale/sr/LC_MESSAGES/helloerb2.mo +0 -0
- data/samples/cgi/locale/sr/LC_MESSAGES/main.mo +0 -0
- data/samples/cgi/locale/uk/LC_MESSAGES/helloerb1.mo +0 -0
- data/samples/cgi/locale/uk/LC_MESSAGES/helloerb2.mo +0 -0
- data/samples/cgi/locale/uk/LC_MESSAGES/main.mo +0 -0
- data/samples/cgi/locale/vi/LC_MESSAGES/helloerb1.mo +0 -0
- data/samples/cgi/locale/vi/LC_MESSAGES/helloerb2.mo +0 -0
- data/samples/cgi/locale/vi/LC_MESSAGES/main.mo +0 -0
- data/samples/cgi/locale/zh/LC_MESSAGES/helloerb1.mo +0 -0
- data/samples/cgi/locale/zh/LC_MESSAGES/helloerb2.mo +0 -0
- data/samples/cgi/locale/zh/LC_MESSAGES/main.mo +0 -0
- data/samples/cgi/locale/zh_TW/LC_MESSAGES/helloerb1.mo +0 -0
- data/samples/cgi/locale/zh_TW/LC_MESSAGES/helloerb2.mo +0 -0
- data/samples/cgi/locale/zh_TW/LC_MESSAGES/main.mo +0 -0
- data/samples/cgi/other.rhtml +1 -1
- data/samples/cgi/po/bg/helloerb1.po +4 -4
- data/samples/cgi/po/bg/helloerb2.po +4 -4
- data/samples/cgi/po/bg/hellolib.po +2 -2
- data/samples/cgi/po/bg/main.po +4 -4
- data/samples/cgi/po/bs/helloerb1.po +3 -3
- data/samples/cgi/po/bs/helloerb2.po +3 -3
- data/samples/cgi/po/bs/hellolib.po +2 -2
- data/samples/cgi/po/bs/main.po +3 -3
- data/samples/cgi/po/ca/helloerb1.po +4 -4
- data/samples/cgi/po/ca/helloerb2.po +4 -4
- data/samples/cgi/po/ca/hellolib.po +2 -2
- data/samples/cgi/po/ca/main.po +4 -4
- data/samples/cgi/po/cs/helloerb1.po +4 -4
- data/samples/cgi/po/cs/helloerb2.po +4 -4
- data/samples/cgi/po/cs/hellolib.po +2 -2
- data/samples/cgi/po/cs/main.po +4 -4
- data/samples/cgi/po/de/helloerb1.po +3 -3
- data/samples/cgi/po/de/helloerb2.po +3 -3
- data/samples/cgi/po/de/hellolib.po +2 -2
- data/samples/cgi/po/de/main.po +3 -3
- data/samples/cgi/po/el/helloerb1.po +3 -3
- data/samples/cgi/po/el/helloerb2.po +3 -3
- data/samples/cgi/po/el/hellolib.po +2 -2
- data/samples/cgi/po/el/main.po +3 -3
- data/samples/cgi/po/eo/helloerb1.po +3 -3
- data/samples/cgi/po/eo/helloerb2.po +3 -3
- data/samples/cgi/po/eo/hellolib.po +2 -2
- data/samples/cgi/po/eo/main.po +3 -3
- data/samples/cgi/po/es/helloerb1.po +4 -4
- data/samples/cgi/po/es/helloerb2.po +4 -4
- data/samples/cgi/po/es/hellolib.po +2 -2
- data/samples/cgi/po/es/main.po +4 -4
- data/samples/cgi/po/fr/helloerb1.po +4 -4
- data/samples/cgi/po/fr/helloerb2.po +4 -4
- data/samples/cgi/po/fr/hellolib.po +2 -2
- data/samples/cgi/po/fr/main.po +4 -4
- data/samples/cgi/po/hr/helloerb1.po +3 -3
- data/samples/cgi/po/hr/helloerb2.po +3 -3
- data/samples/cgi/po/hr/hellolib.po +2 -2
- data/samples/cgi/po/hr/main.po +3 -3
- data/samples/cgi/po/hu/helloerb1.po +4 -4
- data/samples/cgi/po/hu/helloerb2.po +4 -4
- data/samples/cgi/po/hu/hellolib.po +2 -2
- data/samples/cgi/po/hu/main.po +4 -4
- data/samples/cgi/po/it/helloerb1.po +3 -3
- data/samples/cgi/po/it/helloerb2.po +3 -3
- data/samples/cgi/po/it/hellolib.po +2 -2
- data/samples/cgi/po/it/main.po +3 -3
- data/samples/cgi/po/ja/helloerb1.po +4 -4
- data/samples/cgi/po/ja/helloerb2.po +4 -4
- data/samples/cgi/po/ja/hellolib.po +2 -2
- data/samples/cgi/po/ja/main.po +3 -3
- data/samples/cgi/po/ko/helloerb1.po +3 -3
- data/samples/cgi/po/ko/helloerb2.po +3 -3
- data/samples/cgi/po/ko/hellolib.po +2 -2
- data/samples/cgi/po/ko/main.po +3 -3
- data/samples/cgi/po/lv/helloerb1.po +4 -4
- data/samples/cgi/po/lv/helloerb2.po +4 -4
- data/samples/cgi/po/lv/hellolib.po +2 -2
- data/samples/cgi/po/lv/main.po +4 -4
- data/samples/cgi/po/nb/helloerb1.po +3 -3
- data/samples/cgi/po/nb/helloerb2.po +3 -3
- data/samples/cgi/po/nb/hellolib.po +2 -2
- data/samples/cgi/po/nb/main.po +3 -3
- data/samples/cgi/po/nl/helloerb1.po +4 -4
- data/samples/cgi/po/nl/helloerb2.po +4 -4
- data/samples/cgi/po/nl/hellolib.po +2 -2
- data/samples/cgi/po/nl/main.po +4 -4
- data/samples/cgi/po/pt_BR/helloerb1.po +4 -4
- data/samples/cgi/po/pt_BR/helloerb2.po +4 -4
- data/samples/cgi/po/pt_BR/hellolib.po +2 -2
- data/samples/cgi/po/pt_BR/main.po +4 -4
- data/samples/cgi/po/ru/helloerb1.po +4 -4
- data/samples/cgi/po/ru/helloerb2.po +4 -4
- data/samples/cgi/po/ru/hellolib.po +2 -2
- data/samples/cgi/po/ru/main.po +4 -4
- data/samples/cgi/po/sr/helloerb1.po +4 -4
- data/samples/cgi/po/sr/helloerb2.po +4 -4
- data/samples/cgi/po/sr/hellolib.po +2 -2
- data/samples/cgi/po/sr/main.po +4 -4
- data/samples/cgi/po/uk/helloerb1.po +4 -4
- data/samples/cgi/po/uk/helloerb2.po +4 -4
- data/samples/cgi/po/uk/hellolib.po +2 -2
- data/samples/cgi/po/uk/main.po +4 -4
- data/samples/cgi/po/vi/helloerb1.po +3 -3
- data/samples/cgi/po/vi/helloerb2.po +3 -3
- data/samples/cgi/po/vi/hellolib.po +2 -2
- data/samples/cgi/po/vi/main.po +3 -3
- data/samples/cgi/po/zh/helloerb1.po +4 -4
- data/samples/cgi/po/zh/helloerb2.po +4 -4
- data/samples/cgi/po/zh/hellolib.po +2 -2
- data/samples/cgi/po/zh/main.po +4 -4
- data/samples/cgi/po/zh_TW/helloerb1.po +4 -4
- data/samples/cgi/po/zh_TW/helloerb2.po +4 -4
- data/samples/cgi/po/zh_TW/hellolib.po +2 -2
- data/samples/cgi/po/zh_TW/main.po +4 -4
- data/samples/hello.rb +1 -1
- data/samples/hello2.rb +1 -1
- data/samples/hello_glade2.rb +1 -1
- data/samples/hello_gtk2.rb +2 -2
- data/samples/hello_noop.rb +1 -1
- data/samples/hello_plural.rb +1 -1
- data/samples/hello_tk.rb +1 -1
- data/samples/locale/bg/LC_MESSAGES/hello_gtk2.mo +0 -0
- data/samples/locale/bs/LC_MESSAGES/hello_gtk2.mo +0 -0
- data/samples/locale/ca/LC_MESSAGES/hello_gtk2.mo +0 -0
- data/samples/locale/cs/LC_MESSAGES/hello_gtk2.mo +0 -0
- data/samples/locale/de/LC_MESSAGES/hello_gtk2.mo +0 -0
- data/samples/locale/el/LC_MESSAGES/hello_gtk2.mo +0 -0
- data/samples/locale/eo/LC_MESSAGES/hello_gtk2.mo +0 -0
- data/samples/locale/es/LC_MESSAGES/hello_gtk2.mo +0 -0
- data/samples/locale/fr/LC_MESSAGES/hello_gtk2.mo +0 -0
- data/samples/locale/hr/LC_MESSAGES/hello_gtk2.mo +0 -0
- data/samples/locale/hu/LC_MESSAGES/hello_gtk2.mo +0 -0
- data/samples/locale/it/LC_MESSAGES/hello_gtk2.mo +0 -0
- data/samples/locale/ja/LC_MESSAGES/hello_gtk2.mo +0 -0
- data/samples/locale/ko/LC_MESSAGES/hello_gtk2.mo +0 -0
- data/samples/locale/lv/LC_MESSAGES/hello_gtk2.mo +0 -0
- data/samples/locale/nb/LC_MESSAGES/hello_gtk2.mo +0 -0
- data/samples/locale/nl/LC_MESSAGES/hello_gtk2.mo +0 -0
- data/samples/locale/pt_BR/LC_MESSAGES/hello_gtk2.mo +0 -0
- data/samples/locale/ru/LC_MESSAGES/hello_gtk2.mo +0 -0
- data/samples/locale/sr/LC_MESSAGES/hello_gtk2.mo +0 -0
- data/samples/locale/sv/LC_MESSAGES/hello_gtk2.mo +0 -0
- data/samples/locale/uk/LC_MESSAGES/hello_gtk2.mo +0 -0
- data/samples/locale/vi/LC_MESSAGES/hello_gtk2.mo +0 -0
- data/samples/locale/zh/LC_MESSAGES/hello_gtk2.mo +0 -0
- data/samples/locale/zh_TW/LC_MESSAGES/hello_gtk2.mo +0 -0
- data/samples/po/bg/hello.po +2 -2
- data/samples/po/bg/hello2.po +1 -1
- data/samples/po/bg/hello_glade2.po +1 -1
- data/samples/po/bg/{hello_gtk.po → hello_gtk2.po} +1 -1
- data/samples/po/bg/hello_noop.po +1 -1
- data/samples/po/bg/hello_plural.po +1 -1
- data/samples/po/bg/hello_tk.po +1 -1
- data/samples/po/bs/hello.po +2 -2
- data/samples/po/bs/hello2.po +1 -1
- data/samples/po/bs/hello_glade2.po +1 -1
- data/samples/po/bs/{hello_gtk.po → hello_gtk2.po} +1 -1
- data/samples/po/bs/hello_noop.po +1 -1
- data/samples/po/bs/hello_plural.po +1 -1
- data/samples/po/bs/hello_tk.po +1 -1
- data/samples/po/ca/hello.po +2 -2
- data/samples/po/ca/hello2.po +1 -1
- data/samples/po/ca/hello_glade2.po +1 -1
- data/samples/po/ca/{hello_gtk.po → hello_gtk2.po} +1 -1
- data/samples/po/ca/hello_noop.po +1 -1
- data/samples/po/ca/hello_plural.po +1 -1
- data/samples/po/ca/hello_tk.po +1 -1
- data/samples/po/cs/hello.po +1 -1
- data/samples/po/cs/hello_glade2.po +1 -1
- data/samples/po/cs/{hello_gtk.po → hello_gtk2.po} +0 -0
- data/samples/po/cs/hello_plural.po +1 -1
- data/samples/po/de/hello.po +1 -1
- data/samples/po/de/{hello_gtk.po → hello_gtk2.po} +0 -0
- data/samples/po/de/hello_plural.po +1 -1
- data/samples/po/el/hello.po +2 -2
- data/samples/po/el/hello2.po +1 -1
- data/samples/po/el/hello_glade2.po +1 -1
- data/samples/po/el/{hello_gtk.po → hello_gtk2.po} +1 -1
- data/samples/po/el/hello_noop.po +1 -1
- data/samples/po/el/hello_plural.po +1 -1
- data/samples/po/el/hello_tk.po +1 -1
- data/samples/po/eo/hello.po +2 -2
- data/samples/po/eo/hello2.po +1 -1
- data/samples/po/eo/hello_glade2.po +1 -1
- data/samples/po/eo/{hello_gtk.po → hello_gtk2.po} +1 -1
- data/samples/po/eo/hello_noop.po +1 -1
- data/samples/po/eo/hello_plural.po +1 -1
- data/samples/po/eo/hello_tk.po +1 -1
- data/samples/po/es/{hello_gtk.po → hello_gtk2.po} +0 -0
- data/samples/po/fr/{hello_gtk.po → hello_gtk2.po} +0 -0
- data/samples/po/hello.pot +13 -13
- data/samples/po/hello2.pot +17 -17
- data/samples/po/hello_glade2.pot +12 -13
- data/{test/pot/backslash.pot → samples/po/hello_gtk2.pot} +8 -6
- data/samples/po/hello_noop.pot +13 -13
- data/samples/po/hello_plural.pot +14 -15
- data/samples/po/hello_tk.pot +9 -10
- data/samples/po/hr/hello.po +2 -2
- data/samples/po/hr/hello2.po +1 -1
- data/samples/po/hr/hello_glade2.po +1 -1
- data/samples/po/hr/{hello_gtk.po → hello_gtk2.po} +1 -1
- data/samples/po/hr/hello_noop.po +1 -1
- data/samples/po/hr/hello_plural.po +1 -1
- data/samples/po/hr/hello_tk.po +1 -1
- data/samples/po/hu/hello.po +2 -2
- data/samples/po/hu/hello2.po +1 -1
- data/samples/po/hu/hello_glade2.po +1 -1
- data/samples/po/hu/{hello_gtk.po → hello_gtk2.po} +1 -1
- data/samples/po/hu/hello_noop.po +1 -1
- data/samples/po/hu/hello_plural.po +1 -1
- data/samples/po/hu/hello_tk.po +1 -1
- data/samples/po/it/hello.po +1 -1
- data/samples/po/it/{hello_gtk.po → hello_gtk2.po} +0 -0
- data/samples/po/ja/{hello_gtk.po → hello_gtk2.po} +0 -0
- data/samples/po/ko/{hello_gtk.po → hello_gtk2.po} +0 -0
- data/samples/po/ko/hello_plural.po +1 -1
- data/samples/po/lv/hello.po +2 -2
- data/samples/po/lv/hello2.po +1 -1
- data/samples/po/lv/hello_glade2.po +1 -1
- data/samples/po/lv/{hello_gtk.po → hello_gtk2.po} +1 -1
- data/samples/po/lv/hello_noop.po +1 -1
- data/samples/po/lv/hello_plural.po +1 -1
- data/samples/po/lv/hello_tk.po +1 -1
- data/samples/po/nb/hello.po +2 -2
- data/samples/po/nb/hello2.po +1 -1
- data/samples/po/nb/hello_glade2.po +1 -1
- data/samples/po/nb/{hello_gtk.po → hello_gtk2.po} +1 -1
- data/samples/po/nb/hello_noop.po +1 -1
- data/samples/po/nb/hello_plural.po +1 -1
- data/samples/po/nb/hello_tk.po +1 -1
- data/samples/po/nl/hello.po +2 -2
- data/samples/po/nl/hello2.po +1 -1
- data/samples/po/nl/hello_glade2.po +1 -1
- data/samples/po/nl/{hello_gtk.po → hello_gtk2.po} +1 -1
- data/samples/po/nl/hello_noop.po +1 -1
- data/samples/po/nl/hello_plural.po +1 -1
- data/samples/po/nl/hello_tk.po +1 -1
- data/samples/po/pt_BR/{hello_gtk.po → hello_gtk2.po} +0 -0
- data/samples/po/ru/hello.po +2 -2
- data/samples/po/ru/hello2.po +1 -1
- data/samples/po/ru/hello_glade2.po +1 -1
- data/samples/po/ru/{hello_gtk.po → hello_gtk2.po} +1 -1
- data/samples/po/ru/hello_noop.po +1 -1
- data/samples/po/ru/hello_plural.po +1 -1
- data/samples/po/ru/hello_tk.po +1 -1
- data/samples/po/sr/hello.po +2 -2
- data/samples/po/sr/hello2.po +1 -1
- data/samples/po/sr/hello_glade2.po +1 -1
- data/samples/po/sr/{hello_gtk.po → hello_gtk2.po} +1 -1
- data/samples/po/sr/hello_noop.po +1 -1
- data/samples/po/sr/hello_plural.po +1 -1
- data/samples/po/sr/hello_tk.po +1 -1
- data/samples/po/sv/{hello_gtk.po → hello_gtk2.po} +0 -0
- data/samples/po/uk/hello.po +2 -2
- data/samples/po/uk/hello2.po +1 -1
- data/samples/po/uk/hello_glade2.po +1 -1
- data/samples/po/uk/{hello_gtk.po → hello_gtk2.po} +1 -1
- data/samples/po/uk/hello_noop.po +1 -1
- data/samples/po/uk/hello_plural.po +1 -1
- data/samples/po/uk/hello_tk.po +1 -1
- data/samples/po/vi/hello.po +2 -2
- data/samples/po/vi/hello2.po +1 -1
- data/samples/po/vi/hello_glade2.po +1 -1
- data/samples/po/vi/{hello_gtk.po → hello_gtk2.po} +1 -1
- data/samples/po/vi/hello_noop.po +1 -1
- data/samples/po/vi/hello_plural.po +1 -1
- data/samples/po/vi/hello_tk.po +1 -1
- data/samples/po/zh/hello.po +2 -2
- data/samples/po/zh/hello2.po +1 -1
- data/samples/po/zh/hello_glade2.po +1 -1
- data/samples/po/zh/{hello_gtk.po → hello_gtk2.po} +1 -1
- data/samples/po/zh/hello_noop.po +1 -1
- data/samples/po/zh/hello_plural.po +1 -1
- data/samples/po/zh/hello_tk.po +1 -1
- data/samples/po/zh_TW/hello.po +2 -2
- data/samples/po/zh_TW/hello2.po +1 -1
- data/samples/po/zh_TW/hello_glade2.po +1 -1
- data/samples/po/zh_TW/{hello_gtk.po → hello_gtk2.po} +1 -1
- data/samples/po/zh_TW/hello_noop.po +1 -1
- data/samples/po/zh_TW/hello_plural.po +1 -1
- data/samples/po/zh_TW/hello_tk.po +1 -1
- data/src/poparser.ry +18 -14
- data/test/{testlib → fixtures}/N_.rb +0 -0
- data/test/{testlib/gettext.rb → fixtures/_.rb} +27 -1
- data/test/fixtures/_/one_line.rb +32 -0
- data/test/fixtures/backslash.rb +29 -0
- data/test/{testlib → fixtures}/erb.rhtml +0 -0
- data/test/{testlib → fixtures}/erb.rxml +0 -0
- data/test/{testlib → fixtures}/gladeparser.glade +0 -0
- data/test/{testlib → fixtures}/multi_textdomain.rb +0 -0
- data/test/{testlib/ngettext.rb → fixtures/n_.rb} +20 -1
- data/test/{testlib → fixtures}/non_ascii.rb +0 -0
- data/test/fixtures/np_.rb +51 -0
- data/test/{testlib/nsgettext.rb → fixtures/ns_.rb} +20 -2
- data/test/fixtures/ns_/custom.rb +32 -0
- data/test/fixtures/p_.rb +57 -0
- data/test/fixtures/s_.rb +66 -0
- data/test/fixtures/s_/custom.rb +32 -0
- data/test/{testlib → fixtures}/simple.rb +0 -0
- data/test/gettext-test-utils.rb +44 -0
- data/test/locale/ja/LC_MESSAGES/_.mo +0 -0
- data/test/locale/ja/LC_MESSAGES/backslash.mo +0 -0
- data/test/locale/ja/LC_MESSAGES/np_.mo +0 -0
- data/test/locale/ja/LC_MESSAGES/ns_.mo +0 -0
- data/test/locale/ja/LC_MESSAGES/p_.mo +0 -0
- data/test/locale/ja/LC_MESSAGES/s_.mo +0 -0
- data/test/parser/test_ruby.rb +121 -0
- data/test/po/_.pot +109 -0
- data/test/{pot/sgettext.pot → po/backslash.pot} +10 -4
- data/test/po/ja/_.po +114 -0
- data/test/po/ja/backslash.po +3 -3
- data/test/po/ja/non_ascii.po +1 -1
- data/test/po/ja/{npgettext.po → np_.po} +6 -6
- data/test/po/ja/{nsgettext.po → ns_.po} +16 -10
- data/test/po/ja/{pgettext.po → p_.po} +5 -5
- data/test/po/ja/{sgettext.po → s_.po} +0 -0
- data/test/{pot → po}/non_ascii.pot +7 -5
- data/test/{pot/npgettext.pot → po/np_.pot} +10 -9
- data/test/{pot/nsgettext.pot → po/ns_.pot} +20 -12
- data/test/{pot/pgettext.pot → po/p_.pot} +12 -10
- data/test/po/s_.pot +55 -0
- data/test/run-test.rb +5 -0
- data/test/test_class_info.rb +0 -1
- data/test/test_gettext.rb +49 -12
- data/test/test_locale_path.rb +1 -4
- data/test/test_mofile.rb +0 -1
- data/test/test_parser.rb +119 -88
- data/test/test_po_generation.rb +32 -9
- data/test/{test_pomessage.rb → test_po_message.rb} +18 -1
- data/test/test_po_parser.rb +117 -0
- data/test/test_string.rb +0 -2
- data/test/test_textdomain_bind.rb +0 -2
- data/test/test_textdomain_multi.rb +1 -2
- data/test/test_textdomain_toplevel.rb +0 -1
- data/test/test_thread.rb +0 -1
- data/test/tools/test_msginit.rb +351 -0
- data/test/tools/test_msgmerge.rb +202 -0
- data/test/tools/test_tools.rb +0 -2
- data/test/tools/test_xgettext.rb +154 -0
- metadata +822 -753
- data/bin/rgettext +0 -23
- data/data/locale/bg/LC_MESSAGES/rgettext.mo +0 -0
- data/data/locale/bs/LC_MESSAGES/rgettext.mo +0 -0
- data/data/locale/ca/LC_MESSAGES/rgettext.mo +0 -0
- data/data/locale/cs/LC_MESSAGES/rgettext.mo +0 -0
- data/data/locale/de/LC_MESSAGES/rgettext.mo +0 -0
- data/data/locale/el/LC_MESSAGES/rgettext.mo +0 -0
- data/data/locale/eo/LC_MESSAGES/rgettext.mo +0 -0
- data/data/locale/es/LC_MESSAGES/rgettext.mo +0 -0
- data/data/locale/et/LC_MESSAGES/rgettext.mo +0 -0
- data/data/locale/fr/LC_MESSAGES/rgettext.mo +0 -0
- data/data/locale/hr/LC_MESSAGES/rgettext.mo +0 -0
- data/data/locale/hu/LC_MESSAGES/rgettext.mo +0 -0
- data/data/locale/it/LC_MESSAGES/rgettext.mo +0 -0
- data/data/locale/ja/LC_MESSAGES/rgettext.mo +0 -0
- data/data/locale/ko/LC_MESSAGES/rgettext.mo +0 -0
- data/data/locale/lv/LC_MESSAGES/rgettext.mo +0 -0
- data/data/locale/nb/LC_MESSAGES/rgettext.mo +0 -0
- data/data/locale/nl/LC_MESSAGES/rgettext.mo +0 -0
- data/data/locale/pt_BR/LC_MESSAGES/rgettext.mo +0 -0
- data/data/locale/ru/LC_MESSAGES/rgettext.mo +0 -0
- data/data/locale/sr/LC_MESSAGES/rgettext.mo +0 -0
- data/data/locale/sv/LC_MESSAGES/rgettext.mo +0 -0
- data/data/locale/uk/LC_MESSAGES/rgettext.mo +0 -0
- data/data/locale/vi/LC_MESSAGES/rgettext.mo +0 -0
- data/data/locale/zh/LC_MESSAGES/rgettext.mo +0 -0
- data/data/locale/zh_TW/LC_MESSAGES/rgettext.mo +0 -0
- data/lib/gettext/tools/rgettext.rb +0 -251
- data/lib/gettext/tools/rmsgfmt.rb +0 -86
- data/lib/gettext/tools/rmsgmerge.rb +0 -500
- data/samples/makemo.rb +0 -6
- data/samples/po/hello_gtk.pot +0 -23
- data/samples/po/test.rb +0 -13
- data/test/testlib/backslash.rb +0 -12
- data/test/testlib/helper.rb +0 -13
- data/test/testlib/npgettext.rb +0 -33
- data/test/testlib/pgettext.rb +0 -38
- data/test/testlib/sgettext.rb +0 -48
data/COPYING
CHANGED
@@ -1,4 +1,5 @@
|
|
1
|
-
|
1
|
+
gettext is copyrighted free software. See README.rdoc for
|
2
|
+
authors.
|
2
3
|
You can redistribute it and/or modify it under either the terms of the GPL
|
3
4
|
version 2 (see the file GPL), or the conditions below:
|
4
5
|
|
data/README.rdoc
CHANGED
@@ -1,8 +1,12 @@
|
|
1
|
-
= gettext - Ruby
|
1
|
+
= gettext - gettext for Ruby
|
2
2
|
|
3
|
-
|
3
|
+
Gettext gem is a pure Ruby Localization(L10n) library and tool
|
4
4
|
which is modeled after the GNU gettext package.
|
5
5
|
|
6
|
+
This library was called as "Ruby-GetText-Package". Since 2.3.0, this
|
7
|
+
library is called just "gettext". You can call this library as
|
8
|
+
"gettext gem" or "Ruby gettext" to distinguish from GNU gettext.
|
9
|
+
|
6
10
|
This library translates original messages to localized
|
7
11
|
messages using client-side locale information(environment
|
8
12
|
variable or CGI variable).
|
@@ -25,7 +29,7 @@ Rails / ActiveRecord specific code now lives in locale_rails[http://github.com/m
|
|
25
29
|
returns translated messages of the current thread's locale.
|
26
30
|
|
27
31
|
* Tools to find message IDs
|
28
|
-
* Extract message IDs to po-files using
|
32
|
+
* Extract message IDs to po-files using rxgettext from
|
29
33
|
* ruby scripts
|
30
34
|
* glade-2 XML file(.glade)
|
31
35
|
* ERB file(.rhtml, .erb)
|
@@ -35,7 +39,7 @@ Rails / ActiveRecord specific code now lives in locale_rails[http://github.com/m
|
|
35
39
|
* rmsgfmt creates a mo-file from a po-file.
|
36
40
|
The mo-file is compatible to GNU gettext(msgfmt).
|
37
41
|
|
38
|
-
* Using
|
42
|
+
* Using rxgettext/rmsgfmt as Rake tasks
|
39
43
|
|
40
44
|
* textdomain's scope is adapt to ruby class/module mechanism.
|
41
45
|
* A class/module can have plural textdomains.
|
@@ -154,14 +158,10 @@ LGPL(Lesser General Public License: http://www.gnu.org/licenses/lgpl-3.0.txt).
|
|
154
158
|
* Copyright (C) 2001-2009 Masao Mutoh <mutoh at highwhay.ne.jp>
|
155
159
|
* Copyright (C) 2001,2002 Masahiro Sakai <s01397ms at sfc.keio.ac.jp>
|
156
160
|
|
157
|
-
*
|
161
|
+
* rxgettext
|
158
162
|
* Copyright (C) 2001-2009 Masao Mutoh <mutoh at highwhay.ne.jp>
|
159
163
|
* Copyright (C) 2001,2002 Yasushi Shoji <yashi at atmark-techno.com>
|
160
164
|
|
161
|
-
* setup.rb
|
162
|
-
* Copyright (C) 2000-2005 Minero Aoki <aamine at loveruby.net>
|
163
|
-
* This file is released under LGPL. See the top of the install.rb.
|
164
|
-
|
165
165
|
* Others
|
166
166
|
* Copyright (C) 2001-2009 Masao Mutoh <mutoh at highwhay.ne.jp>
|
167
167
|
|
data/Rakefile
CHANGED
@@ -1,35 +1,41 @@
|
|
1
1
|
# -*- ruby -*-
|
2
2
|
#
|
3
|
-
# Rakefile for
|
3
|
+
# Rakefile for gettext
|
4
4
|
#
|
5
|
-
# This file maintains
|
5
|
+
# This file maintains gettext.
|
6
6
|
#
|
7
7
|
# Use setup.rb or gem for installation.
|
8
8
|
# You don't need to use this file directly.
|
9
9
|
#
|
10
10
|
# Copyright(c) 2005-2009 Masao Mutoh
|
11
11
|
# Copyright(c) 2012 Kouhei Sutou <kou@clear-code.com>
|
12
|
+
# Copyright(c) 2012 Haruka Yoshihara <yoshihara@clear-code.com>
|
12
13
|
# This program is licenced under the same licence as Ruby.
|
13
|
-
#
|
14
14
|
|
15
|
-
|
15
|
+
base_dir = File.expand_path(File.dirname(__FILE__))
|
16
|
+
$LOAD_PATH.unshift(File.join(base_dir, 'lib'))
|
16
17
|
|
17
18
|
require "tempfile"
|
18
|
-
require
|
19
|
-
require
|
20
|
-
require "yard
|
21
|
-
require
|
22
|
-
|
19
|
+
require "rake"
|
20
|
+
require "rubygems"
|
21
|
+
require "yard"
|
22
|
+
require "gettext/version"
|
23
|
+
require "gettext/tools"
|
24
|
+
require "gettext/task"
|
23
25
|
require "bundler/gem_helper"
|
26
|
+
|
24
27
|
class Bundler::GemHelper
|
25
28
|
undef_method :version_tag
|
26
29
|
def version_tag
|
27
30
|
version
|
28
31
|
end
|
29
32
|
end
|
30
|
-
Bundler::GemHelper.install_tasks
|
31
33
|
|
32
|
-
|
34
|
+
helper = Bundler::GemHelper.new(base_dir)
|
35
|
+
helper.install
|
36
|
+
spec = helper.gemspec
|
37
|
+
|
38
|
+
task :default => :test
|
33
39
|
|
34
40
|
############################################################
|
35
41
|
# GetText tasks for developing
|
@@ -65,159 +71,98 @@ EOH
|
|
65
71
|
$stderr.puts "Create #{poparser_rb_path}."
|
66
72
|
end
|
67
73
|
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
GetText.create_mofiles
|
73
|
-
|
74
|
-
$stderr.puts "Create samples mo files."
|
75
|
-
GetText.create_mofiles(
|
76
|
-
:po_root => "samples/po", :mo_root => "samples/locale")
|
77
|
-
|
78
|
-
$stderr.puts "Create samples/cgi mo files."
|
79
|
-
GetText.create_mofiles(
|
80
|
-
:po_root => "samples/cgi/po", :mo_root => "samples/cgi/locale")
|
81
|
-
|
82
|
-
$stderr.puts "Create test mo files."
|
83
|
-
GetText.create_mofiles(
|
84
|
-
:po_root => "test/po", :mo_root => "test/locale")
|
74
|
+
desc "Run all tests"
|
75
|
+
task :test => "test:prepare" do
|
76
|
+
options = ARGV - Rake.application.top_level_tasks
|
77
|
+
ruby "test/run-test.rb", *options
|
85
78
|
end
|
86
79
|
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
require 'gettext'
|
91
|
-
require 'gettext/tools/poparser'
|
92
|
-
require 'gettext/tools'
|
93
|
-
rescue LoadError
|
94
|
-
puts "gettext/tools/poparser was not found."
|
95
|
-
end
|
96
|
-
|
97
|
-
#lib/gettext/*.rb -> rgettext.po
|
98
|
-
GetText.update_pofiles("rgettext",
|
99
|
-
Dir.glob("lib/**/*.rb") + ["src/poparser.ry"],
|
100
|
-
"ruby-gettext #{GetText::VERSION}")
|
80
|
+
namespace :test do
|
81
|
+
desc "Prepare test environment"
|
82
|
+
task :prepare => ["test:gettext", "samples:gettext"]
|
101
83
|
end
|
102
84
|
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
unless /^(pofiles|test)/ =~ f
|
113
|
-
lang = /po\/([^\/]*)\/(.*.po)/.match(f).to_a[1]
|
114
|
-
mkdir_p "pofiles/#{lang}" unless FileTest.exist? "pofiles/#{lang}"
|
115
|
-
copy f, "pofiles/#{lang}/"
|
116
|
-
Dir.glob("pofiles/original/*.pot").each do |f|
|
117
|
-
newpo = "pofiles/#{lang}/#{File.basename(f, ".pot")}.po"
|
118
|
-
copy f, newpo unless FileTest.exist? newpo
|
119
|
-
end
|
120
|
-
end
|
85
|
+
GetText::Task.new(spec)
|
86
|
+
Dir.glob("samples/*.rb") do |target|
|
87
|
+
domain = File.basename(target, ".*")
|
88
|
+
GetText::Task.new(spec) do |task|
|
89
|
+
task.domain = domain
|
90
|
+
task.namespace_prefix = "samples:#{domain}"
|
91
|
+
task.po_base_directory = "samples/po"
|
92
|
+
task.mo_base_directory = "samples"
|
93
|
+
task.files = Dir.glob(target.gsub(/\..*\z/, ".*"))
|
121
94
|
end
|
95
|
+
task "samples:gettext" => "samples:#{domain}:gettext"
|
122
96
|
end
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
end
|
141
|
-
end
|
142
|
-
sh "cvs add #{cvs_add_targets}" if cvs_add_targets.size > 0
|
97
|
+
desc "Update *.mo for samples"
|
98
|
+
task "samples:gettext"
|
99
|
+
|
100
|
+
[
|
101
|
+
["main", Dir.glob("samples/cgi/{index.cgi,cookie.cgi}")],
|
102
|
+
["helloerb1", Dir.glob("samples/cgi/helloerb1.cgi")],
|
103
|
+
["helloerb2", Dir.glob("samples/cgi/helloerb2.cgi")],
|
104
|
+
["hellolib", Dir.glob("samples/cgi/hellolib.rb")],
|
105
|
+
].each do |domain, files|
|
106
|
+
GetText::Task.new(spec) do |task|
|
107
|
+
task.domain = domain
|
108
|
+
task.namespace_prefix = "samples:cgi:#{domain}"
|
109
|
+
task.po_base_directory = "samples/cgi/po"
|
110
|
+
task.mo_base_directory = "samples/cgi"
|
111
|
+
task.files = files
|
112
|
+
end
|
113
|
+
task "samples:cgi:gettext" => "samples:cgi:#{domain}:gettext"
|
143
114
|
end
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
115
|
+
desc "Updates *.mo for CGI samples"
|
116
|
+
task "samples:cgi:gettext"
|
117
|
+
|
118
|
+
task "samples:gettext" => "samples:cgi:gettext"
|
119
|
+
|
120
|
+
["backslash", "non_ascii", "np_", "p_"].each do |domain|
|
121
|
+
GetText::Task.new(spec) do |task|
|
122
|
+
task.domain = domain
|
123
|
+
task.namespace_prefix = "test:#{domain}"
|
124
|
+
task.po_base_directory = "test/po"
|
125
|
+
task.mo_base_directory = "test"
|
126
|
+
task.files = ["test/fixtures/#{domain}.rb"]
|
127
|
+
task.locales = ["ja"]
|
128
|
+
end
|
129
|
+
task "test:gettext" => "test:#{domain}:gettext"
|
158
130
|
end
|
159
131
|
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
ruby_base_paths = [
|
170
|
-
"non_ascii", "npgettext", "nsgettext",
|
171
|
-
"pgettext", "backslash",
|
172
|
-
]
|
173
|
-
ruby_paths = Dir.glob("test/testlib/{#{ruby_base_paths.join(',')}}.rb")
|
174
|
-
ruby_paths.each do |ruby_path|
|
175
|
-
pot_base_path = File.basename(ruby_path).sub(/\.rb\z/, ".pot")
|
176
|
-
pot_path = "#{pot_base_dir}/#{pot_base_path}"
|
177
|
-
pot_paths << pot_path
|
178
|
-
file pot_path => [pot_base_dir, ruby_path] do
|
179
|
-
require "gettext/tools"
|
180
|
-
GetText.rgettext(ruby_path, pot_path)
|
181
|
-
end
|
182
|
-
end
|
183
|
-
|
184
|
-
desc "Update pot files for testing"
|
185
|
-
task :update => pot_paths
|
132
|
+
["_", "s_", "ns_"].each do |domain|
|
133
|
+
GetText::Task.new(spec) do |task|
|
134
|
+
task.domain = domain
|
135
|
+
task.namespace_prefix = "test:#{domain}"
|
136
|
+
task.po_base_directory = "test/po"
|
137
|
+
task.mo_base_directory = "test"
|
138
|
+
task.files = ["test/fixtures/#{domain}.rb"]
|
139
|
+
task.files += Dir.glob("test/fixtures/#{domain}/*.rb")
|
140
|
+
task.locales = ["ja"]
|
186
141
|
end
|
142
|
+
task "test:gettext" => "test:#{domain}:gettext"
|
143
|
+
end
|
187
144
|
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
GetText.rmsgfmt(po_path, mo_path)
|
201
|
-
end
|
202
|
-
end
|
145
|
+
po_only_domains = [
|
146
|
+
"plural", "plural_error", "rubyparser", "test1", "test2", "test3"
|
147
|
+
]
|
148
|
+
po_only_domains.each do |domain|
|
149
|
+
GetText::Task.new(spec) do |task|
|
150
|
+
task.domain = domain
|
151
|
+
task.namespace_prefix = "test:#{domain}"
|
152
|
+
task.po_base_directory = "test/po"
|
153
|
+
task.mo_base_directory = "test"
|
154
|
+
task.files = []
|
155
|
+
task.locales = Dir.glob("test/po/*/#{domain}.po").collect do |po|
|
156
|
+
File.basename(File.dirname(po))
|
203
157
|
end
|
204
|
-
|
205
|
-
desc "Update mo files for testing"
|
206
|
-
task :update => mo_paths
|
207
158
|
end
|
208
|
-
|
209
|
-
desc "Prepare test environment"
|
210
|
-
task :prepare => "test:mo:update"
|
159
|
+
task "test:gettext" => "test:#{domain}:gettext"
|
211
160
|
end
|
161
|
+
desc "Update *.mo for test"
|
162
|
+
task "test:gettext"
|
212
163
|
|
213
|
-
|
214
|
-
task :
|
215
|
-
options = ARGV - Rake.application.top_level_tasks
|
216
|
-
ruby "test/run-test.rb", *options
|
217
|
-
end
|
164
|
+
|
165
|
+
task :package => [:gettext]
|
218
166
|
|
219
167
|
YARD::Rake::YardocTask.new do |t|
|
220
168
|
end
|
221
|
-
|
222
|
-
desc "Setup Ruby-GetText-Package. (for setup.rb)"
|
223
|
-
task :setup => [:makemo]
|
data/bin/rmsgfmt
CHANGED
@@ -1,22 +1,25 @@
|
|
1
|
-
#! /usr/bin/ruby
|
2
|
-
|
3
|
-
|
1
|
+
#! /usr/bin/env ruby
|
2
|
+
# -*- coding: utf-8 -*-
|
3
|
+
#
|
4
|
+
# Copyright (C) 2012 Kouhei Sutou <kou@clear-code.com>
|
5
|
+
# Copyright (C) 2012 Haruka Yoshihara <yoshihara@clear-code.com>
|
6
|
+
# Copyright (C) 2005-2009 Masao Mutoh
|
7
|
+
#
|
8
|
+
# License: Ruby's or LGPL
|
9
|
+
#
|
10
|
+
# This library is free software: you can redistribute it and/or modify
|
11
|
+
# it under the terms of the GNU Lesser General Public License as published by
|
12
|
+
# the Free Software Foundation, either version 3 of the License, or
|
13
|
+
# (at your option) any later version.
|
14
|
+
#
|
15
|
+
# This library is distributed in the hope that it will be useful,
|
16
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
17
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
18
|
+
# GNU Lesser General Public License for more details.
|
19
|
+
#
|
20
|
+
# You should have received a copy of the GNU Lesser General Public License
|
21
|
+
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
4
22
|
|
5
|
-
|
6
|
-
|
7
|
-
You may redistribute it and/or modify it under the same
|
8
|
-
license terms as Ruby.
|
9
|
-
=end
|
23
|
+
require "gettext/tools/msgfmt"
|
10
24
|
|
11
|
-
|
12
|
-
require 'gettext/tools/rmsgfmt'
|
13
|
-
rescue LoadError
|
14
|
-
begin
|
15
|
-
require 'rubygems'
|
16
|
-
require 'gettext/tools/rmsgfmt'
|
17
|
-
rescue LoadError
|
18
|
-
raise 'Ruby-GetText-Package are not installed.'
|
19
|
-
end
|
20
|
-
end
|
21
|
-
|
22
|
-
GetText.rmsgfmt
|
25
|
+
GetText::Tools::MsgFmt.run(*ARGV)
|
data/bin/rmsginit
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
#! /usr/bin/env ruby
|
2
|
+
# -*- coding: utf-8 -*-
|
3
|
+
#
|
4
|
+
# Copyright (C) 2012 Kouhei Sutou <kou@clear-code.com>
|
5
|
+
# Copyright (C) 2012 Haruka Yoshihara <yoshihara@clear-code.com>
|
6
|
+
#
|
7
|
+
# License: Ruby's or LGPL
|
8
|
+
#
|
9
|
+
# This library is free software: you can redistribute it and/or modify
|
10
|
+
# it under the terms of the GNU Lesser General Public License as published by
|
11
|
+
# the Free Software Foundation, either version 3 of the License, or
|
12
|
+
# (at your option) any later version.
|
13
|
+
#
|
14
|
+
# This library is distributed in the hope that it will be useful,
|
15
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
16
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
17
|
+
# GNU Lesser General Public License for more details.
|
18
|
+
#
|
19
|
+
# You should have received a copy of the GNU Lesser General Public License
|
20
|
+
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
21
|
+
|
22
|
+
require "gettext/tools/msginit"
|
23
|
+
|
24
|
+
begin
|
25
|
+
GetText::Tools::MsgInit.run(*ARGV)
|
26
|
+
rescue GetText::Tools::MsgInit::Error
|
27
|
+
puts($!.message)
|
28
|
+
exit(false)
|
29
|
+
end
|
data/bin/rmsgmerge
CHANGED
@@ -1,22 +1,24 @@
|
|
1
|
-
#! /usr/bin/ruby
|
2
|
-
|
3
|
-
|
1
|
+
#! /usr/bin/env ruby
|
2
|
+
# -*- coding: utf-8 -*-
|
3
|
+
#
|
4
|
+
# Copyright (C) 2012 Kouhei Sutou <kou@clear-code.com>
|
5
|
+
# Copyright (C) 2005-2009 Masao Mutoh
|
6
|
+
#
|
7
|
+
# License: Ruby's or LGPL
|
8
|
+
#
|
9
|
+
# This library is free software: you can redistribute it and/or modify
|
10
|
+
# it under the terms of the GNU Lesser General Public License as published by
|
11
|
+
# the Free Software Foundation, either version 3 of the License, or
|
12
|
+
# (at your option) any later version.
|
13
|
+
#
|
14
|
+
# This library is distributed in the hope that it will be useful,
|
15
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
16
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
17
|
+
# GNU Lesser General Public License for more details.
|
18
|
+
#
|
19
|
+
# You should have received a copy of the GNU Lesser General Public License
|
20
|
+
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
4
21
|
|
5
|
-
|
6
|
-
|
7
|
-
You may redistribute it and/or modify it under the same
|
8
|
-
license terms as Ruby.
|
9
|
-
=end
|
22
|
+
require "gettext/tools/msgmerge"
|
10
23
|
|
11
|
-
|
12
|
-
require 'gettext/tools/rmsgmerge'
|
13
|
-
rescue LoadError
|
14
|
-
begin
|
15
|
-
require 'rubygems'
|
16
|
-
require 'gettext/tools/rmsgmerge'
|
17
|
-
rescue LoadError
|
18
|
-
raise 'Ruby-GetText-Package are not installed.'
|
19
|
-
end
|
20
|
-
end
|
21
|
-
|
22
|
-
GetText.rmsgmerge
|
24
|
+
GetText::Tools::MsgMerge.run(*ARGV)
|