gettext 3.0.0 → 3.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/Rakefile +23 -12
- data/doc/text/news.md +31 -0
- data/lib/gettext/po.rb +17 -7
- data/lib/gettext/po_entry.rb +212 -208
- data/lib/gettext/po_format.rb +28 -0
- data/lib/gettext/po_parser.rb +25 -25
- data/lib/gettext/text_domain.rb +10 -0
- data/lib/gettext/tools/msginit.rb +19 -1
- data/lib/gettext/tools/msgmerge.rb +122 -68
- data/lib/gettext/tools/task.rb +306 -87
- data/lib/gettext/tools/xgettext.rb +27 -1
- data/lib/gettext/version.rb +1 -1
- data/locale/bg/LC_MESSAGES/gettext.mo +0 -0
- data/locale/bs/LC_MESSAGES/gettext.mo +0 -0
- data/locale/ca/LC_MESSAGES/gettext.mo +0 -0
- data/locale/cs/LC_MESSAGES/gettext.mo +0 -0
- data/locale/de/LC_MESSAGES/gettext.mo +0 -0
- data/locale/el/LC_MESSAGES/gettext.mo +0 -0
- data/locale/eo/LC_MESSAGES/gettext.mo +0 -0
- data/locale/es/LC_MESSAGES/gettext.mo +0 -0
- data/locale/et/LC_MESSAGES/gettext.mo +0 -0
- data/locale/fr/LC_MESSAGES/gettext.mo +0 -0
- data/locale/hr/LC_MESSAGES/gettext.mo +0 -0
- data/locale/hu/LC_MESSAGES/gettext.mo +0 -0
- data/locale/it/LC_MESSAGES/gettext.mo +0 -0
- data/locale/ja/LC_MESSAGES/gettext.mo +0 -0
- data/locale/ko/LC_MESSAGES/gettext.mo +0 -0
- data/locale/lv/LC_MESSAGES/gettext.mo +0 -0
- data/locale/nb/LC_MESSAGES/gettext.mo +0 -0
- data/locale/nl/LC_MESSAGES/gettext.mo +0 -0
- data/locale/pt_BR/LC_MESSAGES/gettext.mo +0 -0
- data/locale/ru/LC_MESSAGES/gettext.mo +0 -0
- data/locale/sr/LC_MESSAGES/gettext.mo +0 -0
- data/locale/sv/LC_MESSAGES/gettext.mo +0 -0
- data/locale/uk/LC_MESSAGES/gettext.mo +0 -0
- data/locale/vi/LC_MESSAGES/gettext.mo +0 -0
- data/locale/zh/LC_MESSAGES/gettext.mo +0 -0
- data/locale/zh_TW/LC_MESSAGES/gettext.mo +0 -0
- data/po/bg/gettext.po +370 -284
- data/po/bs/gettext.po +378 -321
- data/po/ca/gettext.po +373 -284
- data/po/cs/gettext.po +371 -313
- data/po/de/gettext.po +380 -282
- data/po/el/gettext.po +377 -277
- data/po/eo/gettext.po +373 -275
- data/po/es/gettext.po +376 -277
- data/po/et/gettext.po +374 -274
- data/po/fr/gettext.po +380 -279
- data/po/gettext.pot +102 -70
- data/po/hr/gettext.po +371 -308
- data/po/hu/gettext.po +376 -276
- data/po/it/gettext.po +362 -269
- data/po/ja/gettext.po +338 -216
- data/po/ko/gettext.po +392 -266
- data/po/lv/gettext.po +377 -310
- data/po/nb/gettext.po +377 -278
- data/po/nl/gettext.po +371 -274
- data/po/pt_BR/gettext.po +376 -277
- data/po/ru/gettext.po +380 -311
- data/po/sr/gettext.po +378 -310
- data/po/sv/gettext.po +331 -258
- data/po/uk/gettext.po +380 -311
- data/po/vi/gettext.po +374 -275
- data/po/zh/gettext.po +397 -266
- data/po/zh_TW/gettext.po +397 -266
- data/samples/cgi/README +0 -2
- 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/hellolib.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/hellolib.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/hellolib.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/hellolib.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/hellolib.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/hellolib.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/hellolib.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/hellolib.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/hellolib.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/hellolib.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/hellolib.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/hellolib.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/hellolib.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/hellolib.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/hellolib.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/hellolib.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/hellolib.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/hellolib.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/hellolib.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/hellolib.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/hellolib.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/hellolib.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/hellolib.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/hellolib.mo +0 -0
- data/samples/cgi/locale/zh_TW/LC_MESSAGES/main.mo +0 -0
- data/samples/locale/bg/LC_MESSAGES/hello.mo +0 -0
- data/samples/locale/bg/LC_MESSAGES/hello2.mo +0 -0
- data/samples/locale/bg/LC_MESSAGES/hello_glade2.mo +0 -0
- data/samples/locale/bg/LC_MESSAGES/hello_gtk2.mo +0 -0
- data/samples/locale/bg/LC_MESSAGES/hello_gtk_builder.mo +0 -0
- data/samples/locale/bg/LC_MESSAGES/hello_noop.mo +0 -0
- data/samples/locale/bg/LC_MESSAGES/hello_plural.mo +0 -0
- data/samples/locale/bg/LC_MESSAGES/hello_tk.mo +0 -0
- data/samples/locale/bs/LC_MESSAGES/hello.mo +0 -0
- data/samples/locale/bs/LC_MESSAGES/hello2.mo +0 -0
- data/samples/locale/bs/LC_MESSAGES/hello_glade2.mo +0 -0
- data/samples/locale/bs/LC_MESSAGES/hello_gtk2.mo +0 -0
- data/samples/locale/bs/LC_MESSAGES/hello_gtk_builder.mo +0 -0
- data/samples/locale/bs/LC_MESSAGES/hello_noop.mo +0 -0
- data/samples/locale/bs/LC_MESSAGES/hello_plural.mo +0 -0
- data/samples/locale/bs/LC_MESSAGES/hello_tk.mo +0 -0
- data/samples/locale/ca/LC_MESSAGES/hello.mo +0 -0
- data/samples/locale/ca/LC_MESSAGES/hello2.mo +0 -0
- data/samples/locale/ca/LC_MESSAGES/hello_glade2.mo +0 -0
- data/samples/locale/ca/LC_MESSAGES/hello_gtk2.mo +0 -0
- data/samples/locale/ca/LC_MESSAGES/hello_gtk_builder.mo +0 -0
- data/samples/locale/ca/LC_MESSAGES/hello_noop.mo +0 -0
- data/samples/locale/ca/LC_MESSAGES/hello_plural.mo +0 -0
- data/samples/locale/ca/LC_MESSAGES/hello_tk.mo +0 -0
- data/samples/locale/cs/LC_MESSAGES/hello.mo +0 -0
- data/samples/locale/cs/LC_MESSAGES/hello2.mo +0 -0
- data/samples/locale/cs/LC_MESSAGES/hello_glade2.mo +0 -0
- data/samples/locale/cs/LC_MESSAGES/hello_gtk2.mo +0 -0
- data/samples/locale/cs/LC_MESSAGES/hello_gtk_builder.mo +0 -0
- data/samples/locale/cs/LC_MESSAGES/hello_noop.mo +0 -0
- data/samples/locale/cs/LC_MESSAGES/hello_plural.mo +0 -0
- data/samples/locale/cs/LC_MESSAGES/hello_tk.mo +0 -0
- data/samples/locale/de/LC_MESSAGES/hello.mo +0 -0
- data/samples/locale/de/LC_MESSAGES/hello2.mo +0 -0
- data/samples/locale/de/LC_MESSAGES/hello_glade2.mo +0 -0
- data/samples/locale/de/LC_MESSAGES/hello_gtk2.mo +0 -0
- data/samples/locale/de/LC_MESSAGES/hello_gtk_builder.mo +0 -0
- data/samples/locale/de/LC_MESSAGES/hello_noop.mo +0 -0
- data/samples/locale/de/LC_MESSAGES/hello_plural.mo +0 -0
- data/samples/locale/de/LC_MESSAGES/hello_tk.mo +0 -0
- data/samples/locale/el/LC_MESSAGES/hello.mo +0 -0
- data/samples/locale/el/LC_MESSAGES/hello2.mo +0 -0
- data/samples/locale/el/LC_MESSAGES/hello_glade2.mo +0 -0
- data/samples/locale/el/LC_MESSAGES/hello_gtk2.mo +0 -0
- data/samples/locale/el/LC_MESSAGES/hello_gtk_builder.mo +0 -0
- data/samples/locale/el/LC_MESSAGES/hello_noop.mo +0 -0
- data/samples/locale/el/LC_MESSAGES/hello_plural.mo +0 -0
- data/samples/locale/el/LC_MESSAGES/hello_tk.mo +0 -0
- data/samples/locale/eo/LC_MESSAGES/hello.mo +0 -0
- data/samples/locale/eo/LC_MESSAGES/hello2.mo +0 -0
- data/samples/locale/eo/LC_MESSAGES/hello_glade2.mo +0 -0
- data/samples/locale/eo/LC_MESSAGES/hello_gtk2.mo +0 -0
- data/samples/locale/eo/LC_MESSAGES/hello_gtk_builder.mo +0 -0
- data/samples/locale/eo/LC_MESSAGES/hello_noop.mo +0 -0
- data/samples/locale/eo/LC_MESSAGES/hello_plural.mo +0 -0
- data/samples/locale/eo/LC_MESSAGES/hello_tk.mo +0 -0
- data/samples/locale/es/LC_MESSAGES/hello.mo +0 -0
- data/samples/locale/es/LC_MESSAGES/hello2.mo +0 -0
- data/samples/locale/es/LC_MESSAGES/hello_glade2.mo +0 -0
- data/samples/locale/es/LC_MESSAGES/hello_gtk2.mo +0 -0
- data/samples/locale/es/LC_MESSAGES/hello_gtk_builder.mo +0 -0
- data/samples/locale/es/LC_MESSAGES/hello_noop.mo +0 -0
- data/samples/locale/es/LC_MESSAGES/hello_plural.mo +0 -0
- data/samples/locale/es/LC_MESSAGES/hello_tk.mo +0 -0
- data/samples/locale/fr/LC_MESSAGES/hello.mo +0 -0
- data/samples/locale/fr/LC_MESSAGES/hello2.mo +0 -0
- data/samples/locale/fr/LC_MESSAGES/hello_glade2.mo +0 -0
- data/samples/locale/fr/LC_MESSAGES/hello_gtk2.mo +0 -0
- data/samples/locale/fr/LC_MESSAGES/hello_gtk_builder.mo +0 -0
- data/samples/locale/fr/LC_MESSAGES/hello_noop.mo +0 -0
- data/samples/locale/fr/LC_MESSAGES/hello_plural.mo +0 -0
- data/samples/locale/fr/LC_MESSAGES/hello_tk.mo +0 -0
- data/samples/locale/hr/LC_MESSAGES/hello.mo +0 -0
- data/samples/locale/hr/LC_MESSAGES/hello2.mo +0 -0
- data/samples/locale/hr/LC_MESSAGES/hello_glade2.mo +0 -0
- data/samples/locale/hr/LC_MESSAGES/hello_gtk2.mo +0 -0
- data/samples/locale/hr/LC_MESSAGES/hello_gtk_builder.mo +0 -0
- data/samples/locale/hr/LC_MESSAGES/hello_noop.mo +0 -0
- data/samples/locale/hr/LC_MESSAGES/hello_plural.mo +0 -0
- data/samples/locale/hr/LC_MESSAGES/hello_tk.mo +0 -0
- data/samples/locale/hu/LC_MESSAGES/hello.mo +0 -0
- data/samples/locale/hu/LC_MESSAGES/hello2.mo +0 -0
- data/samples/locale/hu/LC_MESSAGES/hello_glade2.mo +0 -0
- data/samples/locale/hu/LC_MESSAGES/hello_gtk2.mo +0 -0
- data/samples/locale/hu/LC_MESSAGES/hello_gtk_builder.mo +0 -0
- data/samples/locale/hu/LC_MESSAGES/hello_noop.mo +0 -0
- data/samples/locale/hu/LC_MESSAGES/hello_plural.mo +0 -0
- data/samples/locale/hu/LC_MESSAGES/hello_tk.mo +0 -0
- data/samples/locale/it/LC_MESSAGES/hello.mo +0 -0
- data/samples/locale/it/LC_MESSAGES/hello2.mo +0 -0
- data/samples/locale/it/LC_MESSAGES/hello_glade2.mo +0 -0
- data/samples/locale/it/LC_MESSAGES/hello_gtk2.mo +0 -0
- data/samples/locale/it/LC_MESSAGES/hello_gtk_builder.mo +0 -0
- data/samples/locale/it/LC_MESSAGES/hello_noop.mo +0 -0
- data/samples/locale/it/LC_MESSAGES/hello_plural.mo +0 -0
- data/samples/locale/it/LC_MESSAGES/hello_tk.mo +0 -0
- data/samples/locale/ja/LC_MESSAGES/hello.mo +0 -0
- data/samples/locale/ja/LC_MESSAGES/hello2.mo +0 -0
- data/samples/locale/ja/LC_MESSAGES/hello_glade2.mo +0 -0
- data/samples/locale/ja/LC_MESSAGES/hello_gtk2.mo +0 -0
- data/samples/locale/ja/LC_MESSAGES/hello_gtk_builder.mo +0 -0
- data/samples/locale/ja/LC_MESSAGES/hello_noop.mo +0 -0
- data/samples/locale/ja/LC_MESSAGES/hello_plural.mo +0 -0
- data/samples/locale/ja/LC_MESSAGES/hello_tk.mo +0 -0
- data/samples/locale/ko/LC_MESSAGES/hello.mo +0 -0
- data/samples/locale/ko/LC_MESSAGES/hello2.mo +0 -0
- data/samples/locale/ko/LC_MESSAGES/hello_glade2.mo +0 -0
- data/samples/locale/ko/LC_MESSAGES/hello_gtk2.mo +0 -0
- data/samples/locale/ko/LC_MESSAGES/hello_gtk_builder.mo +0 -0
- data/samples/locale/ko/LC_MESSAGES/hello_noop.mo +0 -0
- data/samples/locale/ko/LC_MESSAGES/hello_plural.mo +0 -0
- data/samples/locale/ko/LC_MESSAGES/hello_tk.mo +0 -0
- data/samples/locale/lv/LC_MESSAGES/hello.mo +0 -0
- data/samples/locale/lv/LC_MESSAGES/hello2.mo +0 -0
- data/samples/locale/lv/LC_MESSAGES/hello_glade2.mo +0 -0
- data/samples/locale/lv/LC_MESSAGES/hello_gtk2.mo +0 -0
- data/samples/locale/lv/LC_MESSAGES/hello_gtk_builder.mo +0 -0
- data/samples/locale/lv/LC_MESSAGES/hello_noop.mo +0 -0
- data/samples/locale/lv/LC_MESSAGES/hello_plural.mo +0 -0
- data/samples/locale/lv/LC_MESSAGES/hello_tk.mo +0 -0
- data/samples/locale/nb/LC_MESSAGES/hello.mo +0 -0
- data/samples/locale/nb/LC_MESSAGES/hello2.mo +0 -0
- data/samples/locale/nb/LC_MESSAGES/hello_glade2.mo +0 -0
- data/samples/locale/nb/LC_MESSAGES/hello_gtk2.mo +0 -0
- data/samples/locale/nb/LC_MESSAGES/hello_gtk_builder.mo +0 -0
- data/samples/locale/nb/LC_MESSAGES/hello_noop.mo +0 -0
- data/samples/locale/nb/LC_MESSAGES/hello_plural.mo +0 -0
- data/samples/locale/nb/LC_MESSAGES/hello_tk.mo +0 -0
- data/samples/locale/nl/LC_MESSAGES/hello.mo +0 -0
- data/samples/locale/nl/LC_MESSAGES/hello2.mo +0 -0
- data/samples/locale/nl/LC_MESSAGES/hello_glade2.mo +0 -0
- data/samples/locale/nl/LC_MESSAGES/hello_gtk2.mo +0 -0
- data/samples/locale/nl/LC_MESSAGES/hello_gtk_builder.mo +0 -0
- data/samples/locale/nl/LC_MESSAGES/hello_noop.mo +0 -0
- data/samples/locale/nl/LC_MESSAGES/hello_plural.mo +0 -0
- data/samples/locale/nl/LC_MESSAGES/hello_tk.mo +0 -0
- data/samples/locale/pt_BR/LC_MESSAGES/hello.mo +0 -0
- data/samples/locale/pt_BR/LC_MESSAGES/hello2.mo +0 -0
- data/samples/locale/pt_BR/LC_MESSAGES/hello_glade2.mo +0 -0
- data/samples/locale/pt_BR/LC_MESSAGES/hello_gtk2.mo +0 -0
- data/samples/locale/pt_BR/LC_MESSAGES/hello_gtk_builder.mo +0 -0
- data/samples/locale/pt_BR/LC_MESSAGES/hello_noop.mo +0 -0
- data/samples/locale/pt_BR/LC_MESSAGES/hello_plural.mo +0 -0
- data/samples/locale/pt_BR/LC_MESSAGES/hello_tk.mo +0 -0
- data/samples/locale/ru/LC_MESSAGES/hello.mo +0 -0
- data/samples/locale/ru/LC_MESSAGES/hello2.mo +0 -0
- data/samples/locale/ru/LC_MESSAGES/hello_glade2.mo +0 -0
- data/samples/locale/ru/LC_MESSAGES/hello_gtk2.mo +0 -0
- data/samples/locale/ru/LC_MESSAGES/hello_gtk_builder.mo +0 -0
- data/samples/locale/ru/LC_MESSAGES/hello_noop.mo +0 -0
- data/samples/locale/ru/LC_MESSAGES/hello_plural.mo +0 -0
- data/samples/locale/ru/LC_MESSAGES/hello_tk.mo +0 -0
- data/samples/locale/sr/LC_MESSAGES/hello.mo +0 -0
- data/samples/locale/sr/LC_MESSAGES/hello2.mo +0 -0
- data/samples/locale/sr/LC_MESSAGES/hello_glade2.mo +0 -0
- data/samples/locale/sr/LC_MESSAGES/hello_gtk2.mo +0 -0
- data/samples/locale/sr/LC_MESSAGES/hello_gtk_builder.mo +0 -0
- data/samples/locale/sr/LC_MESSAGES/hello_noop.mo +0 -0
- data/samples/locale/sr/LC_MESSAGES/hello_plural.mo +0 -0
- data/samples/locale/sr/LC_MESSAGES/hello_tk.mo +0 -0
- data/samples/locale/sv/LC_MESSAGES/hello.mo +0 -0
- data/samples/locale/sv/LC_MESSAGES/hello2.mo +0 -0
- data/samples/locale/sv/LC_MESSAGES/hello_glade2.mo +0 -0
- data/samples/locale/sv/LC_MESSAGES/hello_gtk2.mo +0 -0
- data/samples/locale/sv/LC_MESSAGES/hello_gtk_builder.mo +0 -0
- data/samples/locale/sv/LC_MESSAGES/hello_noop.mo +0 -0
- data/samples/locale/sv/LC_MESSAGES/hello_plural.mo +0 -0
- data/samples/locale/sv/LC_MESSAGES/hello_tk.mo +0 -0
- data/samples/locale/uk/LC_MESSAGES/hello.mo +0 -0
- data/samples/locale/uk/LC_MESSAGES/hello2.mo +0 -0
- data/samples/locale/uk/LC_MESSAGES/hello_glade2.mo +0 -0
- data/samples/locale/uk/LC_MESSAGES/hello_gtk2.mo +0 -0
- data/samples/locale/uk/LC_MESSAGES/hello_gtk_builder.mo +0 -0
- data/samples/locale/uk/LC_MESSAGES/hello_noop.mo +0 -0
- data/samples/locale/uk/LC_MESSAGES/hello_plural.mo +0 -0
- data/samples/locale/uk/LC_MESSAGES/hello_tk.mo +0 -0
- data/samples/locale/vi/LC_MESSAGES/hello.mo +0 -0
- data/samples/locale/vi/LC_MESSAGES/hello2.mo +0 -0
- data/samples/locale/vi/LC_MESSAGES/hello_glade2.mo +0 -0
- data/samples/locale/vi/LC_MESSAGES/hello_gtk2.mo +0 -0
- data/samples/locale/vi/LC_MESSAGES/hello_gtk_builder.mo +0 -0
- data/samples/locale/vi/LC_MESSAGES/hello_noop.mo +0 -0
- data/samples/locale/vi/LC_MESSAGES/hello_plural.mo +0 -0
- data/samples/locale/vi/LC_MESSAGES/hello_tk.mo +0 -0
- data/samples/locale/zh/LC_MESSAGES/hello.mo +0 -0
- data/samples/locale/zh/LC_MESSAGES/hello2.mo +0 -0
- data/samples/locale/zh/LC_MESSAGES/hello_glade2.mo +0 -0
- data/samples/locale/zh/LC_MESSAGES/hello_gtk2.mo +0 -0
- data/samples/locale/zh/LC_MESSAGES/hello_gtk_builder.mo +0 -0
- data/samples/locale/zh/LC_MESSAGES/hello_noop.mo +0 -0
- data/samples/locale/zh/LC_MESSAGES/hello_plural.mo +0 -0
- data/samples/locale/zh/LC_MESSAGES/hello_tk.mo +0 -0
- data/samples/locale/zh_TW/LC_MESSAGES/hello.mo +0 -0
- data/samples/locale/zh_TW/LC_MESSAGES/hello2.mo +0 -0
- data/samples/locale/zh_TW/LC_MESSAGES/hello_glade2.mo +0 -0
- data/samples/locale/zh_TW/LC_MESSAGES/hello_gtk2.mo +0 -0
- data/samples/locale/zh_TW/LC_MESSAGES/hello_gtk_builder.mo +0 -0
- data/samples/locale/zh_TW/LC_MESSAGES/hello_noop.mo +0 -0
- data/samples/locale/zh_TW/LC_MESSAGES/hello_plural.mo +0 -0
- data/samples/locale/zh_TW/LC_MESSAGES/hello_tk.mo +0 -0
- data/samples/po/bg/hello_gtk_builder.po +19 -0
- data/samples/po/bs/hello_gtk_builder.po +19 -0
- data/samples/po/ca/hello_gtk_builder.po +19 -0
- data/samples/po/cs/hello_gtk_builder.po +19 -0
- data/samples/po/de/hello_gtk_builder.po +19 -0
- data/samples/po/el/hello_gtk_builder.po +19 -0
- data/samples/po/eo/hello_gtk_builder.po +19 -0
- data/samples/po/es/hello_gtk_builder.po +19 -0
- data/samples/po/fr/hello_gtk_builder.po +19 -0
- data/samples/po/hello.pot +24 -0
- data/samples/po/hello2.pot +33 -0
- data/samples/po/hello_glade2.pot +31 -0
- data/samples/po/hello_gtk2.pot +23 -0
- data/samples/po/hello_gtk_builder.pot +20 -0
- data/samples/po/hello_noop.pot +27 -0
- data/samples/po/hello_plural.pot +27 -0
- data/samples/po/hello_tk.pot +23 -0
- data/samples/po/hr/hello_gtk_builder.po +19 -0
- data/samples/po/hu/hello_gtk_builder.po +19 -0
- data/samples/po/it/hello_gtk_builder.po +19 -0
- data/samples/po/ja/hello_gtk_builder.po +19 -0
- data/samples/po/ko/hello_gtk_builder.po +19 -0
- data/samples/po/lv/hello_gtk_builder.po +19 -0
- data/samples/po/nb/hello_gtk_builder.po +19 -0
- data/samples/po/nl/hello_gtk_builder.po +19 -0
- data/samples/po/pt_BR/hello_gtk_builder.po +19 -0
- data/samples/po/ru/hello_gtk_builder.po +19 -0
- data/samples/po/sr/hello_gtk_builder.po +19 -0
- data/samples/po/sv/hello_gtk_builder.po +19 -0
- data/samples/po/uk/hello_gtk_builder.po +19 -0
- data/samples/po/vi/hello_gtk_builder.po +19 -0
- data/samples/po/zh/hello_gtk_builder.po +19 -0
- data/samples/po/zh_TW/hello_gtk_builder.po +19 -0
- data/src/po_parser.ry +25 -25
- data/test/locale/cr/LC_MESSAGES/plural.mo +0 -0
- data/test/locale/da/LC_MESSAGES/plural.mo +0 -0
- data/test/locale/da/LC_MESSAGES/plural_error.mo +0 -0
- data/test/locale/fr/LC_MESSAGES/plural.mo +0 -0
- data/test/locale/fr/LC_MESSAGES/plural_error.mo +0 -0
- data/test/locale/fr/LC_MESSAGES/test1.mo +0 -0
- data/test/locale/fr/LC_MESSAGES/test2.mo +0 -0
- data/test/locale/ir/LC_MESSAGES/plural.mo +0 -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/non_ascii.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/plural.mo +0 -0
- data/test/locale/ja/LC_MESSAGES/plural_error.mo +0 -0
- data/test/locale/ja/LC_MESSAGES/rubyparser.mo +0 -0
- data/test/locale/ja/LC_MESSAGES/s_.mo +0 -0
- data/test/locale/ja/LC_MESSAGES/test1.mo +0 -0
- data/test/locale/ja/LC_MESSAGES/test2.mo +0 -0
- data/test/locale/ja/LC_MESSAGES/test3.mo +0 -0
- data/test/locale/ja/LC_MESSAGES/untranslated.mo +0 -0
- data/test/locale/la/LC_MESSAGES/plural.mo +0 -0
- data/test/locale/la/LC_MESSAGES/plural_error.mo +0 -0
- data/test/locale/li/LC_MESSAGES/plural.mo +0 -0
- data/test/locale/li/LC_MESSAGES/plural_error.mo +0 -0
- data/test/locale/po/LC_MESSAGES/plural.mo +0 -0
- data/test/locale/sl/LC_MESSAGES/plural.mo +0 -0
- data/test/po/_.pot +162 -0
- data/test/po/backslash.pot +23 -0
- data/test/po/non_ascii.pot +23 -0
- data/test/po/np_.pot +48 -0
- data/test/po/ns_.pot +73 -0
- data/test/po/p_.pot +50 -0
- data/test/po/s_.pot +55 -0
- data/test/po/untranslated.pot +23 -0
- data/test/test_locale_path.rb +25 -3
- data/test/{tools/test_po.rb → test_po.rb} +217 -210
- data/test/test_po_entry.rb +107 -53
- data/test/test_text_domain.rb +38 -0
- data/test/tools/test_msgmerge.rb +206 -5
- data/test/tools/test_task.rb +287 -0
- data/test/tools/test_xgettext.rb +3 -1
- metadata +373 -4
- data/samples/cgi/Rakefile +0 -27
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
#
|
|
3
|
+
# Copyright (C) 2012-2013 Kouhei Sutou <kou@clear-code.com>
|
|
4
|
+
#
|
|
5
|
+
# License: Ruby's or LGPL
|
|
6
|
+
#
|
|
7
|
+
# This library is free software: you can redistribute it and/or modify
|
|
8
|
+
# it under the terms of the GNU Lesser General Public License as published by
|
|
9
|
+
# the Free Software Foundation, either version 3 of the License, or
|
|
10
|
+
# (at your option) any later version.
|
|
11
|
+
#
|
|
12
|
+
# This library is distributed in the hope that it will be useful,
|
|
13
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
14
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
15
|
+
# GNU Lesser General Public License for more details.
|
|
16
|
+
#
|
|
17
|
+
# You should have received a copy of the GNU Lesser General Public License
|
|
18
|
+
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
19
|
+
|
|
20
|
+
module GetText
|
|
21
|
+
module POFormat
|
|
22
|
+
TRANSLATOR_COMMENT_MARK = "# "
|
|
23
|
+
EXTRACTED_COMMENT_MARK = "#."
|
|
24
|
+
FLAG_MARK = "#,"
|
|
25
|
+
PREVIOUS_COMMENT_MARK = "#|"
|
|
26
|
+
REFERENCE_COMMENT_MARK = "#:"
|
|
27
|
+
end
|
|
28
|
+
end
|
data/lib/gettext/po_parser.rb
CHANGED
|
@@ -77,39 +77,39 @@ module_eval(<<'...end po_parser.ry/module_eval...', 'po_parser.ry', 123)
|
|
|
77
77
|
until str.empty? do
|
|
78
78
|
case str
|
|
79
79
|
when /\A\s+/
|
|
80
|
-
|
|
80
|
+
str = $'
|
|
81
81
|
when /\Amsgctxt/
|
|
82
|
-
|
|
83
|
-
|
|
82
|
+
@q.push [:MSGCTXT, $&]
|
|
83
|
+
str = $'
|
|
84
84
|
when /\Amsgid_plural/
|
|
85
|
-
|
|
86
|
-
|
|
85
|
+
@q.push [:MSGID_PLURAL, $&]
|
|
86
|
+
str = $'
|
|
87
87
|
when /\Amsgid/
|
|
88
|
-
|
|
89
|
-
|
|
88
|
+
@q.push [:MSGID, $&]
|
|
89
|
+
str = $'
|
|
90
90
|
when /\Amsgstr/
|
|
91
|
-
|
|
92
|
-
|
|
91
|
+
@q.push [:MSGSTR, $&]
|
|
92
|
+
str = $'
|
|
93
93
|
when /\A\[(\d+)\]/
|
|
94
|
-
|
|
95
|
-
|
|
94
|
+
@q.push [:PLURAL_NUM, $1]
|
|
95
|
+
str = $'
|
|
96
96
|
when /\A\#~(.*)/
|
|
97
97
|
if report_warning?
|
|
98
98
|
$stderr.print _("Warning: obsolete msgid exists.\n")
|
|
99
99
|
$stderr.print " #{$&}\n"
|
|
100
100
|
end
|
|
101
|
-
|
|
102
|
-
|
|
101
|
+
@q.push [:COMMENT, $&]
|
|
102
|
+
str = $'
|
|
103
103
|
when /\A\#(.*)/
|
|
104
|
-
|
|
105
|
-
|
|
104
|
+
@q.push [:COMMENT, $&]
|
|
105
|
+
str = $'
|
|
106
106
|
when /\A\"(.*)\"/
|
|
107
|
-
|
|
108
|
-
|
|
107
|
+
@q.push [:STRING, unescape_string($1)]
|
|
108
|
+
str = $'
|
|
109
109
|
else
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
110
|
+
#c = str[0,1]
|
|
111
|
+
#@q.push [:STRING, c]
|
|
112
|
+
str = str[1..-1]
|
|
113
113
|
end
|
|
114
114
|
end
|
|
115
115
|
@q.push [false, "$end"]
|
|
@@ -184,15 +184,15 @@ module_eval(<<'...end po_parser.ry/module_eval...', 'po_parser.ry', 123)
|
|
|
184
184
|
mark = $1
|
|
185
185
|
content = $2
|
|
186
186
|
case mark
|
|
187
|
-
when
|
|
187
|
+
when POFormat::TRANSLATOR_COMMENT_MARK
|
|
188
188
|
@translator_comments << content
|
|
189
|
-
when
|
|
189
|
+
when POFormat::EXTRACTED_COMMENT_MARK
|
|
190
190
|
@extracted_comments << content
|
|
191
|
-
when
|
|
191
|
+
when POFormat::REFERENCE_COMMENT_MARK
|
|
192
192
|
@references.concat(parse_references_line(content))
|
|
193
|
-
when
|
|
193
|
+
when POFormat::FLAG_MARK
|
|
194
194
|
@flag << content
|
|
195
|
-
when
|
|
195
|
+
when POFormat::PREVIOUS_COMMENT_MARK
|
|
196
196
|
@previous << content
|
|
197
197
|
else
|
|
198
198
|
@comments << comment
|
data/lib/gettext/text_domain.rb
CHANGED
|
@@ -164,10 +164,20 @@ module GetText
|
|
|
164
164
|
|
|
165
165
|
if path
|
|
166
166
|
charset = @output_charset || lang.charset || Locale.charset || "UTF-8"
|
|
167
|
+
charset = normalize_charset(charset)
|
|
167
168
|
@mofiles[lang_key] = MO.open(path, charset)
|
|
168
169
|
else
|
|
169
170
|
@mofiles[lang_key] = :empty
|
|
170
171
|
end
|
|
171
172
|
end
|
|
173
|
+
|
|
174
|
+
def normalize_charset(charset)
|
|
175
|
+
case charset
|
|
176
|
+
when /\Autf8\z/i
|
|
177
|
+
"UTF-8"
|
|
178
|
+
else
|
|
179
|
+
charset
|
|
180
|
+
end
|
|
181
|
+
end
|
|
172
182
|
end
|
|
173
183
|
end
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
# You should have received a copy of the GNU Lesser General Public License
|
|
19
19
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
20
20
|
|
|
21
|
+
require "etc"
|
|
21
22
|
require "gettext"
|
|
22
23
|
require "gettext/po_parser"
|
|
23
24
|
require "gettext/tools/msgmerge"
|
|
@@ -200,7 +201,24 @@ module GetText
|
|
|
200
201
|
end
|
|
201
202
|
|
|
202
203
|
def guess_full_name
|
|
203
|
-
|
|
204
|
+
full_name = guess_full_name_from_password_entry
|
|
205
|
+
full_name ||= ENV["USERNAME"]
|
|
206
|
+
full_name
|
|
207
|
+
end
|
|
208
|
+
|
|
209
|
+
def guess_full_name_from_password_entry
|
|
210
|
+
password_entry = find_password_entry
|
|
211
|
+
return nil if password_entry.nil?
|
|
212
|
+
|
|
213
|
+
full_name = password_entry.gecos.split(/,/).first.strip
|
|
214
|
+
full_name = nil if full_name.empty?
|
|
215
|
+
full_name
|
|
216
|
+
end
|
|
217
|
+
|
|
218
|
+
def find_password_entry
|
|
219
|
+
Etc.getpwuid
|
|
220
|
+
rescue ArgumentError
|
|
221
|
+
nil
|
|
204
222
|
end
|
|
205
223
|
|
|
206
224
|
def translator_mail
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# -*- coding: utf-8 -*-
|
|
2
2
|
#
|
|
3
3
|
# Copyright (C) 2012-2013 Haruka Yoshihara <yoshihara@clear-code.com>
|
|
4
|
-
# Copyright (C) 2012 Kouhei Sutou <kou@clear-code.com>
|
|
4
|
+
# Copyright (C) 2012-2013 Kouhei Sutou <kou@clear-code.com>
|
|
5
5
|
# Copyright (C) 2005-2009 Masao Mutoh
|
|
6
6
|
# Copyright (C) 2005,2006 speakillof
|
|
7
7
|
#
|
|
@@ -192,9 +192,16 @@ module GetText
|
|
|
192
192
|
end
|
|
193
193
|
end
|
|
194
194
|
|
|
195
|
-
|
|
195
|
+
# @private
|
|
196
|
+
class Config
|
|
197
|
+
include GetText
|
|
196
198
|
|
|
197
|
-
|
|
199
|
+
bindtextdomain("gettext")
|
|
200
|
+
|
|
201
|
+
attr_accessor :definition_po, :reference_pot
|
|
202
|
+
attr_accessor :output, :fuzzy, :update
|
|
203
|
+
attr_accessor :order
|
|
204
|
+
attr_accessor :po_format_options
|
|
198
205
|
|
|
199
206
|
# update mode options
|
|
200
207
|
attr_accessor :backup, :suffix
|
|
@@ -213,106 +220,153 @@ module GetText
|
|
|
213
220
|
# the SIMPLE_BACKUP_SUFFIX environment variable.
|
|
214
221
|
|
|
215
222
|
def initialize
|
|
223
|
+
@definition_po = nil
|
|
224
|
+
@reference_po = nil
|
|
225
|
+
@update = false
|
|
216
226
|
@output = nil
|
|
227
|
+
@order = :references
|
|
228
|
+
@po_format_options = {
|
|
229
|
+
:max_line_width => POEntry::Formatter::DEFAULT_MAX_LINE_WIDTH,
|
|
230
|
+
}
|
|
217
231
|
@fuzzy = nil
|
|
218
232
|
@update = nil
|
|
219
233
|
@backup = ENV["VERSION_CONTROL"]
|
|
220
234
|
@suffix = ENV["SIMPLE_BACKUP_SUFFIX"] || "~"
|
|
221
235
|
@input_dirs = ["."]
|
|
222
236
|
end
|
|
223
|
-
end
|
|
224
237
|
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
238
|
+
def parse(command_line)
|
|
239
|
+
parser = create_option_parser
|
|
240
|
+
rest = parser.parse(command_line)
|
|
241
|
+
|
|
242
|
+
if rest.size != 2
|
|
243
|
+
puts(parser.help)
|
|
244
|
+
exit(false)
|
|
245
|
+
end
|
|
246
|
+
|
|
247
|
+
@definition_po, @reference_pot = rest
|
|
248
|
+
@output = @definition_po if @update
|
|
231
249
|
end
|
|
232
|
-
end
|
|
233
250
|
|
|
234
|
-
|
|
251
|
+
private
|
|
252
|
+
def create_option_parser
|
|
253
|
+
parser = OptionParser.new
|
|
254
|
+
parser.banner =
|
|
255
|
+
_("Usage: %s [OPTIONS] definition.po reference.pot") % $0
|
|
256
|
+
#parser.summary_width = 80
|
|
257
|
+
parser.separator("")
|
|
258
|
+
description = _("Merges two Uniforum style .po files together. " +
|
|
259
|
+
"The definition.po file is an existing PO file " +
|
|
260
|
+
"with translations. The reference.pot file is " +
|
|
261
|
+
"the last created PO file with up-to-date source " +
|
|
262
|
+
"references. The reference.pot is generally " +
|
|
263
|
+
"created by rxgettext.")
|
|
264
|
+
parser.separator(description)
|
|
265
|
+
parser.separator("")
|
|
266
|
+
parser.separator(_("Specific options:"))
|
|
267
|
+
|
|
268
|
+
parser.on("-U", "--[no-]update",
|
|
269
|
+
_("Update definition.po")) do |update|
|
|
270
|
+
@update = update
|
|
271
|
+
end
|
|
235
272
|
|
|
236
|
-
|
|
273
|
+
parser.on("-o", "--output=FILE",
|
|
274
|
+
_("Write output to specified file")) do |output|
|
|
275
|
+
@output = output
|
|
276
|
+
end
|
|
237
277
|
|
|
238
|
-
|
|
239
|
-
|
|
278
|
+
parser.on("--[no-]sort-output",
|
|
279
|
+
_("Generate sorted output")) do |sort|
|
|
280
|
+
@order = sort ? :references : nil
|
|
281
|
+
end
|
|
240
282
|
|
|
241
|
-
|
|
242
|
-
|
|
283
|
+
parser.on("--[no-]sort-by-file",
|
|
284
|
+
_("Sort output by file location")) do |sort_by_file|
|
|
285
|
+
@order = sort_by_file ? :references : :msgid
|
|
286
|
+
end
|
|
243
287
|
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
if config.defpo.nil?
|
|
250
|
-
raise ArgumentError, _("definition po is not given.")
|
|
251
|
-
elsif config.refpot.nil?
|
|
252
|
-
raise ArgumentError, _("reference pot is not given.")
|
|
253
|
-
end
|
|
288
|
+
parser.on("--[no-]sort-by-msgid",
|
|
289
|
+
_("Sort output by msgid")) do |sort_by_msgid|
|
|
290
|
+
@order = sort_by_msgid ? :msgid : :references
|
|
291
|
+
end
|
|
254
292
|
|
|
255
|
-
|
|
256
|
-
|
|
293
|
+
parser.on("--[no-]location",
|
|
294
|
+
_("Preserve '#: FILENAME:LINE' lines")) do |location|
|
|
295
|
+
@po_format_options[:include_reference_comment] = location
|
|
296
|
+
end
|
|
257
297
|
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
description = _("Merges two Uniforum style .po files together. " +
|
|
264
|
-
"The def.po file is an existing PO file with " +
|
|
265
|
-
"translations. The ref.pot file is the last " +
|
|
266
|
-
"created PO file with up-to-date source " +
|
|
267
|
-
"references. ref.pot is generally created by " +
|
|
268
|
-
"rgettext.")
|
|
269
|
-
parser.separator(description)
|
|
270
|
-
parser.separator("")
|
|
271
|
-
parser.separator(_("Specific options:"))
|
|
272
|
-
|
|
273
|
-
output = nil
|
|
274
|
-
|
|
275
|
-
parser.on("-o", "--output=FILE",
|
|
276
|
-
_("write output to specified file")) do |out|
|
|
277
|
-
output = out
|
|
278
|
-
end
|
|
298
|
+
parser.on("--width=WIDTH", Integer,
|
|
299
|
+
_("Set output page width"),
|
|
300
|
+
"(#{@po_format_options[:max_line_width]})") do |width|
|
|
301
|
+
@po_format_options[:max_line_width] = width
|
|
302
|
+
end
|
|
279
303
|
|
|
280
|
-
|
|
304
|
+
parser.on("--[no-]wrap",
|
|
305
|
+
_("Break long message lines, longer than the output page width, into several lines"),
|
|
306
|
+
"(#{@po_format_options[:max_line_width] >= 0})") do |wrap|
|
|
307
|
+
if wrap
|
|
308
|
+
max_line_width = POEntry::Formatter::DEFAULT_MAX_LINE_WIDTH
|
|
309
|
+
else
|
|
310
|
+
max_line_width = -1
|
|
311
|
+
end
|
|
312
|
+
@po_format_options[:max_line_width] = max_line_width
|
|
313
|
+
end
|
|
281
314
|
|
|
282
|
-
|
|
283
|
-
puts(parser.help)
|
|
284
|
-
exit(true)
|
|
285
|
-
end
|
|
315
|
+
#parser.on("-F", "--fuzzy-matching")
|
|
286
316
|
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
317
|
+
parser.on("-h", "--help", _("Display this help and exit")) do
|
|
318
|
+
puts(parser.help)
|
|
319
|
+
exit(true)
|
|
320
|
+
end
|
|
291
321
|
|
|
292
|
-
|
|
322
|
+
parser.on_tail("--version",
|
|
323
|
+
_("Display version information and exit")) do
|
|
324
|
+
puts(GetText::VERSION)
|
|
325
|
+
exit(true)
|
|
326
|
+
end
|
|
293
327
|
|
|
294
|
-
|
|
328
|
+
parser
|
|
329
|
+
end
|
|
295
330
|
end
|
|
296
331
|
|
|
297
|
-
|
|
298
|
-
|
|
332
|
+
class << self
|
|
333
|
+
# (see #run)
|
|
334
|
+
#
|
|
335
|
+
# This method is provided just for convenience. It equals to
|
|
336
|
+
# `new.run(*command_line)`.
|
|
337
|
+
def run(*command_line)
|
|
338
|
+
new.run(*command_line)
|
|
339
|
+
end
|
|
340
|
+
end
|
|
341
|
+
|
|
342
|
+
# Merge a po-file inluding translated messages and a new pot-file.
|
|
343
|
+
#
|
|
344
|
+
# @param [Array<String>] command_line
|
|
345
|
+
# command line arguments for rmsgmerge.
|
|
346
|
+
# @return [void]
|
|
347
|
+
def run(*command_line)
|
|
348
|
+
config = Config.new
|
|
349
|
+
config.parse(command_line)
|
|
299
350
|
|
|
300
351
|
parser = POParser.new
|
|
301
352
|
parser.ignore_fuzzy = false
|
|
302
|
-
|
|
303
|
-
|
|
353
|
+
definition_po = PO.new
|
|
354
|
+
reference_pot = PO.new
|
|
355
|
+
parser.parse_file(config.definition_po, definition_po)
|
|
356
|
+
parser.parse_file(config.reference_pot, reference_pot)
|
|
304
357
|
|
|
305
358
|
merger = Merger.new
|
|
306
|
-
result = merger.merge(
|
|
359
|
+
result = merger.merge(definition_po, reference_pot)
|
|
360
|
+
result.order = config.order
|
|
307
361
|
p result if $DEBUG
|
|
308
362
|
print result.generate_po if $DEBUG
|
|
309
363
|
|
|
310
364
|
if config.output.is_a?(String)
|
|
311
365
|
File.open(File.expand_path(config.output), "w+") do |file|
|
|
312
|
-
file.write(result.to_s)
|
|
366
|
+
file.write(result.to_s(config.po_format_options))
|
|
313
367
|
end
|
|
314
368
|
else
|
|
315
|
-
puts(result.to_s)
|
|
369
|
+
puts(result.to_s(config.po_format_options))
|
|
316
370
|
end
|
|
317
371
|
end
|
|
318
372
|
end
|
data/lib/gettext/tools/task.rb
CHANGED
|
@@ -23,33 +23,147 @@ require "gettext/tools"
|
|
|
23
23
|
module GetText
|
|
24
24
|
module Tools
|
|
25
25
|
class Task
|
|
26
|
+
class Error < StandardError
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
class ValidationError < Error
|
|
30
|
+
attr_reader :reasons
|
|
31
|
+
def initialize(reasons)
|
|
32
|
+
@reasons = reasons
|
|
33
|
+
lines = []
|
|
34
|
+
lines << "invalid configurations:"
|
|
35
|
+
@reasons.each do |variable, reason|
|
|
36
|
+
lines << "#{variable}: #{reason}"
|
|
37
|
+
end
|
|
38
|
+
super(lines.join("\n"))
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
|
|
26
42
|
include GetText
|
|
27
43
|
include Rake::DSL
|
|
28
44
|
|
|
29
|
-
|
|
30
|
-
|
|
45
|
+
class << self
|
|
46
|
+
# Define gettext related Rake tasks. Normally, use this method
|
|
47
|
+
# to define tasks because this method is a convenient API.
|
|
48
|
+
#
|
|
49
|
+
# See accessor APIs how to configure this task.
|
|
50
|
+
#
|
|
51
|
+
# See {#define} for what task is defined.
|
|
52
|
+
#
|
|
53
|
+
# @example Recommended usage
|
|
54
|
+
# require "gettext/tools/task"
|
|
55
|
+
# # Recommended usage
|
|
56
|
+
# GetText::Tools::Task.define do |task|
|
|
57
|
+
# task.spec = spec
|
|
58
|
+
# # ...
|
|
59
|
+
# end
|
|
60
|
+
# # Low level API
|
|
61
|
+
# task = GetText::Tools::Task.new
|
|
62
|
+
# task.spec = spec
|
|
63
|
+
# # ...
|
|
64
|
+
# task.define
|
|
65
|
+
#
|
|
66
|
+
# @yield [task] Gives the newely created task to the block.
|
|
67
|
+
# @yieldparam [GetText::Tools::Task] task The task that should be
|
|
68
|
+
# configured.
|
|
69
|
+
# @see {#define}
|
|
70
|
+
# @return [void]
|
|
71
|
+
def define
|
|
72
|
+
task = new
|
|
73
|
+
yield(task)
|
|
74
|
+
task.define
|
|
75
|
+
end
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
# @return [Gem::Specification, nil] Package information associated
|
|
79
|
+
# with the task.
|
|
80
|
+
attr_reader :spec
|
|
81
|
+
|
|
82
|
+
# @return [String, nil] Package name for messages.
|
|
83
|
+
attr_accessor :package_name
|
|
84
|
+
|
|
85
|
+
# @return [String, nil] Package version for messages.
|
|
86
|
+
attr_accessor :package_version
|
|
87
|
+
|
|
88
|
+
# It is a required parameter.
|
|
89
|
+
#
|
|
90
|
+
# @return [Array<String>] Supported locales. It is filled from
|
|
91
|
+
# {#po_base_directory} by default.
|
|
92
|
+
attr_accessor :locales
|
|
93
|
+
attr_accessor :po_base_directory
|
|
94
|
+
# @return [String] Base directory that has generated MOs. MOs
|
|
95
|
+
# are generated into
|
|
96
|
+
# `#{mo_base_directory}/#{locale}/LC_MESSAGES/#{domain}.mo`.
|
|
97
|
+
attr_accessor :mo_base_directory
|
|
98
|
+
# It is a required parameter.
|
|
99
|
+
#
|
|
100
|
+
# @return [Array<String>] Files that have messages.
|
|
101
|
+
attr_accessor :files
|
|
102
|
+
# It is a required parameter.
|
|
103
|
+
#
|
|
104
|
+
# @return [String] Text domain
|
|
105
|
+
attr_accessor :domain
|
|
106
|
+
attr_accessor :namespace_prefix
|
|
31
107
|
# @return [Array<String>] Command line options for extracting messages
|
|
32
108
|
# from sources.
|
|
33
109
|
# @see GetText::Tools::XGetText
|
|
34
110
|
# @see `rxgettext --help`
|
|
35
|
-
|
|
36
|
-
|
|
111
|
+
attr_accessor :xgettext_options
|
|
112
|
+
|
|
113
|
+
# @return [Array<String>] Command line options for merging PO with the
|
|
114
|
+
# latest POT.
|
|
115
|
+
# @see GetText::Tools::MsgMerge
|
|
116
|
+
# @see `rmsgmerge --help`
|
|
117
|
+
attr_accessor :msgmerge_options
|
|
118
|
+
|
|
119
|
+
# @return [Bool]
|
|
120
|
+
# @see #enable_description? For details.
|
|
121
|
+
attr_writer :enable_description
|
|
122
|
+
|
|
123
|
+
# @return [Bool]
|
|
124
|
+
# @see #enable_po? For details.
|
|
125
|
+
attr_writer :enable_po
|
|
126
|
+
|
|
127
|
+
# @param [Gem::Specification, nil] spec Package information associated
|
|
128
|
+
# with the task. Some information are extracted from the spec.
|
|
129
|
+
# @see #spec= What information are extracted from the spec.
|
|
130
|
+
def initialize(spec=nil)
|
|
131
|
+
initialize_variables
|
|
132
|
+
self.spec = spec
|
|
133
|
+
if spec
|
|
134
|
+
yield(self) if block_given?
|
|
135
|
+
warn("Use #{self.class.name}.define instead of #{self.class.name}.new(spec).")
|
|
136
|
+
define
|
|
137
|
+
end
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
# Sets package infromation by Gem::Specification. Here is a list
|
|
141
|
+
# for information extracted from the spec:
|
|
142
|
+
#
|
|
143
|
+
# * {#package_name}
|
|
144
|
+
# * {#package_version}
|
|
145
|
+
# * {#domain}
|
|
146
|
+
# * {#files}
|
|
147
|
+
#
|
|
148
|
+
# @param [Gem::Specification] spec package information for the
|
|
149
|
+
# i18n application.
|
|
150
|
+
def spec=(spec)
|
|
37
151
|
@spec = spec
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
@
|
|
41
|
-
@
|
|
42
|
-
@domain
|
|
43
|
-
@
|
|
44
|
-
@xgettext_options = []
|
|
45
|
-
yield(self) if block_given?
|
|
46
|
-
@locales = detect_locales if @locales.empty?
|
|
47
|
-
raise("must set locales: #{inspect}") if @locales.empty?
|
|
48
|
-
define
|
|
152
|
+
return if @spec.nil?
|
|
153
|
+
|
|
154
|
+
@package_name = spec.name
|
|
155
|
+
@package_version = spec.version.to_s
|
|
156
|
+
@domain ||= spec.name
|
|
157
|
+
@files += target_files
|
|
49
158
|
end
|
|
50
159
|
|
|
51
|
-
|
|
160
|
+
# Define tasks from configured parameters.
|
|
161
|
+
#
|
|
162
|
+
# TODO: List defined Rake tasks.
|
|
52
163
|
def define
|
|
164
|
+
ensure_variables
|
|
165
|
+
validate
|
|
166
|
+
|
|
53
167
|
define_file_tasks
|
|
54
168
|
if namespace_prefix
|
|
55
169
|
namespace_recursive namespace_prefix do
|
|
@@ -60,97 +174,202 @@ module GetText
|
|
|
60
174
|
end
|
|
61
175
|
end
|
|
62
176
|
|
|
177
|
+
# If it is true, each task has description. Otherwise, all tasks
|
|
178
|
+
# doesn't have description.
|
|
179
|
+
#
|
|
180
|
+
# @return [Bool]
|
|
181
|
+
# @since 3.0.1
|
|
182
|
+
def enable_description?
|
|
183
|
+
@enable_description
|
|
184
|
+
end
|
|
185
|
+
|
|
186
|
+
# If it is true, PO related tasks are defined. Otherwise, they
|
|
187
|
+
# are not defined.
|
|
188
|
+
#
|
|
189
|
+
# This parameter is useful to manage PO written by hand.
|
|
190
|
+
#
|
|
191
|
+
# @return [Bool]
|
|
192
|
+
# @since 3.0.1
|
|
193
|
+
def enable_po?
|
|
194
|
+
@enable_po
|
|
195
|
+
end
|
|
196
|
+
|
|
197
|
+
private
|
|
198
|
+
def initialize_variables
|
|
199
|
+
@spec = nil
|
|
200
|
+
@package_name = nil
|
|
201
|
+
@package_version = nil
|
|
202
|
+
@locales = []
|
|
203
|
+
@po_base_directory = "po"
|
|
204
|
+
@mo_base_directory = "locale"
|
|
205
|
+
@files = []
|
|
206
|
+
@domain = nil
|
|
207
|
+
@namespace_prefix = nil
|
|
208
|
+
@xgettext_options = []
|
|
209
|
+
@msgmerge_options = []
|
|
210
|
+
@enable_description = true
|
|
211
|
+
@enable_po = true
|
|
212
|
+
end
|
|
213
|
+
|
|
214
|
+
def ensure_variables
|
|
215
|
+
@locales = detect_locales if @locales.empty?
|
|
216
|
+
end
|
|
217
|
+
|
|
218
|
+
def validate
|
|
219
|
+
reasons = {}
|
|
220
|
+
if @locales.empty?
|
|
221
|
+
reasons["locales"] = "must set one or more locales"
|
|
222
|
+
end
|
|
223
|
+
if @enable_po and @files.empty?
|
|
224
|
+
reasons["files"] = "must set one or more files"
|
|
225
|
+
end
|
|
226
|
+
if @domain.nil?
|
|
227
|
+
reasons["domain"] = "must set domain"
|
|
228
|
+
end
|
|
229
|
+
raise ValidationError.new(reasons) unless reasons.empty?
|
|
230
|
+
end
|
|
231
|
+
|
|
232
|
+
def desc(*args)
|
|
233
|
+
return unless @enable_description
|
|
234
|
+
super
|
|
235
|
+
end
|
|
236
|
+
|
|
63
237
|
def define_file_tasks
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
238
|
+
define_pot_file_task
|
|
239
|
+
|
|
240
|
+
locales.each do |locale|
|
|
241
|
+
define_po_file_task(locale)
|
|
242
|
+
define_mo_file_task(locale)
|
|
243
|
+
end
|
|
244
|
+
end
|
|
245
|
+
|
|
246
|
+
def define_pot_file_task
|
|
247
|
+
return unless @enable_po
|
|
248
|
+
|
|
249
|
+
pot_dependencies = files.dup
|
|
250
|
+
unless File.exist?(po_base_directory)
|
|
251
|
+
directory po_base_directory
|
|
252
|
+
pot_dependencies << po_base_directory
|
|
253
|
+
end
|
|
254
|
+
file pot_file => pot_dependencies do
|
|
255
|
+
command_line = [
|
|
256
|
+
"--output", pot_file,
|
|
257
|
+
]
|
|
258
|
+
if package_name
|
|
259
|
+
command_line.concat(["--package-name", package_name])
|
|
69
260
|
end
|
|
70
|
-
|
|
71
|
-
command_line
|
|
72
|
-
"--package-name", @spec.name,
|
|
73
|
-
"--package-version", @spec.version.to_s,
|
|
74
|
-
"--output", pot_file,
|
|
75
|
-
]
|
|
76
|
-
command_line.concat(@xgettext_options)
|
|
77
|
-
command_line.concat(files)
|
|
78
|
-
GetText::Tools::XGetText.run(*command_line)
|
|
261
|
+
if package_version
|
|
262
|
+
command_line.concat(["--package-version", package_version])
|
|
79
263
|
end
|
|
264
|
+
command_line.concat(@xgettext_options)
|
|
265
|
+
command_line.concat(files)
|
|
266
|
+
GetText::Tools::XGetText.run(*command_line)
|
|
80
267
|
end
|
|
268
|
+
end
|
|
81
269
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
unless files.empty?
|
|
85
|
-
po_dependencies = [pot_file]
|
|
86
|
-
_po_directory = po_directory(locale)
|
|
87
|
-
unless File.exist?(_po_directory)
|
|
88
|
-
directory _po_directory
|
|
89
|
-
po_dependencies << _po_directory
|
|
90
|
-
end
|
|
91
|
-
file _po_file => po_dependencies do
|
|
92
|
-
if File.exist?(_po_file)
|
|
93
|
-
GetText::Tools::MsgMerge.run(po_file(locale), pot_file,
|
|
94
|
-
"--output", _po_file)
|
|
95
|
-
else
|
|
96
|
-
GetText::Tools::MsgInit.run("--input", pot_file,
|
|
97
|
-
"--output", _po_file,
|
|
98
|
-
"--locale", locale.to_s)
|
|
99
|
-
end
|
|
100
|
-
end
|
|
101
|
-
end
|
|
270
|
+
def define_po_file_task(locale)
|
|
271
|
+
return unless @enable_po
|
|
102
272
|
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
273
|
+
_po_file = po_file(locale)
|
|
274
|
+
po_dependencies = [pot_file]
|
|
275
|
+
_po_directory = po_directory(locale)
|
|
276
|
+
unless File.exist?(_po_directory)
|
|
277
|
+
directory _po_directory
|
|
278
|
+
po_dependencies << _po_directory
|
|
279
|
+
end
|
|
280
|
+
file _po_file => po_dependencies do
|
|
281
|
+
if File.exist?(_po_file)
|
|
282
|
+
command_line = [
|
|
283
|
+
"--update",
|
|
284
|
+
]
|
|
285
|
+
command_line.concat(@msgmerge_options)
|
|
286
|
+
command_line.concat([_po_file, pot_file])
|
|
287
|
+
GetText::Tools::MsgMerge.run(*command_line)
|
|
288
|
+
else
|
|
289
|
+
GetText::Tools::MsgInit.run("--input", pot_file,
|
|
290
|
+
"--output", _po_file,
|
|
291
|
+
"--locale", locale.to_s)
|
|
112
292
|
end
|
|
113
293
|
end
|
|
114
294
|
end
|
|
115
295
|
|
|
296
|
+
def define_mo_file_task(locale)
|
|
297
|
+
_po_file = po_file(locale)
|
|
298
|
+
mo_dependencies = [_po_file]
|
|
299
|
+
_mo_directory = mo_directory(locale)
|
|
300
|
+
unless File.exist?(_mo_directory)
|
|
301
|
+
directory _mo_directory
|
|
302
|
+
mo_dependencies << _mo_directory
|
|
303
|
+
end
|
|
304
|
+
_mo_file = mo_file(locale)
|
|
305
|
+
file _mo_file => mo_dependencies do
|
|
306
|
+
GetText::Tools::MsgFmt.run(_po_file, "--output", _mo_file)
|
|
307
|
+
end
|
|
308
|
+
end
|
|
309
|
+
|
|
116
310
|
def define_named_tasks
|
|
117
311
|
namespace :gettext do
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
312
|
+
if @enable_po
|
|
313
|
+
define_pot_tasks
|
|
314
|
+
define_po_tasks
|
|
121
315
|
end
|
|
122
316
|
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
@locales.each do |locale|
|
|
126
|
-
namespace locale do
|
|
127
|
-
desc "Update #{po_file(locale)}"
|
|
128
|
-
task :update => po_file(locale)
|
|
129
|
-
update_tasks << (current_scope + ["update"]).join(":")
|
|
130
|
-
end
|
|
131
|
-
end
|
|
317
|
+
define_mo_tasks
|
|
318
|
+
end
|
|
132
319
|
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
320
|
+
desc "Update *.mo"
|
|
321
|
+
task :gettext => (current_scope + ["gettext", "mo", "update"]).join(":")
|
|
322
|
+
end
|
|
323
|
+
|
|
324
|
+
def define_pot_tasks
|
|
325
|
+
namespace :pot do
|
|
326
|
+
desc "Create #{pot_file}"
|
|
327
|
+
task :create => pot_file
|
|
328
|
+
end
|
|
329
|
+
end
|
|
136
330
|
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
331
|
+
def define_po_tasks
|
|
332
|
+
namespace :po do
|
|
333
|
+
desc "Add a new locale"
|
|
334
|
+
task :add, [:locale] do |_task, args|
|
|
335
|
+
locale = args.locale || ENV["LOCALE"]
|
|
336
|
+
if locale.nil?
|
|
337
|
+
raise "specify locale name by " +
|
|
338
|
+
"'rake #{_task.name}[${LOCALE}]' or " +
|
|
339
|
+
"rake #{_task.name} LOCALE=${LOCALE}'"
|
|
145
340
|
end
|
|
341
|
+
define_po_file_task(locale)
|
|
342
|
+
Rake::Task[po_file(locale)].invoke
|
|
343
|
+
end
|
|
146
344
|
|
|
147
|
-
|
|
148
|
-
|
|
345
|
+
update_tasks = []
|
|
346
|
+
@locales.each do |locale|
|
|
347
|
+
namespace locale do
|
|
348
|
+
desc "Update #{po_file(locale)}"
|
|
349
|
+
task :update => po_file(locale)
|
|
350
|
+
update_tasks << (current_scope + ["update"]).join(":")
|
|
351
|
+
end
|
|
149
352
|
end
|
|
353
|
+
|
|
354
|
+
desc "Update *.po"
|
|
355
|
+
task :update => update_tasks
|
|
150
356
|
end
|
|
357
|
+
end
|
|
151
358
|
|
|
152
|
-
|
|
153
|
-
|
|
359
|
+
def define_mo_tasks
|
|
360
|
+
namespace :mo do
|
|
361
|
+
update_tasks = []
|
|
362
|
+
@locales.each do |locale|
|
|
363
|
+
namespace locale do
|
|
364
|
+
desc "Update #{mo_file(locale)}"
|
|
365
|
+
task :update => mo_file(locale)
|
|
366
|
+
update_tasks << (current_scope + ["update"]).join(":")
|
|
367
|
+
end
|
|
368
|
+
end
|
|
369
|
+
|
|
370
|
+
desc "Update *.mo"
|
|
371
|
+
task :update => update_tasks
|
|
372
|
+
end
|
|
154
373
|
end
|
|
155
374
|
|
|
156
375
|
def pot_file
|
|
@@ -166,7 +385,7 @@ module GetText
|
|
|
166
385
|
end
|
|
167
386
|
|
|
168
387
|
def mo_directory(locale)
|
|
169
|
-
File.join(mo_base_directory,
|
|
388
|
+
File.join(mo_base_directory, locale.to_s, "LC_MESSAGES")
|
|
170
389
|
end
|
|
171
390
|
|
|
172
391
|
def mo_file(locale)
|