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 [email protected]. 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

你可能感兴趣的:(PostgreSQL,emacs,Go)