nls 编译过程 The Complicated Way

The Complicated Way
This approach is for those who have a PostgreSQL development source tree and all the gettext utilities. In that case you can skip the extra downloads.

$ ./configure --enable-nls
Make sure you have the required software tools.
Decide for which component you want to translate the messages. Change to that directory (e.g., src/bin/psql).
If there is no nls.mk file there, this component has not been prepared for NLS. Go back to 2.
$ ls po/*.po
If this matches one of the languages you want to work on, skip ahead to 8.
$ gmake init-po
$ cp po/COMPONENT.pot po/LL.po
(COMPONENT will be obvious, as there will be only one .pot file. LL is the code of your language.)
Add LL to AVAIL_LANGUAGES in nls.mk (in alphabetical order, please).
Edit the comments at the top of the .po file. Then go to 9.
$ gmake update-po LANGUAGES=LL
This will merge the existing translations with any new messages that might be in the program sources. It will also create a backup of the LL.po file named LL.po.old, which you need to keep around to create a patch later on. You could also
$ cp po/LL.po po/LL.po.old
at this point to create the backup file only.
Edit the .po file. (I.e., do the translation work.)
Repeat 9 to exhaustion.
$ gmake maintainer-check
Fix any errors this might point out. (If you use the Emacs PO mode, press V on occasion, it does the same thing.)
If you made significant changes, add your name to the top of the file, below any other names.
Send the new PO file to pgsql-patches@postgresql.org. Also make sure the nls.mk file gets changed appropriately. Please do not send a patch for the PO file or put the PO file in an archive with other files. That creates unnecessary work for the person installing your file.
Go to step 2.

话外音:

 用createdb -E UNICODE 
   
    client_encoding   用 GBK

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值