[svnbook] r5766 committed - branches/1.8/zh/book/ ch06-server-configuration.xml

wuzhouhui at users.sourceforge.net wuzhouhui at users.sourceforge.net
Sat Sep 8 03:51:15 CDT 2018


Revision: 5766
          http://sourceforge.net/p/svnbook/source/5766
Author:   wuzhouhui
Date:     2018-09-08 08:51:13 +0000 (Sat, 08 Sep 2018)
Log Message:
-----------
1.8/zh: translation of chapter 6 in progress

Modified Paths:
--------------
    branches/1.8/zh/book/ch06-server-configuration.xml

Modified: branches/1.8/zh/book/ch06-server-configuration.xml
===================================================================
--- branches/1.8/zh/book/ch06-server-configuration.xml	2018-09-08 07:20:18 UTC (rev 5765)
+++ branches/1.8/zh/book/ch06-server-configuration.xml	2018-09-08 08:51:13 UTC (rev 5766)
@@ -5225,6 +5225,7 @@
 </programlisting>
           </informalexample>
 
+      <!--
           <para>As with client-side keyword expansion, only those keywords
             which are explicitly designated for expansion via the
             <literal>svn:keywords</literal> property set on the file itself
@@ -5231,7 +5232,13 @@
             will be expanded.  See
             <xref linkend="svn.advanced.props.special.keywords" /> for a
             detailed description of the keyword substitution feature.</para>
+      -->
+          <para>和客户端的关键字展开一样, 只有在文件上设置属性
+            <literal>svn:keywords</literal> 后, 被指定的关键字才会被替换,
+            关于关键字替换的更多内容, 见 <xref
+              linkend="svn.advanced.props.special.keywords" />.</para>
 
+      <!--
           <para>As a reminder, <command>mod_dav_svn</command> offers only a
             limited repository browsing experience.  You can see directory
             listings and file contents, but no revision properties
@@ -5247,12 +5254,27 @@
             a much wider set of features, including the display of the
             aforementioned property sets, display of content
             differences between file revisions, and so on.</para>
+      -->
+          <para>作为提醒, <command>mod_dav_svn</command> 所能提供的仓库浏览
+            体验比较有限, 你只能看到目录列表和文件内容, 但无法看到版本号属性
+            (例如日志消息) 或文件/目录属性. 如果用户需要更强大的仓库浏览功能,
+            可以借助第三方软件, 例如 ViewVC (<ulink
+              url="http://viewvc.org"/>), Trac (<ulink
+              url="http://trac.edgewall.org" />) 和 WebSVN (<ulink
+              url="http://websvnphp.github.io" />). 这些第三方软件不会影响
+            <command>mod_dav_svn</command> 的内建 <quote>可浏览性</quote>,
+            而且还提供了更强大的功能, 包括显示前面提到的属性, 显示文件的两个
+            版本号之间的差异等.</para>
 
         </sect4>
 
         <sect4 id="svn.serverconfig.httpd.extra.browsing.mimetype">
+      <!--
           <title>Proper MIME type</title>
+      -->
+          <title>合适的 MIME 类型</title>
 
+      <!--
           <para>When browsing a Subversion repository, the web browser
             gets a clue about how to render a file's contents by
             looking at the <literal>Content-Type:</literal> header
@@ -5267,7 +5289,18 @@
             it might be nice to have a <filename>foo.html</filename> file
             in the repository actually render as HTML when
             browsing.</para>
+      -->
+          <para>浏览一个 Subversion 仓库时, 网页浏览器通过查看
+            <literal>Content-Type</literal> 来判断如何提供文件的内容.
+            <literal>Content-Type</literal> 是 Apache 答复 HTTP
+            <literal>GET</literal> 请求的消息中的一段头部信息, 这段头部信息存
+            放 MIME 类型. 默认情况下, Apache 告诉浏览器所有的仓库文件的 MIME
+            类型都是默认值, 通常是 <literal>text/plain</literal>. 然而, 用户
+            有时候可能对这种处理不太满意, 因为他希望仓库里的文件能够以更有意义
+            的方式呈现—比如说把 <filename>foo.html</filename> 按照 HTML
+            的格式进行显示.</para>
 
+      <!--
           <para>To make this happen, you need only to make sure that
             your files have the proper <literal>svn:mime-type</literal>
             set.  We discuss this in more detail in
@@ -5276,7 +5309,15 @@
             attach proper <literal>svn:mime-type</literal> properties
             to files entering the repository for the first time; see
             <xref linkend="svn.advanced.props.auto"/>.</para>
+      -->
+          <para>为了让文件在浏览器内以更加合适的方式呈现, 需要为文件设置
+            <literal>svn:mime-type</literal> 属性, 详细的内容在
+            <xref linkend="svn.advanced.props.special.mime-type"/>, 另外,
+            还可以配置客户端, 使得在第一次把文件存放到仓库是时, 自动地为文件
+            设置合适的 <literal>svn:mime-type</literal> 属性, 见
+            <xref linkend="svn.advanced.props.auto"/>.</para>
 
+      <!--
           <para>Continuing our example, if one were to set
             the <literal>svn:mime-type</literal> property
             to <literal>text/html</literal> on
@@ -5288,6 +5329,14 @@
             There's generally no problem with this, as long as the web
             site doesn't contain any dynamically generated
             content.</para>
+      -->
+          <para>继续我们的例子, 如果 <filename>foo.html</filename> 的
+            <literal>svn:mime-type</literal> 属性已经被设置为
+            <literal>text/html</literal>, Apache 将告诉浏览器按照 HTML 格式
+            来显示 <filename>foo.html</filename>. 用户还可以为图片文件的
+            <literal>svn:mime-type</literal> 属性设置合适的
+            <literal>image/*</literal>, 最终得到一个可以直接从仓库中浏览的
+            网站! 只要网站不包含任何动态生成的内容, 这是完全可以做到的.</para>
 
         </sect4>
 




More information about the svnbook-dev mailing list