The procedure shown in
節 1.2, “快速上手” is assumed to have
already been performed, but the TRANSLATOR
option must be enabled in the
textproc/docproj port. If that
option was not enabled, display the options menu and enable
it, then reinstall the port:
#
cd /usr/ports/textproc/docproj
#
make config
#
make clean deinstall install clean
This example shows the creation of a Spanish translation of the short Leap Seconds article.
編輯翻譯檔案需要PO編輯器。這個範例使用editors/poedit。
#
cd /usr/ports/editors/poedit
#
make install clean
When a new translation is first created, the directory
structure and Makefile
must be created or
copied from the English original:
建立新翻譯的目錄。英文文章原始碼位於 ~/doc/en_US.ISO8859-1/articles/leap-seconds/
。西班牙文翻譯將會放在 ~/doc/es_ES.ISO8859-1/articles/leap-seconds/
。除了語系目錄的名稱外,其他路徑相同。
%
svn mkdir --parents ~/doc/es_ES.ISO8859-1/articles/leap-seconds/
從原始文件處將 Makefile
複製到翻譯目錄。
%
svn cp ~/doc/en_US.ISO8859-1/articles/leap-seconds/Makefile \ ~/doc/es_ES.ISO8859-1/articles/leap-seconds/
Translating a document consists of two steps: extracting translatable strings from the original document, and entering translations for those strings. These steps are repeated until the translator feels that enough of the document has been translated to produce a usable translated document.
從英文的原始文件提取字串到 PO 檔:
%
cd ~/doc/es_ES.ISO8859-1/articles/leap-seconds/
%
make po
使用 PO 編輯器將翻譯輸入 PO 檔。有幾個不同的編輯器可以使用。這裡用的是 editors/poedit 的 poedit
。
PO 檔名是兩個字元的語系碼後面接底線和兩個字元的區域碼。以西班牙語來說,檔名是 es_ES.po
。
%
poedit es_ES.po
本文及其他文件,可由此下載: ftp://ftp.FreeBSD.org/pub/FreeBSD/doc/。
若有 FreeBSD 方面疑問,請先閱讀
FreeBSD 相關文件,如不能解決的話,再洽詢
<questions@FreeBSD.org>。
關於本文件的問題,請洽詢
<doc@FreeBSD.org>。