準備要提交的新翻譯。這包含新增檔案到版本控制系統,對檔案設定額外的屬性,並建立 diff 來提交。
範例中產生的 diff 檔可以被附加到 documentation bug report 或 code review 。
增加 FreeBSD 版本字串註解到 PO 檔的第一行:
#$FreeBSD: release/11.0.0/zh_TW.UTF-8/books/fdp-primer/book.xml 48972 2016-06-21 01:19:43Z kevlo $
增加 Makefile
、PO 檔和產生的 XML 翻譯到版本控制系統:
%
cd ~/doc/es_ES.ISO8859-1/articles/nanobsd/
%
ls
Makefile article.xml es_ES.po%
svn add Makefile article.xml es_ES.po
A Makefile A article.xml A es_ES.po
設定這些檔案的 Subversion svn:keywords
屬性到 FreeBSD=%H
,讓提交時 $FreeBSD: release/11.0.0/zh_TW.UTF-8/books/fdp-primer/book.xml 48972 2016-06-21 01:19:43Z kevlo $
字串可以被展開成路徑、版本、日期和作者。
%
svn propset svn:keywords FreeBSD=%H Makefile article.xml es_ES.po
property 'svn:keywords' set on 'Makefile' property 'svn:keywords' set on 'article.xml' property 'svn:keywords' set on 'es_ES.po'
設定檔案的MIME 類型。書籍和文章是 text/xml
,PO 檔是 text/x-gettext-translation
。
%
svn propset svn:mime-type text/x-gettext-translation es_ES.po
property 'svn:mime-type' set on 'es_ES.po'%
svn propset svn:mime-type text/xml article.xml
property 'svn:mime-type' set on 'article.xml'
從 ~/doc/
建立這些新檔案的 diff,讓檔名顯示完整的路徑。這可以幫助提交者辨識目標語系目錄。
%
cd ~/doc
svn diff es_ES.ISO8859-1/articles/nanobsd/ > /tmp/es_nanobsd.diff
增加 FreeBSD 版本字串註解到 PO 檔的第一行:
#$FreeBSD: release/11.0.0/zh_TW.UTF-8/books/fdp-primer/book.xml 48972 2016-06-21 01:19:43Z kevlo $
增加 Makefile
、PO 檔和產生的 XML 翻譯到版本控制系統:
%
cd ~/doc/ko_KR.UTF-8/articles/explaining-bsd/
%
ls
Makefile article.xml ko_KR.po%
svn add Makefile article.xml ko_KR.po
A Makefile A article.xml A ko_KR.po
設定這些檔案的 Subversion svn:keywords
屬性到 FreeBSD=%H
,讓提交時 $FreeBSD: release/11.0.0/zh_TW.UTF-8/books/fdp-primer/book.xml 48972 2016-06-21 01:19:43Z kevlo $
字串可以被展開成路徑、版本、日期和作者。
%
svn propset svn:keywords FreeBSD=%H Makefile article.xml ko_KR.po
property 'svn:keywords' set on 'Makefile' property 'svn:keywords' set on 'article.xml' property 'svn:keywords' set on 'ko_KR.po'
設定檔案的 MIME 類型。因為這些檔案使用 UTF-8 字元集,這也需要指定。為了防止版本控制系統將這些檔案誤認為二進位資料,fbsd:notbinary
屬性也需要設定。
%
svn propset svn:mime-type 'text/x-gettext-translation;charset=UTF-8' ko_KR.po
property 'svn:mime-type' set on 'ko_KR.po'%
svn propset fbsd:notbinary yes ko_KR.po
property 'fbsd:notbinary' set on 'ko_KR.po'%
svn propset svn:mime-type 'text/xml;charset=UTF-8' article.xml
property 'svn:mime-type' set on 'article.xml'%
svn propset fbsd:notbinary yes article.xml
property 'fbsd:notbinary' set on 'article.xml'
從 ~/doc/
建立這些新檔案的 diff。
%
cd ~/doc
svn diff ko_KR.UTF-8/articles/explaining-bsd > /tmp/ko-explaining.diff
本文及其他文件,可由此下載: ftp://ftp.FreeBSD.org/pub/FreeBSD/doc/。
若有 FreeBSD 方面疑問,請先閱讀
FreeBSD 相關文件,如不能解決的話,再洽詢
<questions@FreeBSD.org>。
關於本文件的問題,請洽詢
<doc@FreeBSD.org>。