bricas/statistics-r — pull request #4 by aixtal (2013-02-02 16:55:05+00:00)
Title: Locale fix

This is an attempt to fix the problem due to translations of R in different languages (reported in issue #3).

I grabbed the translations from the .po files (dev version 3.0.0) and merged them in a regular expression:

./trunk/src/library/base/po/.svn/text-base/da.po.svn-base-msgstr "Fejl: "
./trunk/src/library/base/po/.svn/text-base/de.po.svn-base-msgstr "Fehler: "
./trunk/src/library/base/po/.svn/text-base/fr.po.svn-base-msgstr "Erreur : "
./trunk/src/library/base/po/.svn/text-base/ja.po.svn-base-msgstr " エラー： "
./trunk/src/library/base/po/.svn/text-base/ko.po.svn-base-msgstr "에러:"
./trunk/src/library/base/po/.svn/text-base/nn.po.svn-base-msgstr "Feil: "
./trunk/src/library/base/po/.svn/text-base/pl.po.svn-base-msgstr "BŁĄD: "
./trunk/src/library/base/po/.svn/text-base/pt_BR.po.svn-base-msgstr "Erro: "
./trunk/src/library/base/po/.svn/text-base/ru.po.svn-base-msgstr "Ошибка: "
./trunk/src/library/base/po/.svn/text-base/tr.po.svn-base-msgstr "Hata: "
./trunk/src/library/base/po/.svn/text-base/zh_CN.po.svn-base-msgstr "错误: "
./trunk/src/library/base/po/.svn/text-base/zh_TW.po.svn-base-msgstr "錯誤: "

It passes the following tests:

LANG=en_US.UTF-8 prove -vl t/08-errors.t
LANG=da_DK.UTF-8 prove -vl t/08-errors.t
LANG=de_DE.UTF-8 prove -vl t/08-errors.t
LANG=fr_FR.UTF-8 prove -vl t/08-errors.t
LANG=ja_JP.UTF-8 prove -vl t/08-errors.t
LANG=ko_KR.UTF-8 prove -vl t/08-errors.t
# locale nn wasn't available on my system
LANG=pl_PL.UTF-8 prove -vl t/08-errors.t
LANG=pt_BR.UTF-8 prove -vl t/08-errors.t
LANG=ru_RU.UTF-8 prove -vl t/08-errors.t
LANG=tr_TR.UTF-8 prove -vl t/08-errors.t
LANG=zh_CN.UTF-8 prove -vl t/08-errors.t
LANG=zh_TW.UTF-8 prove -vl t/08-errors.t

This is not a perfect solution as discussed in issue #3, since it will not work for new translations that may appear in the future (but it will be easy to add them).