mime类型设置 linux,linux – 用于设置MIME类型的xgettext,msginit,msgfmt序列的命令或选项?...

通过手动编辑模板文件中的MIME Con​​tent-Type字符集来更正

msgfmt “invalid multibyte sequence” error on a Polish text.是否有一些用于设置MIME类型的xgettext,msginit,msgfmt序列的命令或选项?

cat >plt.cxx <

// plt.cxx

#include

#include

#include

int main (){

setlocale(LC_ALL, "");

bindtextdomain("plt", ".");

textdomain( "plt");

std::cout << gettext("Invalid input. Enter a string at least 20 characters long.") << std::endl;

}

EOF

g++ -o plt plt.cxx

xgettext --package-name plt --package-version 1.2 --default-domain plt --output plt.pot plt.cxx

sed --in-place plt.pot --expression='s/CHARSET/UTF-8/'

msginit --no-translator --locale pl_PL --output-file plt_polish.po --input plt.pot

sed --in-place plt_polish.po --expression='/#: /,$s/""/"Nieprawidłowo wprowadzone dane. Wprowadź ciąg przynajmniej 20 znaków."/'

mkdir --parents ./pl_PL.utf8/LC_MESSAGES

msgfmt --check --verbose --output-file ./pl_PL.utf8/LC_MESSAGES/plt.mo plt_polish.po

LANGUAGE=pl_PL.utf8 ./plt

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值