Changeset View
Changeset View
Standalone View
Standalone View
head/zh_TW.UTF-8/books/fdp-primer/book.xml
- This file is larger than 256 KB, so syntax highlighting is disabled by default.
Show First 20 Lines • Show All 60 Lines • ▼ Show 20 Lines | |||||
<book xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" version="5.0" xml:lang="zh_TW"> | <book xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" version="5.0" xml:lang="zh_TW"> | ||||
<info><title>FreeBSD 文件計畫入門書</title> | <info><title>FreeBSD 文件計畫入門書</title> | ||||
<author><orgname>FreeBSD 文件計劃</orgname></author> | <author><orgname>FreeBSD 文件計劃</orgname></author> | ||||
<copyright><year>1998</year> <year>1999</year> <year>2000</year> <year>2001</year> <year>2002</year> <year>2003</year> <year>2004</year> <year>2005</year> <year>2006</year> <year>2007</year> <year>2008</year> <year>2009</year> <year>2010</year> <year>2011</year> <year>2012</year> <year>2013</year> <year>2014</year> <holder role="mailto:doceng@FreeBSD.org">DocEng</holder></copyright> | <copyright><year>1998</year> <year>1999</year> <year>2000</year> <year>2001</year> <year>2002</year> <year>2003</year> <year>2004</year> <year>2005</year> <year>2006</year> <year>2007</year> <year>2008</year> <year>2009</year> <year>2010</year> <year>2011</year> <year>2012</year> <year>2013</year> <year>2014</year> <holder role="mailto:doceng@FreeBSD.org">DocEng</holder></copyright> | ||||
<pubdate role="rcs">$FreeBSD$</pubdate> | <pubdate role="rcs" xml:lang="en">$FreeBSD$</pubdate> | ||||
<releaseinfo>$FreeBSD$</releaseinfo> | <releaseinfo xml:lang="en">$FreeBSD$</releaseinfo> | ||||
<legalnotice xml:id="legalnotice"> | <legalnotice xml:id="legalnotice"> | ||||
<title>版權</title> | <title>版權</title> | ||||
<para xml:lang="en">Redistribution and use in source (XML DocBook) and 'compiled' | <para xml:lang="en">Redistribution and use in source (XML DocBook) and 'compiled' | ||||
forms (XML, HTML, PDF, PostScript, RTF and so forth) with or without | forms (XML, HTML, PDF, PostScript, RTF and so forth) with or without | ||||
modification, are permitted provided that the following conditions are | modification, are permitted provided that the following conditions are | ||||
▲ Show 20 Lines • Show All 231 Lines • ▼ Show 20 Lines | <listitem> | ||||
<para>修改文件</para> | <para>修改文件</para> | ||||
</listitem> | </listitem> | ||||
<listitem> | <listitem> | ||||
<para>提交修改以供審核並納入 FreeBSD 文件</para> | <para>提交修改以供審核並納入 FreeBSD 文件</para> | ||||
</listitem> | </listitem> | ||||
</itemizedlist> | </itemizedlist> | ||||
<sect1 xml:id="overview-doc"> | |||||
<title>FreeBSD 文件組</title> | |||||
<para><acronym>FDP</acronym> 負責四類 FreeBSD 文件</para> | |||||
<itemizedlist> | |||||
<listitem> | |||||
<para><emphasis>使用手冊</emphasis>: 使用手冊主要是給 FreeBSD 使用者提供詳盡的線上參考資料。</para> | |||||
</listitem> | |||||
<listitem> | |||||
<para><emphasis>FAQ</emphasis> 主要是收集在各郵件論壇或論壇會常問到或有可能會問到的 FreeBSD 相關問題與答案 。 (簡單講,就是『問答集』格式) 通常會擺在這裡面的問答格式,不會放太長的詳細內容。</para> | |||||
</listitem> | |||||
<listitem> | |||||
<para><emphasis>線上手冊 ( manual pages )</emphasis>:英文版的系統 manual 並不是由 <acronym>FDP</acronym> 所撰寫的,因為它們是屬於 base system 的部份。 然而,<acronym>FDP</acronym> 可以修改這些文件,來讓這些文件寫得更清楚,甚至是勘正錯誤的地方。</para> | |||||
</listitem> | |||||
<listitem> | |||||
<para><emphasis>網站</emphasis>: 這是 FreeBSD 在網路上的主要部份,位於 <link xlink:href="http://www.freebsd.org/index.html">http://www.FreeBSD.org/</link> 以及許多其他 mirror 站。這網站是許多人第一次接觸 FreeBSD 的地方</para> | |||||
</listitem> | |||||
</itemizedlist> | |||||
<para>翻譯團隊負責翻譯使用手冊和網站到不同的語言。線上手冊目前並未翻譯</para> | |||||
<para>FreeBSD 網站、使用手冊、和 <acronym>FAQ</acronym> 的文件原始碼可以在 <literal>https://svn.FreeBSD.org/doc/</literal> 的文件庫取得。</para> | |||||
<para>線上手冊的原始碼則是在 <literal>https://svn.FreeBSD.org/base/</literal> 的原始碼庫可以取得。</para> | |||||
<para>文件提交訊息可以用 <command>svn log</command> 察看。 提交訊息也會保存在<uri xlink:href="http://lists.FreeBSD.org/mailman/listinfo/svn-doc-all">http://lists.FreeBSD.org/mailman/listinfo/svn-doc-all</uri>。</para> | |||||
<para>這些儲存庫的網頁版位於<link xlink:href="https://svnweb.FreeBSD.org/doc/"/> 和 <link xlink:href="https://svnweb.FreeBSD.org/base/"/>。</para> | |||||
<para>許多人會寫 FreeBSD 的教學文件或是 how-to 文章。有些保存在 <acronym>FDP</acronym> 的檔案中。其他一些文件則是作者希望放在他處。<acronym>FDP</acronym> 會盡力提供這些文件的連結。</para> | |||||
</sect1> | |||||
<sect1 xml:id="overview-quick-start"> | <sect1 xml:id="overview-quick-start"> | ||||
<title>快速上手</title> | <title>快速上手</title> | ||||
<para>在編輯 FreeBSD 文件之前,有一些準備工作要做。 首先,請訂閱 <link xlink:href="http://lists.FreeBSD.org/mailman/listinfo/freebsd-doc">FreeBSD 文件計劃郵件論壇</link>。 有些團隊成員也會出現在<link xlink:href="http://www.efnet.org/">EFnet</link>的<literal>#bsddocs</literal> <acronym>IRC</acronym> 頻道。這些人可以幫忙解決文件相關的問題。</para> | <para>在編輯 FreeBSD 文件之前,有一些準備工作要做。 首先,請訂閱 <link xlink:href="http://lists.FreeBSD.org/mailman/listinfo/freebsd-doc">FreeBSD 文件計劃郵件論壇</link>。 有些團隊成員也會出現在<link xlink:href="http://www.efnet.org/">EFnet</link>的<literal>#bsddocs</literal> <acronym>IRC</acronym> 頻道。這些人可以幫忙解決文件相關的問題。</para> | ||||
<procedure> | <procedure> | ||||
<step> | <step> | ||||
<para>安裝 <package>textproc/docproj</package> 套件或 port。這個meta-port 會安裝所有編輯和建構 FreeBSD 文件需要的軟體。</para> | <para>安裝 <package>textproc/docproj</package> 套件或 port。這個meta-port 會安裝所有編輯和建構 FreeBSD 文件需要的軟體。</para> | ||||
▲ Show 20 Lines • Show All 58 Lines • ▼ Show 20 Lines | <prompt>%</prompt> <userinput>svn diff > <replaceable>bsdinstall</replaceable>.diff.txt</userinput></screen> | ||||
<para>設一個可辨識的檔名。如上例中,是使用手冊的<filename>bsdinstall</filename> 部份的修改。</para> | <para>設一個可辨識的檔名。如上例中,是使用手冊的<filename>bsdinstall</filename> 部份的修改。</para> | ||||
</step> | </step> | ||||
<step> | <step> | ||||
<para>使用網頁版 <link xlink:href="@@URL_RELPREFIX@@/support.html#gnats">Problem Report</link> 系統提交 diff 檔。 如果使用網頁版,請輸入<emphasis>[修正檔] <replaceable>問題簡短描述</replaceable></emphasis>的概要 。選擇 <literal>docs</literal> 分類和 <literal>doc-bug</literal>類別。在訊息的主體中,輸入修正的簡短描述和其他相關的重要的細節。使用<guibutton>[!Browse...!]</guibutton> 按鈕來附加 diff 檔。</para> | <para>使用網頁版 <link xlink:href="@@URL_RELPREFIX@@/support.html#gnats">Problem Report</link> 系統提交 diff 檔。 如果使用網頁版,請輸入<emphasis>[修正檔] <replaceable>問題簡短描述</replaceable></emphasis>的概要 。選擇 <literal>docs</literal> 分類和 <literal>doc-bug</literal>類別。在訊息的主體中,輸入修正的簡短描述和其他相關的重要的細節。使用<guibutton>[!Browse...!]</guibutton> 按鈕來附加 diff 檔。</para> | ||||
</step> | </step> | ||||
</procedure> | </procedure> | ||||
</sect1> | </sect1> | ||||
<sect1 xml:id="overview-doc"> | |||||
<title>FreeBSD 文件組</title> | |||||
<para><acronym>FDP</acronym> 負責四類 FreeBSD 文件</para> | |||||
<itemizedlist> | |||||
<listitem> | |||||
<para><emphasis>使用手冊</emphasis>: 使用手冊主要是給 FreeBSD 使用者提供詳盡的線上參考資料。</para> | |||||
</listitem> | |||||
<listitem> | |||||
<para><emphasis>FAQ</emphasis> 主要是收集在各郵件論壇或論壇會常問到或有可能會問到的 FreeBSD 相關問題與答案 。 (簡單講,就是『問答集』格式) 通常會擺在這裡面的問答格式,不會放太長的詳細內容。</para> | |||||
</listitem> | |||||
<listitem> | |||||
<para><emphasis>線上手冊 ( manual pages )</emphasis>:英文版的系統 manual 並不是由 <acronym>FDP</acronym> 所撰寫的,因為它們是屬於 base system 的部份。 然而,<acronym>FDP</acronym> 可以修改這些文件,來讓這些文件寫得更清楚,甚至是勘正錯誤的地方。</para> | |||||
</listitem> | |||||
<listitem> | |||||
<para><emphasis>網站</emphasis>: 這是 FreeBSD 在網路上的主要部份,位於 <link xlink:href="http://www.freebsd.org/index.html">http://www.FreeBSD.org/</link> 以及許多其他 mirror 站。這網站是許多人第一次接觸 FreeBSD 的地方</para> | |||||
</listitem> | |||||
</itemizedlist> | |||||
<para>翻譯團隊負責翻譯使用手冊和網站到不同的語言。線上手冊目前並未翻譯</para> | |||||
<para>FreeBSD 網站、使用手冊、和 <acronym>FAQ</acronym> 的文件原始碼可以在 <literal>https://svn.FreeBSD.org/doc/</literal> 的文件庫取得。</para> | |||||
<para>線上手冊的原始碼則是在 <literal>https://svn.FreeBSD.org/base/</literal> 的原始碼庫可以取得。</para> | |||||
<para>文件提交訊息可以用 <command>svn log</command> 察看。 提交訊息也會保存在<uri xlink:href="http://lists.FreeBSD.org/mailman/listinfo/svn-doc-all">http://lists.FreeBSD.org/mailman/listinfo/svn-doc-all</uri>。</para> | |||||
<para>這些儲存庫的網頁版位於<link xlink:href="https://svnweb.FreeBSD.org/doc/"/> 和 <link xlink:href="https://svnweb.FreeBSD.org/base/"/>。</para> | |||||
<para>許多人會寫 FreeBSD 的教學文件或是 how-to 文章。有些保存在 <acronym>FDP</acronym> 的檔案中。其他一些文件則是作者希望放在他處。<acronym>FDP</acronym> 會盡力提供這些文件的連結。</para> | |||||
</sect1> | |||||
</chapter> | </chapter> | ||||
<!-- Copyright (c) 1998, 1999 Nik Clayton, All rights reserved. | <!-- Copyright (c) 1998, 1999 Nik Clayton, All rights reserved. | ||||
Redistribution and use in source (SGML DocBook) and 'compiled' forms | Redistribution and use in source (SGML DocBook) and 'compiled' forms | ||||
(SGML, HTML, PDF, PostScript, RTF and so forth) with or without | (SGML, HTML, PDF, PostScript, RTF and so forth) with or without | ||||
modification, are permitted provided that the following conditions | modification, are permitted provided that the following conditions | ||||
▲ Show 20 Lines • Show All 43 Lines • ▼ Show 20 Lines | <varlistentry> | ||||
<term><acronym>XHTML</acronym> <acronym>DTD</acronym> (<package>textproc/xhtml</package>)</term> | <term><acronym>XHTML</acronym> <acronym>DTD</acronym> (<package>textproc/xhtml</package>)</term> | ||||
<listitem> | <listitem> | ||||
<para><acronym>XHTML</acronym> 是全球資訊網的一種標記語言,也是整個 FreeBSD 網站所使用的格式。</para> | <para><acronym>XHTML</acronym> 是全球資訊網的一種標記語言,也是整個 FreeBSD 網站所使用的格式。</para> | ||||
</listitem> | </listitem> | ||||
</varlistentry> | </varlistentry> | ||||
<varlistentry> | <varlistentry> | ||||
<term>DocBook <acronym>DTD</acronym> (<package>textproc/docbook-xml-450</package>)</term> | <term xml:lang="en">DocBook <acronym>DTD</acronym> (<package>textproc/docbook-xml</package>)</term> | ||||
<listitem> | <listitem> | ||||
<para>DocBook 設計來製作技術文件的標記語言版本。FreeBSD 文件是以 DocBook 來撰寫。</para> | <para>DocBook 設計來製作技術文件的標記語言版本。FreeBSD 文件是以 DocBook 來撰寫。</para> | ||||
</listitem> | </listitem> | ||||
</varlistentry> | </varlistentry> | ||||
<varlistentry> | <varlistentry> | ||||
<term>ISO 8879 entities (<package>textproc/iso8879</package>)</term> | <term>ISO 8879 entities (<package>textproc/iso8879</package>)</term> | ||||
▲ Show 20 Lines • Show All 6,459 Lines • ▼ Show 20 Lines | <prompt>%</prompt> <userinput>gzip -9 swedish-docs.tar</userinput></screen> | ||||
<para>翻譯成果內要不要附上一些其他訊息呢?</para> | <para>翻譯成果內要不要附上一些其他訊息呢?</para> | ||||
</question> | </question> | ||||
<answer> | <answer> | ||||
<para>要。</para> | <para>要。</para> | ||||
<para>每份英文版原稿的開頭,通常會有像下面的內容:</para> | <para>每份英文版原稿的開頭,通常會有像下面的內容:</para> | ||||
<programlisting><!-- | <programlisting xml:lang="en"><!-- | ||||
The FreeBSD Documentation Project | The FreeBSD Documentation Project | ||||
$FreeBSD$ | $FreeBSD$ | ||||
--></programlisting> | --></programlisting> | ||||
<para>實際上的內容可能稍有不同,但每份原稿都會附上 $FreeBSD$ 這一行以及<literal>The FreeBSD Documentation Project</literal> 宣告。 請注意:$FreeBSD 開頭的這行是會由 Subversion 隨著每次異動而自動更改的, 所以,新檔案的話請保持原狀(也就是只要寫 $FreeBSD$ 就好了)。</para> | <para xml:lang="en">The exact boilerplate may change, but it will always | ||||
include a $FreeBSD$ line and the phrase | |||||
<literal>The FreeBSD Documentation Project</literal>. | |||||
Note that the $FreeBSD part is expanded automatically | |||||
by Subversion, so it should be empty (just | |||||
<literal>$FreeBSD$</literal>) for new | |||||
files.</para> | |||||
<para>翻譯文件中,必須都要有 $FreeBSD$ 這行,並且把 <literal>FreeBSD Documentation Project</literal> 這行改為 <literal>The FreeBSD <replaceable>你的語系</replaceable> Documentation Project</literal>。</para> | <para xml:lang="en">Your translated documents should include their own | ||||
$FreeBSD$ line, and change the | |||||
<literal>FreeBSD Documentation Project</literal> line to | |||||
<literal>The FreeBSD <replaceable>language</replaceable> | |||||
Documentation Project</literal>.</para> | |||||
<para>此外,還必須加上第三行來指出你所翻譯的,到底是以英文版原稿的哪一版本為母本所做的翻譯。</para> | <para>此外,還必須加上第三行來指出你所翻譯的,到底是以英文版原稿的哪一版本為母本所做的翻譯。</para> | ||||
<para>因此呢,西班牙文版(Spanish)的檔案開頭應該是長像這樣:</para> | <para>因此呢,西班牙文版(Spanish)的檔案開頭應該是長像這樣:</para> | ||||
<programlisting><!-- | <programlisting xml:lang="en"><!-- | ||||
The FreeBSD Spanish Documentation Project | The FreeBSD Spanish Documentation Project | ||||
$FreeBSD$ | $FreeBSD$ | ||||
Original revision: r38674 | Original revision: r38674 | ||||
--></programlisting> | --></programlisting> | ||||
</answer> | </answer> | ||||
</qandaentry> | </qandaentry> | ||||
</qandaset> | </qandaset> | ||||
Show All 12 Lines | <sect1 xml:id="po-translations-introduction"> | ||||
<title xml:lang="en">Introduction</title> | <title xml:lang="en">Introduction</title> | ||||
<para><link xlink:href="http://www.gnu.org/software/gettext/"><acronym>GNU</acronym> <application>gettext</application></link> 系統提供翻譯者一個簡單的方法來建立和維護文件的翻譯。翻譯的字串從原始文件題取出來到<acronym>PO</acronym> (Portable Object) 檔。字串的翻譯用另外的編輯器輸入。翻譯的字串可以直接使用,或是編譯成原始文件的完整翻譯版本。</para> | <para><link xlink:href="http://www.gnu.org/software/gettext/"><acronym>GNU</acronym> <application>gettext</application></link> 系統提供翻譯者一個簡單的方法來建立和維護文件的翻譯。翻譯的字串從原始文件題取出來到<acronym>PO</acronym> (Portable Object) 檔。字串的翻譯用另外的編輯器輸入。翻譯的字串可以直接使用,或是編譯成原始文件的完整翻譯版本。</para> | ||||
</sect1> | </sect1> | ||||
<sect1 xml:id="po-translations-quick-start"> | <sect1 xml:id="po-translations-quick-start"> | ||||
<title>快速上手</title> | <title>快速上手</title> | ||||
<para xml:lang="en">The procedure shown in | <para>在 <xref linkend="overview-quick-start"/> 的步驟還必須打開 <package role="port">textproc/docproj</package> port <literal>TRANSLATOR</literal> 選項。如果沒有打開這個選項,請打開選項後,重新安裝 port。</para> | ||||
<xref linkend="overview-quick-start"/> is assumed to have | |||||
already been performed, but the <literal>TRANSLATOR</literal> | |||||
option must be enabled in the | |||||
<package role="port">textproc/docproj</package> port. If that | |||||
option was not enabled, display the options menu and enable | |||||
it, then reinstall the port:</para> | |||||
<screen><prompt>#</prompt> <userinput>cd /usr/ports/textproc/docproj</userinput> | <screen><prompt>#</prompt> <userinput>cd /usr/ports/textproc/docproj</userinput> | ||||
<prompt>#</prompt> <userinput>make config</userinput> | <prompt>#</prompt> <userinput>make config</userinput> | ||||
<prompt>#</prompt> <userinput>make clean deinstall install clean</userinput></screen> | <prompt>#</prompt> <userinput>make clean deinstall install clean</userinput></screen> | ||||
<para xml:lang="en">This example shows the creation of a Spanish translation of | <para>這個範例示範如何建立<link xlink:href="@@URL_RELPREFIX@@/doc/en_US.ISO8859-1/articles/leap-seconds">Leap Seconds</link> 短文的西班牙文翻譯</para> | ||||
the short <link xlink:href="@@URL_RELPREFIX@@/doc/en_US.ISO8859-1/articles/leap-seconds">Leap | |||||
Seconds</link> article.</para> | |||||
<procedure xml:id="po-translations-quick-start-install-po-editor"> | <procedure xml:id="po-translations-quick-start-install-po-editor"> | ||||
<title xml:lang="en">Install a <acronym>PO</acronym> Editor</title> | <title>安裝 <acronym>PO</acronym> 編輯器</title> | ||||
<step> | <step> | ||||
<para>編輯翻譯檔案需要<acronym>PO</acronym>編輯器。這個範例使用<package role="ports">editors/poedit</package>。</para> | <para>編輯翻譯檔案需要<acronym>PO</acronym>編輯器。這個範例使用<package role="ports">editors/poedit</package>。</para> | ||||
<screen><prompt>#</prompt> <userinput>cd /usr/ports/editors/poedit</userinput> | <screen><prompt>#</prompt> <userinput>cd /usr/ports/editors/poedit</userinput> | ||||
<prompt>#</prompt> <userinput>make install clean</userinput></screen> | <prompt>#</prompt> <userinput>make install clean</userinput></screen> | ||||
</step> | </step> | ||||
</procedure> | </procedure> | ||||
<procedure xml:id="po-translations-quick-start-initial-setup"> | <procedure xml:id="po-translations-quick-start-initial-setup"> | ||||
<title xml:lang="en">Initial Setup</title> | <title>初始設定</title> | ||||
<para xml:lang="en">When a new translation is first created, the directory | <para>第一次建立新的翻譯時,目錄結構和 <filename>Makefile</filename> 必須建立或是從英文版複製過來。</para> | ||||
structure and <filename>Makefile</filename> must be created or | |||||
copied from the English original:</para> | |||||
<step> | <step> | ||||
<para>建立新翻譯的目錄。英文文章原始碼位於 <filename>~/doc/en_US.ISO8859-1/articles/leap-seconds/</filename> 。西班牙文翻譯將會放在 <filename>~/doc/es_ES.ISO8859-1/articles/leap-seconds/</filename> 。除了語系目錄的名稱外,其他路徑相同。</para> | <para>建立新翻譯的目錄。英文文章原始碼位於 <filename>~/doc/en_US.ISO8859-1/articles/leap-seconds/</filename> 。西班牙文翻譯將會放在 <filename>~/doc/es_ES.ISO8859-1/articles/leap-seconds/</filename> 。除了語系目錄的名稱外,其他路徑相同。</para> | ||||
<screen><prompt>%</prompt> <userinput>svn mkdir --parents ~/doc/es_ES.ISO8859-1/articles/leap-seconds/</userinput></screen> | <screen><prompt>%</prompt> <userinput>svn mkdir --parents ~/doc/es_ES.ISO8859-1/articles/leap-seconds/</userinput></screen> | ||||
</step> | </step> | ||||
<step> | <step> | ||||
<para>從原始文件處將 <filename>Makefile</filename> 複製到翻譯目錄。</para> | <para>從原始文件處將 <filename>Makefile</filename> 複製到翻譯目錄。</para> | ||||
<screen><prompt>%</prompt> <userinput>svn cp ~/doc/en_US.ISO8859-1/articles/leap-seconds/Makefile \ | <screen><prompt>%</prompt> <userinput>svn cp ~/doc/en_US.ISO8859-1/articles/leap-seconds/Makefile \ | ||||
~/doc/es_ES.ISO8859-1/articles/leap-seconds/</userinput></screen> | ~/doc/es_ES.ISO8859-1/articles/leap-seconds/</userinput></screen> | ||||
</step> | </step> | ||||
</procedure> | </procedure> | ||||
<procedure xml:id="po-translations-quick-start-translation"> | <procedure xml:id="po-translations-quick-start-translation"> | ||||
<title>翻譯</title> | <title>翻譯</title> | ||||
<para xml:lang="en">Translating a document consists of two steps: extracting | <para>翻譯文件公有兩個步驟:將可翻譯的字串從原始文件提去出來,然後翻譯這些字串。重複這些步驟,直到翻譯者認為文件的翻譯部份已經足夠用來產生可讀的翻譯文件。</para> | ||||
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.</para> | |||||
<step> | <step> | ||||
<para>從英文的原始文件提取字串到 <acronym>PO</acronym> 檔:</para> | <para>從英文的原始文件提取字串到 <acronym>PO</acronym> 檔:</para> | ||||
<screen><prompt>%</prompt> <userinput>cd ~/doc/es_ES.ISO8859-1/articles/leap-seconds/</userinput> | <screen><prompt>%</prompt> <userinput>cd ~/doc/es_ES.ISO8859-1/articles/leap-seconds/</userinput> | ||||
<prompt>%</prompt> <userinput>make po</userinput></screen> | <prompt>%</prompt> <userinput>make po</userinput></screen> | ||||
</step> | </step> | ||||
<step> | <step> | ||||
<para>使用 <acronym>PO</acronym> 編輯器將翻譯輸入 <acronym>PO</acronym> 檔。有幾個不同的編輯器可以使用。這裡用的是 <package role="port">editors/poedit</package> 的 <filename>poedit</filename> 。</para> | <para>使用 <acronym>PO</acronym> 編輯器將翻譯輸入 <acronym>PO</acronym> 檔。有幾個不同的編輯器可以使用。這裡用的是 <package role="port">editors/poedit</package> 的 <filename>poedit</filename> 。</para> | ||||
<para><acronym>PO</acronym> 檔名是兩個字元的語系碼後面接底線和兩個字元的區域碼。以西班牙語來說,檔名是 <filename>es_ES.po</filename> 。</para> | <para><acronym>PO</acronym> 檔名是兩個字元的語系碼後面接底線和兩個字元的區域碼。以西班牙語來說,檔名是 <filename>es_ES.po</filename> 。</para> | ||||
<screen><prompt>%</prompt> <userinput>poedit es_ES.po</userinput></screen> | <screen><prompt>%</prompt> <userinput>poedit es_ES.po</userinput></screen> | ||||
</step> | </step> | ||||
</procedure> | </procedure> | ||||
<procedure xml:id="po-translations-quick-generating-a-translated-document"> | <procedure xml:id="po-translations-quick-generating-a-translated-document"> | ||||
<title xml:lang="en">Generating a Translated Document</title> | <title>產生翻譯文件</title> | ||||
<step> | <step> | ||||
<para>產生翻譯文件</para> | <para>產生翻譯文件</para> | ||||
<screen><prompt>%</prompt> <userinput>cd ~/doc/es_ES.ISO8859-1/articles/leap-seconds/</userinput> | <screen><prompt>%</prompt> <userinput>cd ~/doc/es_ES.ISO8859-1/articles/leap-seconds/</userinput> | ||||
<prompt>%</prompt> <userinput>make tran</userinput></screen> | <prompt>%</prompt> <userinput>make tran</userinput></screen> | ||||
<para>產生的文件名稱與英文原始文件名稱相符,文章通常是 <filename>article.xml</filename> ,書籍是 <filename>book.xml</filename> 。</para> | <para>產生的文件名稱與英文原始文件名稱相符,文章通常是 <filename>article.xml</filename> ,書籍是 <filename>book.xml</filename> 。</para> | ||||
</step> | </step> | ||||
<step> | <step> | ||||
<para>可以轉換成 <acronym>HTML</acronym> 來檢查產生的檔案,並用瀏覽器來察看。</para> | <para>可以轉換成 <acronym>HTML</acronym> 來檢查產生的檔案,並用瀏覽器來察看。</para> | ||||
<screen><prompt>%</prompt> <userinput>make FORMATS=html</userinput> | <screen><prompt>%</prompt> <userinput>make FORMATS=html</userinput> | ||||
<prompt>%</prompt> <userinput>firefox article.html</userinput></screen> | <prompt>%</prompt> <userinput>firefox article.html</userinput></screen> | ||||
</step> | </step> | ||||
</procedure> | </procedure> | ||||
</sect1> | </sect1> | ||||
<sect1 xml:id="po-translations-creating"> | <sect1 xml:id="po-translations-creating"> | ||||
<title>建立新翻譯</title> | <title>建立新翻譯</title> | ||||
<para xml:lang="en">The first step to creating a new translated document is | <para>建立新翻譯文件的第一步是找到或建立一個目錄來放它。FreeBSD 將翻譯文件放在子目錄,用語系和區域以<filename><replaceable>語系</replaceable>_<replaceable>區域</replaceable></filename>來命名。<replaceable>語系</replaceable> 是小寫的兩個字元碼。接著是底線和兩個字元的大寫 <replaceable>REGION</replaceable> 碼。</para> | ||||
locating or creating a directory to hold it. FreeBSD puts | |||||
translated documents in a subdirectory named for their | |||||
language and region in the format | |||||
<filename><replaceable>lang</replaceable>_<replaceable>REGION</replaceable></filename>. | |||||
<replaceable>lang</replaceable> is a two-character lowercase | |||||
code. It is followed by an underscore character and then the | |||||
two-character uppercase <replaceable>REGION</replaceable> | |||||
code.</para> | |||||
<table xml:id="po-translations-language-names" frame="none"> | <table xml:id="po-translations-language-names" frame="none"> | ||||
<title>語系名稱</title> | <title>語系名稱</title> | ||||
<tgroup cols="5"> | <tgroup cols="5"> | ||||
<thead> | <thead> | ||||
<row> | <row> | ||||
<entry>語言</entry> | <entry>語言</entry> | ||||
▲ Show 20 Lines • Show All 182 Lines • ▼ Show 20 Lines | </tbody> | ||||
<para>將目錄名稱組合起來就是文章或書的完整路徑。例如,NanoBSD 文章的法語翻譯在 <filename>~/doc/fr_FR.ISO8859-1/articles/nanobsd/</filename> 。而使用手冊的蒙古文翻譯在<filename>~/doc/mn_MN.UTF-8/books/handbook/</filename> 。</para> | <para>將目錄名稱組合起來就是文章或書的完整路徑。例如,NanoBSD 文章的法語翻譯在 <filename>~/doc/fr_FR.ISO8859-1/articles/nanobsd/</filename> 。而使用手冊的蒙古文翻譯在<filename>~/doc/mn_MN.UTF-8/books/handbook/</filename> 。</para> | ||||
<para>當翻譯到一個新語系時必須建立一個新的語系目錄。如果語系目錄已經存在,那只需要有 <filename>articles/</filename> 或 <filename>books/</filename> 的子目錄。</para> | <para>當翻譯到一個新語系時必須建立一個新的語系目錄。如果語系目錄已經存在,那只需要有 <filename>articles/</filename> 或 <filename>books/</filename> 的子目錄。</para> | ||||
<para>FreeBSD 文件的編譯是由同一個目錄的 <filename>Makefile</filename> 控制。簡單的文章可以從原始的英語目錄直接複製 <filename>Makefile</filename> 過來。書籍的翻譯流程結合多個獨立的 <filename>book.xml</filename> 和 <filename>chapter.xml</filename> 成為一個檔案, 所以書籍翻譯的 <filename>Makefile</filename> 必須複製並修改。</para> | <para>FreeBSD 文件的編譯是由同一個目錄的 <filename>Makefile</filename> 控制。簡單的文章可以從原始的英語目錄直接複製 <filename>Makefile</filename> 過來。書籍的翻譯流程結合多個獨立的 <filename>book.xml</filename> 和 <filename>chapter.xml</filename> 成為一個檔案, 所以書籍翻譯的 <filename>Makefile</filename> 必須複製並修改。</para> | ||||
<example xml:id="po-translations-creating-example"> | <example xml:id="po-translations-creating-example"> | ||||
<title xml:lang="en">Creating a Spanish Translation of the Porter's | <title>建立 Porter 手冊的西班牙語翻譯</title> | ||||
Handbook</title> | |||||
<para>建立<link xlink:href="@@URL_RELPREFIX@@/doc/en_US.ISO8859-1/books/porters-handbook">Porter 手冊</link>的西班牙文翻譯。原文是位於 <filename>~/doc/en_US.ISO8859-1/books/porters-handbook/</filename> 的書籍。</para> | <para>建立<link xlink:href="@@URL_RELPREFIX@@/doc/en_US.ISO8859-1/books/porters-handbook">Porter 手冊</link>的西班牙文翻譯。原文是位於 <filename>~/doc/en_US.ISO8859-1/books/porters-handbook/</filename> 的書籍。</para> | ||||
<procedure> | <procedure> | ||||
<step> | <step> | ||||
<para>西班牙文 books 目錄 <filename>~/doc/es_ES.ISO8859-1/books/</filename> 已經存在,所以只要建立 Porter 手冊的子目錄:</para> | <para>西班牙文 books 目錄 <filename>~/doc/es_ES.ISO8859-1/books/</filename> 已經存在,所以只要建立 Porter 手冊的子目錄:</para> | ||||
<screen><prompt>%</prompt> <userinput>cd ~/doc/es_ES.ISO8859-1/books/</userinput> | <screen><prompt>%</prompt> <userinput>cd ~/doc/es_ES.ISO8859-1/books/</userinput> | ||||
<prompt>%</prompt> <userinput>svn mkdir porters-handbook</userinput> | <prompt>%</prompt> <userinput>svn mkdir porters-handbook</userinput> | ||||
A porters-handbook</screen> | A porters-handbook</screen> | ||||
</step> | </step> | ||||
<step> | <step> | ||||
<para>從原始文件的目錄複製 <filename>Makefile</filename> :</para> | <para>從原始文件的目錄複製 <filename>Makefile</filename> :</para> | ||||
<screen><prompt>%</prompt> <userinput>cd ~/doc/es_ES.ISO8859-1/books/porters-handbook</userinput> | <screen><prompt>%</prompt> <userinput>cd ~/doc/es_ES.ISO8859-1/books/porters-handbook</userinput> | ||||
<prompt>%</prompt> <userinput>svn cp ~/doc/en_US.ISO8859-1/books/porters-handbook/Makefile .</userinput> | <prompt>%</prompt> <userinput>svn cp ~/doc/en_US.ISO8859-1/books/porters-handbook/Makefile .</userinput> | ||||
A Makefile</screen> | A Makefile</screen> | ||||
<para>修改 <filename>Makefile</filename> 內容以產生單一的 <filename>book.xml</filename>:</para> | <para>修改 <filename>Makefile</filename> 內容以產生單一的 <filename>book.xml</filename>:</para> | ||||
<programlisting># | <programlisting xml:lang="en"># | ||||
# $FreeBSD$ | # $FreeBSD$ | ||||
# | # | ||||
# Build the FreeBSD Porter's Handbook。 | # Build the FreeBSD Porter's Handbook. | ||||
# | # | ||||
MAINTAINER=doc@FreeBSD.org | MAINTAINER=doc@FreeBSD.org | ||||
DOC?= book | DOC?= book | ||||
FORMATS?= html-split | FORMATS?= html-split | ||||
Show All 26 Lines | |||||
IMAGES_LIB+= callouts/20.png | IMAGES_LIB+= callouts/20.png | ||||
IMAGES_LIB+= callouts/21.png | IMAGES_LIB+= callouts/21.png | ||||
URL_RELPREFIX?= ../../../.. | URL_RELPREFIX?= ../../../.. | ||||
DOC_PREFIX?= ${.CURDIR}/../../.. | DOC_PREFIX?= ${.CURDIR}/../../.. | ||||
.include "${DOC_PREFIX}/share/mk/doc.project.mk"</programlisting> | .include "${DOC_PREFIX}/share/mk/doc.project.mk"</programlisting> | ||||
<para xml:lang="en">Now the document structure is ready for the translator | <para>現在文件結構已經準備好讓翻譯者執行 <command>make po</command> 開始翻譯。</para> | ||||
to begin translating with | |||||
<command>make po</command>.</para> | |||||
</step> | </step> | ||||
</procedure> | </procedure> | ||||
</example> | </example> | ||||
<example xml:id="po-translations-creating-example-french"> | <example xml:id="po-translations-creating-example-french"> | ||||
<title>建立 <acronym>PGP</acronym> 金鑰文章的法語翻譯。</title> | <title>建立 <acronym>PGP</acronym> 金鑰文章的法語翻譯。</title> | ||||
<para>建立 <link xlink:href="@@URL_RELPREFIX@@/doc/en_US.ISO8859-1/articles/pgpkeys"><acronym>PGP</acronym> 金鑰文章</link>的法文翻譯。原文是位於 <filename>~/doc/en_US.ISO8859-1/articles/pgpkeys/</filename> 的文章。</para> | <para>建立 <link xlink:href="@@URL_RELPREFIX@@/doc/en_US.ISO8859-1/articles/pgpkeys"><acronym>PGP</acronym> 金鑰文章</link>的法文翻譯。原文是位於 <filename>~/doc/en_US.ISO8859-1/articles/pgpkeys/</filename> 的文章。</para> | ||||
Show All 10 Lines | <step> | ||||
<para>從原始文件的目錄複製 <filename>Makefile</filename> :</para> | <para>從原始文件的目錄複製 <filename>Makefile</filename> :</para> | ||||
<screen><prompt>%</prompt> <userinput>cd ~/doc/fr_FR.ISO8859-1/articles/pgpkeys</userinput> | <screen><prompt>%</prompt> <userinput>cd ~/doc/fr_FR.ISO8859-1/articles/pgpkeys</userinput> | ||||
<prompt>%</prompt> <userinput>svn cp ~/doc/en_US.ISO8859-1/articles/pgpkeys/Makefile .</userinput> | <prompt>%</prompt> <userinput>svn cp ~/doc/en_US.ISO8859-1/articles/pgpkeys/Makefile .</userinput> | ||||
A Makefile</screen> | A Makefile</screen> | ||||
<para>檢查 <filename>Makefile</filename> 的內容。因為這是簡單的文章,此例的 <filename>Makefile</filename> 不用修改。第二行的 <literal>$FreeBSD...$</literal> 版本字串將會在檔案提交時被版本控制系統替換掉。</para> | <para>檢查 <filename>Makefile</filename> 的內容。因為這是簡單的文章,此例的 <filename>Makefile</filename> 不用修改。第二行的 <literal>$FreeBSD...$</literal> 版本字串將會在檔案提交時被版本控制系統替換掉。</para> | ||||
<programlisting># | <programlisting xml:lang="en"># | ||||
# $FreeBSD$ | # $FreeBSD$ | ||||
# | # | ||||
# Article:PGP Keys | # Article: PGP Keys | ||||
DOC?= article | DOC?= article | ||||
FORMATS?= html | FORMATS?= html | ||||
WITH_ARTICLE_TOC?= YES | WITH_ARTICLE_TOC?= YES | ||||
INSTALL_COMPRESSED?= gz | INSTALL_COMPRESSED?= gz | ||||
INSTALL_ONLY_COMPRESSED?= | INSTALL_ONLY_COMPRESSED?= | ||||
SRCS= article.xml | SRCS= article.xml | ||||
# To build with just key fingerprints, set FINGERPRINTS_ONLY。 | # To build with just key fingerprints, set FINGERPRINTS_ONLY. | ||||
URL_RELPREFIX?= ../../../.. | URL_RELPREFIX?= ../../../.. | ||||
DOC_PREFIX?= ${.CURDIR}/../../.. | DOC_PREFIX?= ${.CURDIR}/../../.. | ||||
.include "${DOC_PREFIX}/share/mk/doc.project.mk"</programlisting> | .include "${DOC_PREFIX}/share/mk/doc.project.mk"</programlisting> | ||||
<para>文章結構處理好後, 可以執行建立 <command>make po</command> 建立 <acronym>PO</acronym> 檔。</para> | <para>文章結構處理好後, 可以執行建立 <command>make po</command> 建立 <acronym>PO</acronym> 檔。</para> | ||||
</step> | </step> | ||||
</procedure> | </procedure> | ||||
</example> | </example> | ||||
</sect1> | </sect1> | ||||
<sect1 xml:id="po-translations-translating"> | <sect1 xml:id="po-translations-translating"> | ||||
<title xml:lang="en">Translating</title> | <title>翻譯</title> | ||||
<para><application>gettext</application>系統大幅減少翻譯者要追蹤的事情。 字串從原始文件提取到<acronym>PO</acronym> 檔。再用 <acronym>PO</acronym> 檔編輯器輸入字串的翻譯。</para> | <para><application>gettext</application>系統大幅減少翻譯者要追蹤的事情。 字串從原始文件提取到<acronym>PO</acronym> 檔。再用 <acronym>PO</acronym> 檔編輯器輸入字串的翻譯。</para> | ||||
<para>FreeBSD <acronym>PO</acronym> 翻譯系統不會覆蓋掉 <acronym>PO</acronym> 檔。所以提取步驟可以在任何時候重複執行來更新 <acronym>PO</acronym> 檔。</para> | <para>FreeBSD <acronym>PO</acronym> 翻譯系統不會覆蓋掉 <acronym>PO</acronym> 檔。所以提取步驟可以在任何時候重複執行來更新 <acronym>PO</acronym> 檔。</para> | ||||
<para>用 <acronym>PO</acronym> 檔編輯器來編輯檔案。此例是用 <package role="port">editors/poedit</package>,因為它很簡單而且系統需求低。其他的 <acronym>PO</acronym> 檔編輯器提供一些特點,能使翻譯工作更輕鬆。Ports 裡有數個編輯器,包括 <package role="port">devel/gtranslator</package> 。</para> | <para>用 <acronym>PO</acronym> 檔編輯器來編輯檔案。此例是用 <package role="port">editors/poedit</package>,因為它很簡單而且系統需求低。其他的 <acronym>PO</acronym> 檔編輯器提供一些特點,能使翻譯工作更輕鬆。Ports 裡有數個編輯器,包括 <package role="port">devel/gtranslator</package> 。</para> | ||||
<para>保留 <acronym>PO</acronym> 檔是很重要的。它包含所有的翻譯成果。</para> | <para>保留 <acronym>PO</acronym> 檔是很重要的。它包含所有的翻譯成果。</para> | ||||
Show All 16 Lines | <step> | ||||
<screen><prompt>%</prompt> <userinput>poedit es_ES.po</userinput></screen> | <screen><prompt>%</prompt> <userinput>poedit es_ES.po</userinput></screen> | ||||
</step> | </step> | ||||
</procedure> | </procedure> | ||||
</example> | </example> | ||||
</sect1> | </sect1> | ||||
<sect1 xml:id="po-translations-tips"> | <sect1 xml:id="po-translations-tips"> | ||||
<title xml:lang="en">Tips for Translators</title> | <title>給翻譯者的提示</title> | ||||
<sect2 xml:id="po-translations-tips-xmltags"> | <sect2 xml:id="po-translations-tips-xmltags"> | ||||
<title>保留 <acronym>XML</acronym> 標籤</title> | <title>保留 <acronym>XML</acronym> 標籤</title> | ||||
<para xml:lang="en">Preserve <acronym>XML</acronym> tags that are shown in | <para xml:lang="en">Preserve <acronym>XML</acronym> tags that are shown in | ||||
the English original.</para> | the English original.</para> | ||||
<example> | <example> | ||||
▲ Show 20 Lines • Show All 71 Lines • ▼ Show 20 Lines | <prompt>%</prompt> <userinput>make po</userinput></screen> | ||||
<listitem> | <listitem> | ||||
<para><tag class="starttag">varname</tag></para> | <para><tag class="starttag">varname</tag></para> | ||||
</listitem> | </listitem> | ||||
</itemizedlist> | </itemizedlist> | ||||
</sect2> | </sect2> | ||||
<sect2 xml:id="po-translations-literal-dollar"> | <sect2 xml:id="po-translations-literal-dollar"> | ||||
<title><literal>$FreeBSD$</literal> 字串</title> | <title xml:lang="en"><literal>$FreeBSD$</literal> | ||||
Strings</title> | |||||
<para>檔案裡的 $FreeBSD$ 版本字串需要特別處理。例如 <xref linkend="po-translations-creating-example"/> 裡,這些字串不是要被展開 (expanded)。英文文件使用 <literal>&dollar;</literal> entities 來避免使用實際的金錢符號。</para> | <para xml:lang="en">The $FreeBSD$ version strings used in | ||||
files require special handling. In examples like | |||||
<xref linkend="po-translations-creating-example"/>, these | |||||
strings are not meant to be expanded. The English documents | |||||
use <literal>&dollar;</literal> entities to avoid | |||||
including actual literal dollar signs in the file:</para> | |||||
<programlisting>&dollar;FreeBSD&dollar;</programlisting> | <programlisting>&dollar;FreeBSD&dollar;</programlisting> | ||||
<para>版本控制符號不會把 <literal>&dollar;</literal> entities 看成金錢符號,所以不會把字串展開成版本字串。</para> | <para>版本控制符號不會把 <literal>&dollar;</literal> entities 看成金錢符號,所以不會把字串展開成版本字串。</para> | ||||
<para>當 <acronym>PO</acronym> 檔建立後,範例中的 <literal>&dollar;</literal> entities 被實際的金錢符號取代。當檔案提交時,產生的 <literal>$FreeBSD$</literal> 將會被版本控制系統展開。</para> | <para xml:lang="en">When a <acronym>PO</acronym> file is created, the | ||||
<literal>&dollar;</literal> entities used in examples are | |||||
replaced with actual dollar signs. The resulting literal | |||||
<literal>$FreeBSD$</literal> string will be | |||||
wrongly expanded by the version control system when the file | |||||
is committed.</para> | |||||
<para>英文文件用的相同技術可以被用在翻譯上。翻譯時用 <literal>&dollar;</literal> 來取代金錢符號,輸入到 <acronym>PO</acronym> 檔編輯器:</para> | <para>英文文件用的相同技術可以被用在翻譯上。翻譯時用 <literal>&dollar;</literal> 來取代金錢符號,輸入到 <acronym>PO</acronym> 檔編輯器:</para> | ||||
<programlisting>&dollar;FreeBSD&dollar;</programlisting> | <programlisting>&dollar;FreeBSD&dollar;</programlisting> | ||||
</sect2> | </sect2> | ||||
<!-- | <!-- | ||||
<sect2 xml:id="po-translations-tips-makefile"> | <sect2 xml:id="po-translations-tips-makefile"> | ||||
Show All 35 Lines | <prompt>%</prompt> <userinput>make po</userinput></screen> | ||||
</sect1> | </sect1> | ||||
<sect1 xml:id="po-translations-building"> | <sect1 xml:id="po-translations-building"> | ||||
<title>編譯翻譯的文件</title> | <title>編譯翻譯的文件</title> | ||||
<para>原文的翻譯版本可以在任何時候被建立。未翻譯的部份會以英文呈獻。大部份 <acronym>PO</acronym> 編輯器有指標可以顯示翻譯完成度。這讓翻譯者更容易看翻譯好的字串是否足夠來編譯最終的文件。</para> | <para>原文的翻譯版本可以在任何時候被建立。未翻譯的部份會以英文呈獻。大部份 <acronym>PO</acronym> 編輯器有指標可以顯示翻譯完成度。這讓翻譯者更容易看翻譯好的字串是否足夠來編譯最終的文件。</para> | ||||
<example xml:id="po-translations-building-example"> | <example xml:id="po-translations-building-example"> | ||||
<title xml:lang="en">Building the Spanish Porter's Handbook</title> | <title>編譯西班牙文 Porter 手冊</title> | ||||
<para>編譯和預覽之前範例翻譯的西班牙文版 Porter 手冊</para> | <para>編譯和預覽之前範例翻譯的西班牙文版 Porter 手冊</para> | ||||
<procedure> | <procedure> | ||||
<step> | <step> | ||||
<para>編譯翻譯好的文件。因為原文是書籍,所以產生的文件是<filename>book.xml</filename>。</para> | <para>編譯翻譯好的文件。因為原文是書籍,所以產生的文件是<filename>book.xml</filename>。</para> | ||||
<screen><prompt>%</prompt> <userinput>cd ~/doc/es_ES.ISO8859-1/books/porters-handbook</userinput> | <screen><prompt>%</prompt> <userinput>cd ~/doc/es_ES.ISO8859-1/books/porters-handbook</userinput> | ||||
Show All 19 Lines | <sect1 xml:id="po-translations-submitting"> | ||||
<example xml:id="po-translations-submitting-spanish"> | <example xml:id="po-translations-submitting-spanish"> | ||||
<title>NanoBSD 文章的西班牙文翻譯</title> | <title>NanoBSD 文章的西班牙文翻譯</title> | ||||
<procedure> | <procedure> | ||||
<step> | <step> | ||||
<para>增加 FreeBSD 版本字串註解到 <acronym>PO</acronym> 檔的第一行:</para> | <para>增加 FreeBSD 版本字串註解到 <acronym>PO</acronym> 檔的第一行:</para> | ||||
<programlisting>#$FreeBSD$</programlisting> | <programlisting xml:lang="en">#$FreeBSD$</programlisting> | ||||
</step> | </step> | ||||
<step> | <step> | ||||
<para>增加 <filename>Makefile</filename> 、<acronym>PO</acronym> 檔和產生的 <acronym>XML</acronym> 翻譯到版本控制系統:</para> | <para>增加 <filename>Makefile</filename> 、<acronym>PO</acronym> 檔和產生的 <acronym>XML</acronym> 翻譯到版本控制系統:</para> | ||||
<screen><prompt>%</prompt> <userinput>cd ~/doc/es_ES.ISO8859-1/articles/nanobsd/</userinput> | <screen><prompt>%</prompt> <userinput>cd ~/doc/es_ES.ISO8859-1/articles/nanobsd/</userinput> | ||||
<prompt>%</prompt> <userinput>ls</userinput> | <prompt>%</prompt> <userinput>ls</userinput> | ||||
Makefile article.xml es_ES.po | Makefile article.xml es_ES.po | ||||
<prompt>%</prompt> <userinput>svn add Makefile article.xml es_ES.po</userinput> | <prompt>%</prompt> <userinput>svn add Makefile article.xml es_ES.po</userinput> | ||||
A Makefile | A Makefile | ||||
A article.xml | A article.xml | ||||
A es_ES.po</screen> | A es_ES.po</screen> | ||||
</step> | </step> | ||||
<step> | <step> | ||||
<para>設定這些檔案的 <application>Subversion</application> <literal>svn:keywords</literal> 屬性到 <literal>FreeBSD=%H</literal>,讓提交時 <literal>$FreeBSD$</literal> 字串可以被展開成路徑、版本、日期和作者。</para> | <para xml:lang="en">Set the | ||||
<application>Subversion</application> | |||||
<literal>svn:keywords</literal> properties on these files | |||||
to <literal>FreeBSD=%H</literal> so | |||||
<literal>$FreeBSD$</literal> strings are | |||||
expanded into the path, revision, date, and author when | |||||
committed:</para> | |||||
<screen><prompt>%</prompt> <userinput>svn propset svn:keywords FreeBSD=%H Makefile article.xml es_ES.po</userinput> | <screen><prompt>%</prompt> <userinput>svn propset svn:keywords FreeBSD=%H Makefile article.xml es_ES.po</userinput> | ||||
property 'svn:keywords' set on 'Makefile' | property 'svn:keywords' set on 'Makefile' | ||||
property 'svn:keywords' set on 'article.xml' | property 'svn:keywords' set on 'article.xml' | ||||
property 'svn:keywords' set on 'es_ES.po'</screen> | property 'svn:keywords' set on 'es_ES.po'</screen> | ||||
</step> | </step> | ||||
<step> | <step> | ||||
Show All 16 Lines | </step> | ||||
<example xml:id="po-translations-submitting-korean-utf8"> | <example xml:id="po-translations-submitting-korean-utf8"> | ||||
<title>Explaining-BSD 文章的韓文 <acronym>UTF-8</acronym> 翻譯</title> | <title>Explaining-BSD 文章的韓文 <acronym>UTF-8</acronym> 翻譯</title> | ||||
<procedure> | <procedure> | ||||
<step> | <step> | ||||
<para>增加 FreeBSD 版本字串註解到 <acronym>PO</acronym> 檔的第一行:</para> | <para>增加 FreeBSD 版本字串註解到 <acronym>PO</acronym> 檔的第一行:</para> | ||||
<programlisting>#$FreeBSD$</programlisting> | <programlisting xml:lang="en">#$FreeBSD$</programlisting> | ||||
</step> | </step> | ||||
<step> | <step> | ||||
<para>增加 <filename>Makefile</filename> 、<acronym>PO</acronym> 檔和產生的 <acronym>XML</acronym> 翻譯到版本控制系統:</para> | <para>增加 <filename>Makefile</filename> 、<acronym>PO</acronym> 檔和產生的 <acronym>XML</acronym> 翻譯到版本控制系統:</para> | ||||
<screen><prompt>%</prompt> <userinput>cd ~/doc/ko_KR.UTF-8/articles/explaining-bsd/</userinput> | <screen><prompt>%</prompt> <userinput>cd ~/doc/ko_KR.UTF-8/articles/explaining-bsd/</userinput> | ||||
<prompt>%</prompt> <userinput>ls</userinput> | <prompt>%</prompt> <userinput>ls</userinput> | ||||
Makefile article.xml ko_KR.po | Makefile article.xml ko_KR.po | ||||
<prompt>%</prompt> <userinput>svn add Makefile article.xml ko_KR.po</userinput> | <prompt>%</prompt> <userinput>svn add Makefile article.xml ko_KR.po</userinput> | ||||
A Makefile | A Makefile | ||||
A article.xml | A article.xml | ||||
A ko_KR.po</screen> | A ko_KR.po</screen> | ||||
</step> | </step> | ||||
<step> | <step> | ||||
<para>設定這些檔案的 <application>Subversion</application> <literal>svn:keywords</literal> 屬性到 <literal>FreeBSD=%H</literal>,讓提交時 <literal>$FreeBSD$</literal> 字串可以被展開成路徑、版本、日期和作者。</para> | <para xml:lang="en">Set the <application>Subversion</application> | ||||
<literal>svn:keywords</literal> properties on these files | |||||
to <literal>FreeBSD=%H</literal> so | |||||
<literal>$FreeBSD$</literal> strings are | |||||
expanded into the path, revision, date, and author when | |||||
committed:</para> | |||||
<screen><prompt>%</prompt> <userinput>svn propset svn:keywords FreeBSD=%H Makefile article.xml ko_KR.po</userinput> | <screen><prompt>%</prompt> <userinput>svn propset svn:keywords FreeBSD=%H Makefile article.xml ko_KR.po</userinput> | ||||
property 'svn:keywords' set on 'Makefile' | property 'svn:keywords' set on 'Makefile' | ||||
property 'svn:keywords' set on 'article.xml' | property 'svn:keywords' set on 'article.xml' | ||||
property 'svn:keywords' set on 'ko_KR.po'</screen> | property 'svn:keywords' set on 'ko_KR.po'</screen> | ||||
</step> | </step> | ||||
<step> | <step> | ||||
▲ Show 20 Lines • Show All 276 Lines • ▼ Show 20 Lines | <chapter version="5.0" xml:id="writing-style"> | ||||
</sect1> | </sect1> | ||||
<sect1 xml:id="writing-style-guide"> | <sect1 xml:id="writing-style-guide"> | ||||
<title>風格指南</title> | <title>風格指南</title> | ||||
<para>由於文件是由眾多作者所維護,為了保持寫作風格的一貫性, 請遵守下列撰寫風格慣例。</para> | <para>由於文件是由眾多作者所維護,為了保持寫作風格的一貫性, 請遵守下列撰寫風格慣例。</para> | ||||
<sect2> | <sect2> | ||||
<title xml:lang="en">Letter Case</title> | <title>大小寫</title> | ||||
<para>Tag 的部份都是用小寫字母,譬如是用 <tag>para</tag> ,<emphasis>而非</emphasis><tag>PARA</tag>。</para> | <para>Tag 的部份都是用小寫字母,譬如是用 <tag>para</tag> ,<emphasis>而非</emphasis><tag>PARA</tag>。</para> | ||||
<para>而 SGML 內文則是用大寫字母表示,像是: <literal><!ENTITY…></literal> 及 <literal><!DOCTYPE…></literal>, <emphasis>而不是</emphasis> <literal><!entity…></literal> 及 <literal><!doctype…></literal>。</para> | <para>而 SGML 內文則是用大寫字母表示,像是: <literal><!ENTITY…></literal> 及 <literal><!DOCTYPE…></literal>, <emphasis>而不是</emphasis> <literal><!entity…></literal> 及 <literal><!doctype…></literal>。</para> | ||||
</sect2> | </sect2> | ||||
<sect2 xml:id="writing-style-acronyms"> | <sect2 xml:id="writing-style-acronyms"> | ||||
<title xml:lang="en">Acronyms</title> | <title xml:lang="en">Acronyms</title> | ||||
Show All 25 Lines | <chapter version="5.0" xml:id="writing-style"> | ||||
<tag class="starttag">emphasis</tag>regardless<tag class="endtag">emphasis</tag> of the indentation level of | <tag class="starttag">emphasis</tag>regardless<tag class="endtag">emphasis</tag> of the indentation level of | ||||
the file which might contain the current file。<tag class="endtag">para</tag> | the file which might contain the current file。<tag class="endtag">para</tag> | ||||
... | ... | ||||
<tag class="endtag">sect2</tag> | <tag class="endtag">sect2</tag> | ||||
<tag class="endtag">sect1</tag> | <tag class="endtag">sect1</tag> | ||||
<tag class="endtag">chapter</tag></programlisting> | <tag class="endtag">chapter</tag></programlisting> | ||||
<para xml:lang="en">Tags containing long attributes follow the same | <para>有長屬性的標籤也是遵循一樣的原則。遵守縮排規則可以幫助編輯和作者了解哪些內容在標籤內:</para> | ||||
rules. Following the indentation rules in this case helps | |||||
editors and writers see which content is inside the | |||||
tags:</para> | |||||
<programlisting><tag class="starttag">para</tag>See the <tag class="starttag">link | <programlisting><tag class="starttag">para</tag>See the <tag class="starttag">link | ||||
linkend="gmirror-troubleshooting"</tag>Troubleshooting<tag class="endtag">link</tag> | linkend="gmirror-troubleshooting"</tag>Troubleshooting<tag class="endtag">link</tag> | ||||
section if there are problems booting. Powering down and | section if there are problems booting. Powering down and | ||||
disconnecting the original <tag class="starttag">filename</tag>ada0<tag class="endtag">filename</tag> disk | disconnecting the original <tag class="starttag">filename</tag>ada0<tag class="endtag">filename</tag> disk | ||||
will allow it to be kept as an offline backup.<tag class="endtag">para</tag> | will allow it to be kept as an offline backup.<tag class="endtag">para</tag> | ||||
<tag class="starttag">para</tag>It is also possible to journal the boot disk of a &os; | <tag class="starttag">para</tag>It is also possible to journal the boot disk of a &os; | ||||
▲ Show 20 Lines • Show All 202 Lines • ▼ Show 20 Lines | <tbody> | ||||
<row> | <row> | ||||
<entry xml:lang="en"><trademark class="registered">UNIX</trademark></entry> | <entry xml:lang="en"><trademark class="registered">UNIX</trademark></entry> | ||||
<entry xml:lang="en"><literal>&unix;</literal></entry> | <entry xml:lang="en"><literal>&unix;</literal></entry> | ||||
</row> | </row> | ||||
<row> | <row> | ||||
<entry>userland</entry> | <entry>userland</entry> | ||||
<entry/> | <entry/> | ||||
<entry xml:lang="en">things that apply to user space, not the | <entry>指user space,不是核心。</entry> | ||||
kernel</entry> | |||||
</row> | </row> | ||||
<row> | <row> | ||||
<entry>web server</entry> | <entry>web server</entry> | ||||
</row> | </row> | ||||
</tbody> | </tbody> | ||||
</tgroup> | </tgroup> | ||||
</informaltable> | </informaltable> | ||||
Show All 36 Lines | <chapter version="5.0" xml:id="editor-config"> | ||||
<para xml:lang="en">Adjusting text editor configuration can make working on | <para xml:lang="en">Adjusting text editor configuration can make working on | ||||
document files quicker and easier, and help documents conform to | document files quicker and easier, and help documents conform to | ||||
<acronym>FDP</acronym> guidelines.</para> | <acronym>FDP</acronym> guidelines.</para> | ||||
<sect1 xml:id="editor-config-vim"> | <sect1 xml:id="editor-config-vim"> | ||||
<title xml:lang="en"><application>Vim</application></title> | <title xml:lang="en"><application>Vim</application></title> | ||||
<para xml:lang="en">Install from <package>editors/vim</package> | <para xml:lang="en">Install from <package>editors/vim</package> | ||||
or <package>editors/vim-lite</package>.</para> | or <package>editors/vim-lite</package>, then follow the | ||||
configuration instructions in | |||||
<xref linkend="editor-config-vim-config"/>.</para> | |||||
<sect2 xml:id="editor-config-vim-use"> | |||||
<title xml:lang="en">Use</title> | |||||
<para xml:lang="en">Press <keycap>P</keycap> to reformat paragraphs or text that has been selected in Visual mode. Press | |||||
<keycap>T</keycap> to replace groups of eight spaces with a | |||||
tab.</para> | |||||
</sect2> | |||||
<sect2 xml:id="editor-config-vim-config"> | <sect2 xml:id="editor-config-vim-config"> | ||||
<title xml:lang="en">Configuration</title> | <title xml:lang="en">Configuration</title> | ||||
<para xml:lang="en">Edit <filename>~/.vimrc</filename>, adding these | <para xml:lang="en">Edit <filename>~/.vimrc</filename>, adding these | ||||
lines:</para> | lines to the end of the file:</para> | ||||
<programlisting xml:lang="en">if has("autocmd") | <programlisting xml:lang="en">if has("autocmd") | ||||
au BufNewFile,BufRead *.sgml,*.ent,*.xsl,*.xml call Set_SGML() | au BufNewFile,BufRead *.sgml,*.ent,*.xsl,*.xml call Set_SGML() | ||||
au BufNewFile,BufRead *.[1-9] call ShowSpecial() | au BufNewFile,BufRead *.[1-9] call ShowSpecial() | ||||
endif " has(autocmd) | endif " has(autocmd) | ||||
function Set_Highlights() | function Set_Highlights() | ||||
"match ExtraWhitespace /^\s* \s*\|\s\+$/ | "match ExtraWhitespace /^\s* \s*\|\s\+$/ | ||||
Show All 24 Lines | function Set_SGML() | ||||
noremap P gqj | noremap P gqj | ||||
" Replace spaces with tabs | " Replace spaces with tabs | ||||
noremap T :s/ /\t/<CR> | noremap T :s/ /\t/<CR> | ||||
call ShowSpecial() | call ShowSpecial() | ||||
call Set_Highlights() | call Set_Highlights() | ||||
return 0 | return 0 | ||||
endfunction " Set_SGML()</programlisting> | endfunction " Set_SGML()</programlisting> | ||||
</sect2> | </sect2> | ||||
<sect2 xml:id="editor-config-vim-use"> | |||||
<title xml:lang="en">Use</title> | |||||
<para xml:lang="en">Press <keycap>P</keycap> to reformat paragraphs or text that has been selected in Visual mode. Press | |||||
<keycap>T</keycap> to replace groups of eight spaces with a | |||||
tab.</para> | |||||
</sect2> | |||||
</sect1> | </sect1> | ||||
<sect1 xml:id="editor-config-emacs"> | <sect1 xml:id="editor-config-emacs"> | ||||
<title xml:lang="en"><application>Emacs</application></title> | <title xml:lang="en"><application>Emacs</application></title> | ||||
<para xml:lang="en">Install from | <para xml:lang="en">Install from | ||||
<package>editors/emacs</package> | <package>editors/emacs</package> | ||||
or <package>editors/xemacs</package>.</para> | or <package>editors/xemacs</package>.</para> | ||||
▲ Show 20 Lines • Show All 90 Lines • ▼ Show 20 Lines | <!-- Copyright (c) 1998, 1999 Nik Clayton, All rights reserved. | ||||
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||||
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN | STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN | ||||
ANY WAY OUT OF THE USE OF THIS DOCUMENTATION, EVEN IF ADVISED OF THE | ANY WAY OUT OF THE USE OF THIS DOCUMENTATION, EVEN IF ADVISED OF THE | ||||
POSSIBILITY OF SUCH DAMAGE. | POSSIBILITY OF SUCH DAMAGE. | ||||
$FreeBSD$ | $FreeBSD$ | ||||
--> | --> | ||||
<chapter version="5.0" xml:id="see-also"> | <chapter version="5.0" xml:id="see-also"> | ||||
<title xml:lang="en">See Also</title> | <title>他山之石</title> | ||||
<para xml:lang="en">This document is deliberately not an exhaustive discussion of | <para xml:lang="en">This document is deliberately not an exhaustive discussion of | ||||
XML, the DTDs listed, and the FreeBSD Documentation Project. For | XML, the DTDs listed, and the FreeBSD Documentation Project. For | ||||
more information about these, you are encouraged to see the | more information about these, you are encouraged to see the | ||||
following web sites.</para> | following web sites.</para> | ||||
<sect1 xml:id="see-also-fdp"> | <sect1 xml:id="see-also-fdp"> | ||||
<title>FreeBSD 文件計劃</title> | <title>FreeBSD 文件計劃</title> | ||||
▲ Show 20 Lines • Show All 222 Lines • Show Last 20 Lines |