我正在尝试将en_SG
翻译添加到 R 包中,但遇到了 gettext 错误,并且我没有看到任何有关问题的来源:
list.files('po')
# [1] "R-myPkg.pot"
# [2] "R-en_SG.po"
tools::update_pkg_po('.')
有输出:
R-en_SG:. done.
msgfmt: po/R-en_SG.po: warning: PO file header missing or invalid
warning: charset conversion will not work
msgfmt: found 1 fatal error
Warning in tools::update_pkg_po(".") :
running msgfmt on R-en_SG.po failed
R-en@quot:
2 translated messages.
我到底错过了什么?