This is an archive of past FreeBSD releases; it's part of the FreeBSD Documentation Archive.

12.7. 提交新翻譯

12.7. 提交新翻譯

準備要提交的新翻譯。這包含新增檔案到版本控制系統,對檔案設定額外的屬性,並建立 diff 來提交。

範例中產生的 diff 檔可以被附加到 文件問題回報 (Documentation bug report)程式碼審查 (Code review)

範例 12.6. NanoBSD 文章的西班牙文翻譯
  1. 增加 FreeBSD 版本字串註解到 PO 檔的第一行:

    #$FreeBSD: release/11.2.0/zh_TW.UTF-8/books/fdp-primer/book.xml 50507 2017-07-17 06:35:59Z rcyu $
  2. 增加 MakefilePO 檔和產生的 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
  3. 在這些檔案設定 Subversion svn:keywords 屬性為 FreeBSD=%H$FreeBSD: release/11.2.0/zh_TW.UTF-8/books/fdp-primer/book.xml 50507 2017-07-17 06:35:59Z rcyu $ 字串可以在提交時被展開成為路徑、修訂、日期以及作者:

    % 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'
  4. 設定檔案的 MIME 類型。書籍和文章是 text/xmlPO 檔是 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'
  5. ~/doc/ 建立這些新檔案的 diff,讓檔名顯示完整的路徑。這可以幫助提交者辨識目標語系目錄。

    % cd ~/doc
    svn diff es_ES.ISO8859-1/articles/nanobsd/ > /tmp/es_nanobsd.diff

範例 12.7. Explaining-BSD 文章的韓文 UTF-8 翻譯
  1. 增加 FreeBSD 版本字串註解到 PO 檔的第一行:

    #$FreeBSD: release/11.2.0/zh_TW.UTF-8/books/fdp-primer/book.xml 50507 2017-07-17 06:35:59Z rcyu $
  2. 增加 MakefilePO 檔和產生的 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
  3. 在這些檔案設定 Subversion svn:keywords 屬性為 FreeBSD=%H$FreeBSD: release/11.2.0/zh_TW.UTF-8/books/fdp-primer/book.xml 50507 2017-07-17 06:35:59Z rcyu $ 字串可以在提交時被展開成為路徑、修訂、日期以及作者:

    % 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'
  4. 設定檔案的 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'
  5. ~/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>。