在 節 1.1, “快速上手” 的步驟還必須打開 textproc/docproj port TRANSLATOR
選項。如果沒有打開這個選項,請打開選項後,重新安裝 port。
#
cd /usr/ports/textproc/docproj
#
make config
#
make clean deinstall install clean
這個範例示範如何建立Leap Seconds 短文的西班牙文翻譯
編輯翻譯檔案需要PO編輯器。這個範例使用editors/poedit。
#
cd /usr/ports/editors/poedit
#
make install clean
第一次建立新的翻譯時,目錄結構和 Makefile
必須建立或是從英文版複製過來。
建立新翻譯的目錄。英文文章原始碼位於 ~/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/
翻譯文件公有兩個步驟:將可翻譯的字串從原始文件提去出來,然後翻譯這些字串。重複這些步驟,直到翻譯者認為文件的翻譯部份已經足夠用來產生可讀的翻譯文件。
從英文的原始文件提取字串到 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>。