Explorar el Código

chapter04: merge and update translation

Xℹ Ruoyao hace 5 años
padre
commit
d66fa6d734

+ 36 - 21
zh_CN/chapter04/aboutsbus.po

@@ -1,9 +1,3 @@
-# SOME DESCRIPTIVE TITLE
-# Copyright (C) YEAR Free Software Foundation, Inc.
-# This file is distributed under the same license as the PACKAGE package.
-# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
-#
-#, fuzzy
 msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
@@ -11,27 +5,33 @@ msgstr ""
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
-"Language: \n"
+"Language: zh_CN\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Translate Toolkit 2.2.5\n"
 
 #. type: Content of: <sect1><title>
 #: /home/xry111/svn-repos/LFS-BOOK/chapter04/aboutsbus.xml:11
 msgid "About SBUs"
-msgstr ""
+msgstr "关于 SBU"
 
 #. type: Content of: <sect1><para>
 #: /home/xry111/svn-repos/LFS-BOOK/chapter04/aboutsbus.xml:13
 msgid ""
 "Many people would like to know beforehand approximately how long it takes to "
 "compile and install each package. Because Linux From Scratch can be built on "
-"many different systems, it is impossible to provide accurate time "
-"estimates. The biggest package (Glibc) will take approximately 20 minutes on "
-"the fastest systems, but could take up to three days on slower systems! "
-"Instead of providing actual times, the Standard Build Unit (SBU) measure "
-"will be used instead."
+"many different systems, it is impossible to provide accurate time estimates. "
+"The biggest package (Glibc) will take approximately 20 minutes on the "
+"fastest systems, but could take up to three days on slower systems! Instead "
+"of providing actual times, the Standard Build Unit (SBU) measure will be "
+"used instead."
 msgstr ""
+"许多人想在编译和安装各个软件包之前,了解这一过程大概需要多少时间。由于 "
+"Linux From Scratch 可以在许多不同系统上构建,我们无法直接给出估计时间。例"
+"如,最大的软件包 (Glibc)  在最快的系统上只要大约 20 分钟就能构建好,而在一些"
+"较慢的系统上需要 3 天!因此,我们不提供实际时间,而是以标准构建单位 (SBU) 衡"
+"量时间。"
 
 #. type: Content of: <sect1><para>
 #: /home/xry111/svn-repos/LFS-BOOK/chapter04/aboutsbus.xml:22
@@ -42,6 +42,9 @@ msgid ""
 "Build Unit or SBU. All other compile times will be expressed relative to "
 "this time."
 msgstr ""
+"下面给出标准构建单位的测量方法。本书中构建的第一个软件包是 <xref linkend=\"chapter-"
+"cross-tools\"/> 中的 Binutils ,定义编译它需要的时间为标准构建单位,缩写"
+"为 SBU。其他软件包的编译时间用 SBU 为单位表示。"
 
 #. type: Content of: <sect1><para>
 #: /home/xry111/svn-repos/LFS-BOOK/chapter04/aboutsbus.xml:28
@@ -52,6 +55,9 @@ msgid ""
 "build this example package.  Fortunately, most build times are shorter than "
 "the one for binutils."
 msgstr ""
+"例如,考虑一个编译时间是 4.5 SBU 的软件包。如果在某个系统上,需要 10 分钟来"
+"编译和安装第一轮的 Binutils ,那么<emphasis>大概</emphasis>需要 45 分钟才能"
+"构建这个软件包。幸运的是,多数软件包构建时间比 Binutils 少。"
 
 #. type: Content of: <sect1><para>
 #: /home/xry111/svn-repos/LFS-BOOK/chapter04/aboutsbus.xml:34
@@ -61,33 +67,38 @@ msgid ""
 "to give an estimate of how long it might take to install a package, but the "
 "numbers can vary by as much as dozens of minutes in some cases."
 msgstr ""
+"一般来说,SBU 不是完全准确的。这是由于它受到许多因素的影响,包括宿主系统的 "
+"GCC 版本。SBU 只能用来估计安装一个软件包可能需要的时间,估计结果的误差在个"
+"别情况下可能达到几十分钟。"
 
 #. type: Content of: <sect1><note><para>
 #: /home/xry111/svn-repos/LFS-BOOK/chapter04/aboutsbus.xml:40
 msgid ""
 "For many modern systems with multiple processors (or cores) the compilation "
 "time for a package can be reduced by performing a \"parallel make\" by "
-"either setting an environment variable or telling the "
-"<command>make</command> program how many processors are available.  For "
-"instance, an Intel i5-6500 CPU can support four simultaneous processes with:"
+"either setting an environment variable or telling the <command>make</"
+"command> program how many processors are available.  For instance, an Intel "
+"i5-6500 CPU can support four simultaneous processes with:"
 msgstr ""
+"对于许多拥有多个处理器 (或处理器核心) 的现代系统,可以显著"
+"缩短软件包的编译时间,设置环境变量或者直接告诉 <command>make</command> 命"
+"令有多少个可用的处理器,即可进行并行构建。例如,一块 Intel i5-6500 CPU "
+"可以支持 4 个同时运行的进程,可以设定:"
 
 #. type: Content of: <sect1><note><screen>
 #: /home/xry111/svn-repos/LFS-BOOK/chapter04/aboutsbus.xml:46
-#, no-wrap
 msgid "<userinput>export MAKEFLAGS='-j4'</userinput>"
-msgstr ""
+msgstr "<userinput>export MAKEFLAGS='-j4'</userinput>"
 
 #. type: Content of: <sect1><note><para>
 #: /home/xry111/svn-repos/LFS-BOOK/chapter04/aboutsbus.xml:48
 msgid "or just building with:"
-msgstr ""
+msgstr "或者直接用以下命令构建:"
 
 #. type: Content of: <sect1><note><screen>
 #: /home/xry111/svn-repos/LFS-BOOK/chapter04/aboutsbus.xml:50
-#, no-wrap
 msgid "<userinput>make -j4</userinput>"
-msgstr ""
+msgstr "<userinput>make -j4</userinput>"
 
 #. type: Content of: <sect1><note><para>
 #: /home/xry111/svn-repos/LFS-BOOK/chapter04/aboutsbus.xml:52
@@ -99,3 +110,7 @@ msgid ""
 "interleaved.  If you run into a problem with a build step, revert back to a "
 "single processor build to properly analyze the error messages."
 msgstr ""
+"用这种方式使用多个处理器时,SBU 值将会发生变化,有时甚至变得比正常值还大。某"
+"些情况下,还会导致 make 命令失败。另外,分析构建过程的的输出也会变得困难,"
+"因为不同进程的输出行会交错在一起。如果在构建过程中出现问题,需要使用单处理器"
+"进行构建,才能更好地分析错误消息。"

+ 48 - 18
zh_CN/chapter04/abouttestsuites.po

@@ -1,9 +1,3 @@
-# SOME DESCRIPTIVE TITLE
-# Copyright (C) YEAR Free Software Foundation, Inc.
-# This file is distributed under the same license as the PACKAGE package.
-# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
-#
-#, fuzzy
 msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
@@ -11,15 +5,16 @@ msgstr ""
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
-"Language: \n"
+"Language: zh_CN\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Translate Toolkit 2.2.5\n"
 
 #. type: Content of: <sect1><title>
 #: /home/xry111/svn-repos/LFS-BOOK/chapter04/abouttestsuites.xml:11
 msgid "About the Test Suites"
-msgstr ""
+msgstr "关于测试套件"
 
 #. type: Content of: <sect1><para>
 #: /home/xry111/svn-repos/LFS-BOOK/chapter04/abouttestsuites.xml:13
@@ -31,17 +26,25 @@ msgid ""
 "developer intended. It does not, however, guarantee that the package is "
 "totally bug free."
 msgstr ""
+"多数软件包提供测试套件,一般来说,为新构建的软件包运行测试套件是个好主意,"
+"这可以进行一次 <quote>完整性检查</quote> ,从而确认所有东西编译正确。如果测"
+"试套件中的所有检验项目都能通过,一般就可以证明这个软件包像开发者期望的那样运"
+"行。然而,这并不保证软件包完全没有错误。"
 
 #. type: Content of: <sect1><para>
 #: /home/xry111/svn-repos/LFS-BOOK/chapter04/abouttestsuites.xml:20
 msgid ""
 "Some test suites are more important than others. For example, the test "
-"suites for the core toolchain packages&mdash;GCC, binutils, and "
-"glibc&mdash;are of the utmost importance due to their central role in a "
-"properly functioning system. The test suites for GCC and glibc can take a "
-"very long time to complete, especially on slower hardware, but are strongly "
+"suites for the core toolchain packages&mdash;GCC, binutils, and glibc&mdash;"
+"are of the utmost importance due to their central role in a properly "
+"functioning system. The test suites for GCC and glibc can take a very long "
+"time to complete, especially on slower hardware, but are strongly "
 "recommended."
 msgstr ""
+"某些软件包的测试套件比其他的更为重要。例如,组成核心工具链的几个软件包 "
+"&mdash; GCC、Binutils 和 Glibc 的测试套件就最为重要,因为这些软件包在系统的正"
+"常工作中发挥中心作用。GCC 和 Glibc 的测试套件需要运行很长时间,特别是在较慢"
+"的硬件上,但我们仍然强烈推荐运行它们。"
 
 #. type: Content of: <sect1><note><para>
 #: /home/xry111/svn-repos/LFS-BOOK/chapter04/abouttestsuites.xml:28
@@ -51,6 +54,9 @@ msgid ""
 "compiled with a cross-compiler, so are not supposed to be able to run on the "
 "build host."
 msgstr ""
+"在<xref linkend=\"chapter-cross-tools\"/>和<xref "
+"linkend=\"chapter-temporary-tools\"/>中不可能运行测试套件,"
+"因为这些程序是使用交叉编译器编译的,根本不该在构建它们的宿主系统运行。"
 
 #. type: Content of: <sect1><para>
 #: /home/xry111/svn-repos/LFS-BOOK/chapter04/abouttestsuites.xml:34
@@ -58,11 +64,15 @@ msgid ""
 "A common issue with running the test suites for binutils and GCC is running "
 "out of pseudo terminals (PTYs). This can result in a high number of failing "
 "tests. This may happen for several reasons, but the most likely cause is "
-"that the host system does not have the <systemitem "
-"class=\"filesystem\">devpts</systemitem> file system set up correctly. This "
-"issue is discussed in greater detail at <ulink "
-"url=\"&lfs-root;lfs/faq.html#no-ptys\"/>."
+"that the host system does not have the <systemitem class=\"filesystem"
+"\">devpts</systemitem> file system set up correctly. This issue is discussed "
+"in greater detail at <ulink url=\"&lfs-root;lfs/faq.html#no-ptys\"/>."
 msgstr ""
+"在运行 Binutils 和 GCC 的测试套件时,最普遍发生的问题是伪终端 (PTY) 被耗尽。"
+"这会导致大量测试出现失败结果。这种现象有多种可能原因,但最常见的原因是宿主系"
+"统没有正确设置 <systemitem class=\"filesystem\">devpts</systemitem> 文件系"
+"统。关于这个问题的更多细节在 <ulink url=\"&lfs-root;lfs/faq.html#no-ptys\"/"
+"> 中进行了讨论。"
 
 #. type: Content of: <sect1><para>
 #: /home/xry111/svn-repos/LFS-BOOK/chapter04/abouttestsuites.xml:42
@@ -70,6 +80,26 @@ msgid ""
 "Sometimes package test suites will fail, but for reasons which the "
 "developers are aware of and have deemed non-critical. Consult the logs "
 "located at <ulink url=\"&test-results;\"/> to verify whether or not these "
-"failures are expected. This site is valid for all tests throughout this "
-"book."
+"failures are expected. This site is valid for all tests throughout this book."
 msgstr ""
+"一些软件包的测试套件总是失败,但开发者已经知道失败原因,并判定这些失败并不重"
+"要。参照 <ulink url=\"&test-results;\"/> 中的构建日志,来检查这些失败是否符合"
+"预期。本书中的所有测试都可以在该网址查询。"
+
+#~ msgid ""
+#~ "Experience has shown that there is little to be gained from running the "
+#~ "test suites in <xref linkend=\"chapter-temporary-tools\"/>. There can be "
+#~ "no escaping the fact that the host system always exerts some influence on "
+#~ "the tests in that chapter, often causing inexplicable failures. Because "
+#~ "the tools built in <xref linkend=\"chapter-temporary-tools\"/> are "
+#~ "temporary and eventually discarded, we do not recommend running the test "
+#~ "suites in <xref linkend=\"chapter-temporary-tools\"/> for the average "
+#~ "reader. The instructions for running those test suites are provided for "
+#~ "the benefit of testers and developers, but they are strictly optional."
+#~ msgstr ""
+#~ "经验表明,在 <xref linkend=\"chapter-temporary-tools\"/> 中运行测试套件几"
+#~ "乎没有意义。在这一章中,我们无法绝对避免宿主系统对测试过程的影响,这往往"
+#~ "导致不可避免的失败结果。再加上由于 <xref linkend=\"chapter-temporary-tools"
+#~ "\"/> 中的工具是临时的,最终会被丢弃,我们不建议一般读者在 <xref linkend="
+#~ "\"chapter-temporary-tools\"/> 中运行测试套件。尽管我们为测试人员和开发人"
+#~ "员考虑,提供了运行这些测试套件的方法,但它们绝对不是必须运行的。"

+ 66 - 32
zh_CN/chapter04/addinguser.po

@@ -1,9 +1,3 @@
-# SOME DESCRIPTIVE TITLE
-# Copyright (C) YEAR Free Software Foundation, Inc.
-# This file is distributed under the same license as the PACKAGE package.
-# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
-#
-#, fuzzy
 msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
@@ -11,15 +5,16 @@ msgstr ""
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
-"Language: \n"
+"Language: zh_CN\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Translate Toolkit 2.2.5\n"
 
 #. type: Content of: <sect1><title>
 #: /home/xry111/svn-repos/LFS-BOOK/chapter04/addinguser.xml:11
 msgid "Adding the LFS User"
-msgstr ""
+msgstr "添加 LFS 用户"
 
 #. type: Content of: <sect1><para>
 #: /home/xry111/svn-repos/LFS-BOOK/chapter04/addinguser.xml:13
@@ -28,13 +23,19 @@ msgid ""
 "making a single mistake can damage or destroy a system. Therefore, the "
 "packages in the next two chapters are built as an unprivileged user.  You "
 "could use your own user name, but to make it easier to set up a clean "
-"working environment, create a new user called <systemitem "
-"class=\"username\">lfs</systemitem> as a member of a new group (also named "
-"<systemitem class=\"groupname\">lfs</systemitem>) and use this user during "
-"the installation process. As <systemitem "
-"class=\"username\">root</systemitem>, issue the following commands to add "
-"the new user:"
-msgstr ""
+"working environment, create a new user called <systemitem class=\"username"
+"\">lfs</systemitem> as a member of a new group (also named <systemitem class="
+"\"groupname\">lfs</systemitem>) and use this user during the installation "
+"process. As <systemitem class=\"username\">root</systemitem>, issue the "
+"following commands to add the new user:"
+msgstr ""
+"在作为 <systemitem class=\"username\">root</systemitem> 用户登录时,一个微小"
+"的错误就可能损坏甚至摧毁整个系统。因此,我们建议在后续两章中,以非特权用户身份编译"
+"软件包。您可以使用自己的系统用户,但为了更容易地建立一个干净的工作环境,最"
+"好创建一个名为 <systemitem class=\"username\">lfs</systemitem> 的新用户,以及"
+"它从属于的一个新组 (组名也是 <systemitem class=\"groupname\">lfs</"
+"systemitem>) ,以便我们在安装过程中使用。为了创建新用户,以 <systemitem "
+"class=\"username\">root</systemitem> 身份执行以下命令:"
 
 #. type: Content of: <sect1><screen>
 #: /home/xry111/svn-repos/LFS-BOOK/chapter04/addinguser.xml:23
@@ -43,16 +44,18 @@ msgid ""
 "<userinput>groupadd lfs\n"
 "useradd -s /bin/bash -g lfs -m -k /dev/null lfs</userinput>"
 msgstr ""
+"<userinput>groupadd lfs\n"
+"useradd -s /bin/bash -g lfs -m -k /dev/null lfs</userinput>"
 
 #. type: Content of: <sect1><variablelist><title>
 #: /home/xry111/svn-repos/LFS-BOOK/chapter04/addinguser.xml:27
 msgid "The meaning of the command line options:"
-msgstr ""
+msgstr "命令行各选项的含义:"
 
 #. type: Content of: <sect1><variablelist><varlistentry><term>
 #: /home/xry111/svn-repos/LFS-BOOK/chapter04/addinguser.xml:30
 msgid "<parameter>-s /bin/bash</parameter>"
-msgstr ""
+msgstr "<parameter>-s /bin/bash</parameter>"
 
 #. type: Content of: <sect1><variablelist><varlistentry><listitem><para>
 #: /home/xry111/svn-repos/LFS-BOOK/chapter04/addinguser.xml:32
@@ -60,11 +63,13 @@ msgid ""
 "This makes <command>bash</command> the default shell for user <systemitem "
 "class=\"username\">lfs</systemitem>."
 msgstr ""
+"设置 <command>bash</command> 为用户 <systemitem class=\"username\">lfs</"
+"systemitem> 的默认 shell 。"
 
 #. type: Content of: <sect1><variablelist><varlistentry><term>
 #: /home/xry111/svn-repos/LFS-BOOK/chapter04/addinguser.xml:38
 msgid "<parameter>-g lfs</parameter>"
-msgstr ""
+msgstr "<parameter>-g lfs</parameter>"
 
 #. type: Content of: <sect1><variablelist><varlistentry><listitem><para>
 #: /home/xry111/svn-repos/LFS-BOOK/chapter04/addinguser.xml:40
@@ -72,23 +77,26 @@ msgid ""
 "This option adds user <systemitem class=\"username\">lfs</systemitem> to "
 "group <systemitem class=\"groupname\">lfs</systemitem>."
 msgstr ""
+"添加用户 <systemitem class=\"username\">lfs</systemitem> 到组 <systemitem "
+"class=\"groupname\">lfs</systemitem> 。"
 
 #. type: Content of: <sect1><variablelist><varlistentry><term>
 #: /home/xry111/svn-repos/LFS-BOOK/chapter04/addinguser.xml:46
 msgid "<parameter>-m</parameter>"
-msgstr ""
+msgstr "<parameter>-m</parameter>"
 
 #. type: Content of: <sect1><variablelist><varlistentry><listitem><para>
 #: /home/xry111/svn-repos/LFS-BOOK/chapter04/addinguser.xml:48
 msgid ""
-"This creates a home directory for <systemitem "
-"class=\"username\">lfs</systemitem>."
+"This creates a home directory for <systemitem class=\"username\">lfs</"
+"systemitem>."
 msgstr ""
+"为用户 <systemitem class=\"username\">lfs</systemitem> 创建一个主目录。"
 
 #. type: Content of: <sect1><variablelist><varlistentry><term>
 #: /home/xry111/svn-repos/LFS-BOOK/chapter04/addinguser.xml:54
 msgid "<parameter>-k /dev/null</parameter>"
-msgstr ""
+msgstr "<parameter>-k /dev/null</parameter>"
 
 #. type: Content of: <sect1><variablelist><varlistentry><listitem><para>
 #: /home/xry111/svn-repos/LFS-BOOK/chapter04/addinguser.xml:56
@@ -97,17 +105,20 @@ msgid ""
 "(default is <filename class=\"directory\">/etc/skel</filename>)  by changing "
 "the input location to the special null device."
 msgstr ""
+"将模板目录设置为空设备文件,从而不从默认模板目录 (<filename class=\"directory"
+"\">/etc/skel</filename>)  复制文件到新的主目录。"
 
 #. type: Content of: <sect1><variablelist><varlistentry><term>
 #: /home/xry111/svn-repos/LFS-BOOK/chapter04/addinguser.xml:63
 msgid "<parameter>lfs</parameter>"
-msgstr ""
+msgstr "<parameter>lfs</parameter>"
 
 #. type: Content of: <sect1><variablelist><varlistentry><listitem><para>
 #: /home/xry111/svn-repos/LFS-BOOK/chapter04/addinguser.xml:65
 msgid "This is the actual name for the created user."
-msgstr ""
+msgstr "要创建的用户的名称。"
 
+# Critical warning supressed.  Don't know how to translate this keeping the order of XML labels.
 #. type: Content of: <sect1><para>
 #: /home/xry111/svn-repos/LFS-BOOK/chapter04/addinguser.xml:71
 msgid ""
@@ -115,15 +126,18 @@ msgid ""
 "switching to user <systemitem class=\"username\">lfs</systemitem> when "
 "logged in as <systemitem class=\"username\">root</systemitem>, which does "
 "not require the <systemitem class=\"username\">lfs</systemitem> user to have "
-"a password), give <systemitem class=\"username\">lfs</systemitem> a "
-"password:"
+"a password), give <systemitem class=\"username\">lfs</systemitem> a password:"
 msgstr ""
+"为了以 <systemitem class=\"username\">lfs</systemitem> 身份登录系统 (尽管以 "
+"<systemitem class=\"username\">root</systemitem> 身份登录时可以不用输入密码,"
+"直接切换到用户 <systemitem class=\"username\">lfs</systemitem>),为 "
+"<systemitem class=\"username\">lfs</systemitem> 设置密码:"
 
 #. type: Content of: <sect1><screen>
 #: /home/xry111/svn-repos/LFS-BOOK/chapter04/addinguser.xml:77
 #, no-wrap
 msgid "<userinput>passwd lfs</userinput>"
-msgstr ""
+msgstr "<userinput>passwd lfs</userinput>"
 
 #. type: Content of: <sect1><para>
 #: /home/xry111/svn-repos/LFS-BOOK/chapter04/addinguser.xml:79
@@ -132,6 +146,9 @@ msgid ""
 "directories under <filename class=\"directory\">$LFS</filename> by making "
 "<systemitem class=\"username\">lfs</systemitem> the directory owner:"
 msgstr ""
+"将 <systemitem class=\"username\">lfs</systemitem> 设为 <filename class="
+"\"directory\">$LFS</filename> 中所有目录的所有者,使 <systemitem class="
+"\"username\">lfs</systemitem> 对它们拥有完全访问权:"
 
 #. type: Content of: <sect1><screen>
 #: /home/xry111/svn-repos/LFS-BOOK/chapter04/addinguser.xml:83
@@ -142,6 +159,10 @@ msgid ""
 "  x86_64) chown -v lfs $LFS/lib64 ;;\n"
 "esac</userinput>"
 msgstr ""
+"<userinput>chown -v lfs $LFS/{usr,lib,var,etc,bin,sbin,tools}\n"
+"case $(uname -m) in\n"
+"  x86_64) chown -v lfs $LFS/lib64 ;;\n"
+"esac</userinput>"
 
 #. type: Content of: <sect1><para>
 #: /home/xry111/svn-repos/LFS-BOOK/chapter04/addinguser.xml:88
@@ -149,21 +170,26 @@ msgid ""
 "If a separate working directory was created as suggested, give user "
 "<systemitem class=\"username\">lfs</systemitem> ownership of this directory:"
 msgstr ""
+"如果您按照本书的建议,建立了一个单独的工作目录,那么将这个目录的所有者也设"
+"为 <systemitem class=\"username\">lfs</systemitem>:"
 
 #. type: Content of: <sect1><screen>
 #: /home/xry111/svn-repos/LFS-BOOK/chapter04/addinguser.xml:92
 #, no-wrap
 msgid "<userinput>chown -v lfs $LFS/sources</userinput>"
-msgstr ""
+msgstr "<userinput>chown -v lfs $LFS/sources</userinput>"
 
 #. type: Content of: <sect1><note><para>
 #: /home/xry111/svn-repos/LFS-BOOK/chapter04/addinguser.xml:94
 msgid ""
 "In some host systems, the following command does not complete properly and "
-"suspends the login to the lfs user to the background.  If the prompt "
-"\"lfs:~$\" does not appear immediately, entering the <command>fg</command> "
-"command will fix the issue."
+"suspends the login to the lfs user to the background.  If the prompt \"lfs:~$"
+"\" does not appear immediately, entering the <command>fg</command> command "
+"will fix the issue."
 msgstr ""
+"在某些宿主系统上,下面的命令不会正确完成,而会将 lfs 用户的登录会话挂起到后"
+"台。如果提示符 “lfs:~$” 没有很快出现,输入 <command>fg</command> 命令以修复"
+"这个问题。"
 
 #. type: Content of: <sect1><para>
 #: /home/xry111/svn-repos/LFS-BOOK/chapter04/addinguser.xml:99
@@ -172,12 +198,14 @@ msgid ""
 "can be done via a virtual console, through a display manager, or with the "
 "following substitute/switch user command:"
 msgstr ""
+"下面以 <systemitem class=\"username\">lfs</systemitem> 的身份登录。"
+"可以通过虚拟控制台或者显示管理器登录,也可以使用下面的命令切换用户:"
 
 #. type: Content of: <sect1><screen>
 #: /home/xry111/svn-repos/LFS-BOOK/chapter04/addinguser.xml:103
 #, no-wrap
 msgid "<userinput>su - lfs</userinput>"
-msgstr ""
+msgstr "<userinput>su - lfs</userinput>"
 
 #. type: Content of: <sect1><para>
 #: /home/xry111/svn-repos/LFS-BOOK/chapter04/addinguser.xml:105
@@ -187,3 +215,9 @@ msgid ""
 "between these two types of shells can be found in detail in "
 "<filename>bash(1)</filename> and <command>info bash</command>."
 msgstr ""
+"参数 <quote><parameter>-</parameter></quote> 使得 <command>su</command> 启动"
+"一个登录 shell ,而不是非登录 shell 。您可以阅读 <filename>bash(1)</"
+"filename> 和 <command>info bash</command> 详细了解它们的区别。"
+
+#~ msgid "<userinput>chown -v lfs $LFS/tools</userinput>"
+#~ msgstr "<userinput>chown -v lfs $LFS/tools</userinput>"

+ 3 - 8
zh_CN/chapter04/chapter04.po

@@ -1,9 +1,3 @@
-# SOME DESCRIPTIVE TITLE
-# Copyright (C) YEAR Free Software Foundation, Inc.
-# This file is distributed under the same license as the PACKAGE package.
-# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
-#
-#, fuzzy
 msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
@@ -11,12 +5,13 @@ msgstr ""
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
-"Language: \n"
+"Language: zh_CN\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Translate Toolkit 2.2.5\n"
 
 #. type: Content of: <chapter><title>
 #: /home/xry111/svn-repos/LFS-BOOK/chapter04/chapter04.xml:12
 msgid "Final Preparations"
-msgstr ""
+msgstr "最后准备工作"

+ 17 - 8
zh_CN/chapter04/creatingminlayout.po

@@ -1,9 +1,3 @@
-# SOME DESCRIPTIVE TITLE
-# Copyright (C) YEAR Free Software Foundation, Inc.
-# This file is distributed under the same license as the PACKAGE package.
-# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
-#
-#, fuzzy
 msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
@@ -19,7 +13,7 @@ msgstr ""
 #. type: Content of: <sect1><title>
 #: /home/xry111/svn-repos/LFS-BOOK/chapter04/creatingminlayout.xml:11
 msgid "Creating the Minimal directory layout in LFS filesystem"
-msgstr ""
+msgstr "在 LFS 文件系统中创建最小目录布局"
 
 #. type: Content of: <sect1><para>
 #: /home/xry111/svn-repos/LFS-BOOK/chapter04/creatingminlayout.xml:13
@@ -30,6 +24,10 @@ msgid ""
 "location. This is needed so that those temporary programs be overwritten "
 "when rebuilding them in <xref linkend=\"chapter-building-system\"/>."
 msgstr ""
+"在 LFS 分区中需要进行的第一项任务是,创建一个最小目录树,使得在"
+"<xref linkend=\"chapter-temporary-tools\"/>中编译的程序可以被安装到它们"
+"的最终位置。这样,在<xref linkend=\"chapter-building-system\"/>中重新构建"
+"它们时,就能直接覆盖这些临时程序。"
 
 #. type: Content of: <sect1><para>
 #: /home/xry111/svn-repos/LFS-BOOK/chapter04/creatingminlayout.xml:19
@@ -37,6 +35,8 @@ msgid ""
 "Create the required directory layout by running the following as <systemitem "
 "class=\"username\">root</systemitem>:"
 msgstr ""
+"以 <systemitem class=\"username\">root</systemitem> 身份,"
+"执行以下命令创建所需的目录布局:"
 
 #. type: Content of: <sect1><screen>
 #: /home/xry111/svn-repos/LFS-BOOK/chapter04/creatingminlayout.xml:22
@@ -47,6 +47,10 @@ msgid ""
 "  x86_64) mkdir -pv $LFS/lib64 ;;\n"
 "esac</userinput>"
 msgstr ""
+"<userinput>mkdir -pv $LFS/{usr,lib,var,etc,bin,sbin}\n"
+"case $(uname -m) in\n"
+"  x86_64) mkdir -pv $LFS/lib64 ;;\n"
+"esac</userinput>"
 
 #. type: Content of: <sect1><para>
 #: /home/xry111/svn-repos/LFS-BOOK/chapter04/creatingminlayout.xml:27
@@ -57,9 +61,14 @@ msgid ""
 "cross-compiler from the other programs, it will be installed in a special "
 "directory. Create this directory with:"
 msgstr ""
+"在 <xref linkend=\"chapter-temporary-tools\"/> 中,"
+"会使用交叉编译器编译程序 (细节参见"
+"<xref linkend=\"ch-tools-toolchaintechnotes\"/>一节)。"
+"为了将这个交叉编译器和其他程序分离,它会被安装在一个专门的目录。"
+"执行以下命令创建该目录:"
 
 #. type: Content of: <sect1><screen>
 #: /home/xry111/svn-repos/LFS-BOOK/chapter04/creatingminlayout.xml:33
 #, no-wrap
 msgid "<userinput>mkdir -pv $LFS/tools</userinput>"
-msgstr ""
+msgstr "<userinput>mkdir -pv $LFS/tools</userinput>"

+ 8 - 8
zh_CN/chapter04/introduction.po

@@ -1,9 +1,3 @@
-# SOME DESCRIPTIVE TITLE
-# Copyright (C) YEAR Free Software Foundation, Inc.
-# This file is distributed under the same license as the PACKAGE package.
-# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
-#
-#, fuzzy
 msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
@@ -11,15 +5,16 @@ msgstr ""
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
-"Language: \n"
+"Language: zh_CN\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Translate Toolkit 2.2.5\n"
 
 #. type: Content of: <sect1><title>
 #: /home/xry111/svn-repos/LFS-BOOK/chapter04/introduction.xml:11
 msgid "Introduction"
-msgstr ""
+msgstr "概述"
 
 #. type: Content of: <sect1><para>
 #: /home/xry111/svn-repos/LFS-BOOK/chapter04/introduction.xml:13
@@ -32,3 +27,8 @@ msgid ""
 "of time we use to measure how long LFS packages take to build, or "
 "<quote>SBUs</quote>, and give some information about package test suites."
 msgstr ""
+"在本章中,我们将为构建临时系统进行一些额外的准备工作。我们将在 <filename "
+"class=\"directory\">$LFS</filename> 中创建一些用于安装临时工具的目录,增加一"
+"个非特权用户以降低风险,并为该用户建立合适的构建环境。我们还将解释 LFS 软件"
+"包构建时间长度的测量单位,即 <quote>SBU</quote> 的概念,并给出关于软件包测试"
+"套件的一些信息。"

+ 113 - 57
zh_CN/chapter04/settingenviron.po

@@ -1,71 +1,83 @@
-# SOME DESCRIPTIVE TITLE
-# Copyright (C) YEAR Free Software Foundation, Inc.
-# This file is distributed under the same license as the PACKAGE package.
-# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
-#
-#, fuzzy
 msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
-"POT-Creation-Date: 2020-06-17 12:44+0800\n"
+"POT-Creation-Date: 2020-06-18 12:24+0800\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
-"Language: \n"
+"Language: zh_CN\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Translate Toolkit 2.2.5\n"
 
 #. type: Content of: <sect1><title>
 #: /home/xry111/svn-repos/LFS-BOOK/chapter04/settingenviron.xml:11
 msgid "Setting Up the Environment"
-msgstr ""
+msgstr "配置环境"
 
 #. type: Content of: <sect1><para>
 #: /home/xry111/svn-repos/LFS-BOOK/chapter04/settingenviron.xml:13
 msgid ""
 "Set up a good working environment by creating two new startup files for the "
-"<command>bash</command> shell. While logged in as user <systemitem "
-"class=\"username\">lfs</systemitem>, issue the following command to create a "
-"new <filename>.bash_profile</filename>:"
+"<command>bash</command> shell. While logged in as user <systemitem class="
+"\"username\">lfs</systemitem>, issue the following command to create a new "
+"<filename>.bash_profile</filename>:"
 msgstr ""
+"为了配置一个良好的工作环境,我们为 <command>bash</command> 创建两个新的启动脚"
+"本。以 <systemitem class=\"username\">lfs</systemitem> 的身份,执行以下命令,"
+"创建一个新的 <filename>.bash_profile</filename>:"
 
 #. type: Content of: <sect1><screen>
 #: /home/xry111/svn-repos/LFS-BOOK/chapter04/settingenviron.xml:18
 #, no-wrap
 msgid ""
 "<userinput>cat &gt; ~/.bash_profile &lt;&lt; \"EOF\"\n"
-"<literal>exec env -i HOME=$HOME TERM=$TERM PS1='\\u:\\w\\$ ' "
-"/bin/bash</literal>\n"
+"<literal>exec env -i HOME=$HOME TERM=$TERM PS1='\\u:\\w\\$ ' /bin/bash</literal>\n"
 "EOF</userinput>"
 msgstr ""
+"<userinput>cat &gt; ~/.bash_profile &lt;&lt; \"EOF\"\n"
+"<literal>exec env -i HOME=$HOME TERM=$TERM PS1='\\u:\\w\\$ ' /bin/bash</literal>\n"
+"EOF</userinput>"
 
+# swap two labels
 #. type: Content of: <sect1><para>
 #: /home/xry111/svn-repos/LFS-BOOK/chapter04/settingenviron.xml:22
 msgid ""
 "When logged on as user <systemitem class=\"username\">lfs</systemitem>, the "
 "initial shell is usually a <emphasis>login</emphasis> shell which reads the "
 "<filename>/etc/profile</filename> of the host (probably containing some "
-"settings and environment variables) and then "
-"<filename>.bash_profile</filename>.  The <command>exec env "
-"-i.../bin/bash</command> command in the <filename>.bash_profile</filename> "
-"file replaces the running shell with a new one with a completely empty "
-"environment, except for the <envar>HOME</envar>, <envar>TERM</envar>, and "
-"<envar>PS1</envar> variables. This ensures that no unwanted and potentially "
-"hazardous environment variables from the host system leak into the build "
-"environment. The technique used here achieves the goal of ensuring a clean "
-"environment."
+"settings and environment variables) and then <filename>.bash_profile</"
+"filename>.  The <command>exec env -i.../bin/bash</command> command in the "
+"<filename>.bash_profile</filename> file replaces the running shell with a "
+"new one with a completely empty environment, except for the <envar>HOME</"
+"envar>, <envar>TERM</envar>, and <envar>PS1</envar> variables. This ensures "
+"that no unwanted and potentially hazardous environment variables from the "
+"host system leak into the build environment. The technique used here "
+"achieves the goal of ensuring a clean environment."
 msgstr ""
+"在以 <systemitem class=\"username\">lfs</systemitem> 用户登录时,初始的 "
+"shell 一般是一个<emphasis>登录</emphasis> shell。它读取宿主系统的 "
+"<filename>/etc/profile</filename> 文件 (可能包含一些设置和环境变量),然后读"
+"取 <filename>.bash_profile</filename> 。我们在 <filename>.bash_profile</"
+"filename> 中使用 <command>exec env -i.../bin/bash</command> 命令,新建一个除"
+"了 <envar>HOME</envar>, <envar>TERM</envar> 以及 <envar>PS1</envar> 外没有任"
+"何环境变量的 shell ,替换当前 shell ,防止宿主环境中不必要和有潜在风险的环境"
+"变量进入编译环境。通过使用以上技巧,我们创建了一个干净环境。"
 
 #. type: Content of: <sect1><para>
 #: /home/xry111/svn-repos/LFS-BOOK/chapter04/settingenviron.xml:34
 msgid ""
 "The new instance of the shell is a <emphasis>non-login</emphasis> shell, "
-"which does not read, and execute, the conten of "
-"<filename>/etc/profile</filename> or <filename>.bash_profile</filename> "
-"files, but rather reads, and executes, the <filename>.bashrc</filename> file "
-"instead. Create the <filename>.bashrc</filename> file now:"
+"which does not read, and execute, the conten of <filename>/etc/profile</"
+"filename> or <filename>.bash_profile</filename> files, but rather reads, and "
+"executes, the <filename>.bashrc</filename> file instead. Create the "
+"<filename>.bashrc</filename> file now:"
 msgstr ""
+"新的 shell 实例是 <emphasis>非登录</emphasis> shell ,它不会读取和执行 "
+"<filename>/etc/profile</filename> 或者 <filename>.bash_profile</filename> 的"
+"内容,而是读取并执行 <filename>.bashrc</filename> 文件。现在我们就创建一个 "
+"<filename>.bashrc</filename> 文件:"
 
 #. type: Content of: <sect1><screen>
 #: /home/xry111/svn-repos/LFS-BOOK/chapter04/settingenviron.xml:40
@@ -83,36 +95,54 @@ msgid ""
 "export LFS LC_ALL LFS_TGT PATH</literal>\n"
 "EOF</userinput>"
 msgstr ""
+"<userinput>cat &gt; ~/.bashrc &lt;&lt; \"EOF\"\n"
+"<literal>set +h\n"
+"umask 022\n"
+"LFS=/mnt/lfs\n"
+"LC_ALL=POSIX\n"
+"LFS_TGT=$(uname -m)-lfs-linux-gnu\n"
+"PATH=/usr/bin\n"
+"if [ ! -L /bin ]; then PATH=/bin:$PATH; fi\n"
+"PATH=$LFS/tools/bin:$PATH\n"
+"export LFS LC_ALL LFS_TGT PATH</literal>\n"
+"EOF</userinput>"
 
 #. type: Content of: <sect1><variablelist><title>
 #: /home/xry111/svn-repos/LFS-BOOK/chapter04/settingenviron.xml:53
 msgid "The meaning of the settings in <filename>.bashrc</filename>"
-msgstr ""
+msgstr "<filename>.bashrc</filename> 中设定的含义:"
 
 #. type: Content of: <sect1><variablelist><varlistentry><term>
 #: /home/xry111/svn-repos/LFS-BOOK/chapter04/settingenviron.xml:56
 msgid "<parameter>set +h</parameter>"
-msgstr ""
+msgstr "<parameter>set +h</parameter>"
 
 #. type: Content of: <sect1><variablelist><varlistentry><listitem><para>
 #: /home/xry111/svn-repos/LFS-BOOK/chapter04/settingenviron.xml:58
 msgid ""
 "The <command>set +h</command> command turns off <command>bash</command>'s "
-"hash function. Hashing is ordinarily a useful "
-"feature&mdash;<command>bash</command> uses a hash table to remember the full "
-"path of executable files to avoid searching the <envar>PATH</envar> time and "
-"again to find the same executable. However, the new tools should be used as "
-"soon as they are installed. By switching off the hash function, the shell "
-"will always search the <envar>PATH</envar> when a program is to be run. As "
-"such, the shell will find the newly compiled tools in <filename "
-"class=\"directory\">~/tools</filename> as soon as they are available without "
-"remembering a previous version of the same program in a different location."
+"hash function. Hashing is ordinarily a useful feature&mdash;<command>bash</"
+"command> uses a hash table to remember the full path of executable files to "
+"avoid searching the <envar>PATH</envar> time and again to find the same "
+"executable. However, the new tools should be used as soon as they are "
+"installed. By switching off the hash function, the shell will always search "
+"the <envar>PATH</envar> when a program is to be run. As such, the shell will "
+"find the newly compiled tools in <filename class=\"directory\">$LFS/tools</"
+"filename> as soon as they are available without remembering a previous "
+"version of the same program in a different location."
 msgstr ""
+"<command>set +h</command> 命令关闭 <command>bash</command> 的散列功能。一般情"
+"况下,散列是很有用的 —— <command>bash</command> 使用一个散列表维护各个可执行"
+"文件的完整路径,这样就不用每次都在 <envar>PATH</envar> 指定的目录中搜索可执行"
+"文件。然而,在构建 LFS 时,我们希望总是使用最新安装的工具。因此,需要关闭散列"
+"功能,使得 shell 在运行程序时总是搜索 <envar>PATH</envar> 。这样,shell 总是"
+"能够找到 <filename class=\"directory\">$LFS/tools</filename> 目录中那些最新编"
+"译的工具,而不是使用之前记忆的另一个目录中的程序。"
 
 #. type: Content of: <sect1><variablelist><varlistentry><term>
 #: /home/xry111/svn-repos/LFS-BOOK/chapter04/settingenviron.xml:73
 msgid "<parameter>umask 022</parameter>"
-msgstr ""
+msgstr "<parameter>umask 022</parameter>"
 
 #. type: Content of: <sect1><variablelist><varlistentry><listitem><para>
 #: /home/xry111/svn-repos/LFS-BOOK/chapter04/settingenviron.xml:75
@@ -123,36 +153,44 @@ msgid ""
 "<function>open(2)</function> system call, new files will end up with "
 "permission mode 644 and directories with mode 755)."
 msgstr ""
+"将用户的文件创建掩码 (umask) 设定为 022 ,保证只有文件所有者可以写新创建的文"
+"件和目录,但任何人都可读取、执行它们。(如果 <function>open(2)</function> 系"
+"统调用使用默认模式,则新文件将具有权限码 644 ,而新目录具有权限码 755)。"
 
 #. type: Content of: <sect1><variablelist><varlistentry><term>
 #: /home/xry111/svn-repos/LFS-BOOK/chapter04/settingenviron.xml:84
 msgid "<parameter>LFS=/mnt/lfs</parameter>"
-msgstr ""
+msgstr "<parameter>LFS=/mnt/lfs</parameter>"
 
 #. type: Content of: <sect1><variablelist><varlistentry><listitem><para>
 #: /home/xry111/svn-repos/LFS-BOOK/chapter04/settingenviron.xml:86
-msgid "The <envar>LFS</envar> variable should be set to the chosen mount point."
-msgstr ""
+msgid ""
+"The <envar>LFS</envar> variable should be set to the chosen mount point."
+msgstr "<envar>LFS</envar> 环境变量必须被设定为之前选择的挂载点。"
 
 #. type: Content of: <sect1><variablelist><varlistentry><term>
 #: /home/xry111/svn-repos/LFS-BOOK/chapter04/settingenviron.xml:92
 msgid "<parameter>LC_ALL=POSIX</parameter>"
-msgstr ""
+msgstr "<parameter>LC_ALL=POSIX</parameter>"
 
 #. type: Content of: <sect1><variablelist><varlistentry><listitem><para>
 #: /home/xry111/svn-repos/LFS-BOOK/chapter04/settingenviron.xml:94
 msgid ""
 "The <envar>LC_ALL</envar> variable controls the localization of certain "
 "programs, making their messages follow the conventions of a specified "
-"country.  Setting <envar>LC_ALL</envar> to <quote>POSIX</quote> or "
-"<quote>C</quote> (the two are equivalent) ensures that everything will work "
-"as expected in the chroot environment."
+"country.  Setting <envar>LC_ALL</envar> to <quote>POSIX</quote> or <quote>C</"
+"quote> (the two are equivalent) ensures that everything will work as "
+"expected in the chroot environment."
 msgstr ""
+"<envar>LC_ALL</envar> 环境变量控制某些程序的本地化行为,使得它们以特定国家的"
+"语言和惯例输出消息。将 <envar>LC_ALL</envar> 设置为 <quote>POSIX</quote> 或"
+"者 <quote>C</quote>(这两种设置是等价的) 可以保证在 chroot 环境中所有命令的"
+"行为完全符合预期,而与宿主的本地化设置无关。"
 
 #. type: Content of: <sect1><variablelist><varlistentry><term>
 #: /home/xry111/svn-repos/LFS-BOOK/chapter04/settingenviron.xml:103
 msgid "<parameter>LFS_TGT=(uname -m)-lfs-linux-gnu</parameter>"
-msgstr ""
+msgstr "<parameter>LFS_TGT=(uname -m)-lfs-linux-gnu</parameter>"
 
 #. type: Content of: <sect1><variablelist><varlistentry><listitem><para>
 #: /home/xry111/svn-repos/LFS-BOOK/chapter04/settingenviron.xml:105
@@ -162,29 +200,38 @@ msgid ""
 "when cross compiling our temporary toolchain. More information is contained "
 "in <xref linkend=\"ch-tools-toolchaintechnotes\" role=\"\"/>."
 msgstr ""
+"<envar>LFS_TGT</envar>变量设定了一个非默认,但与宿主系统兼容的机器描述符。该"
+"描述符被用于构建交叉编译器和交叉编译临时工具链。<xref linkend=\"ch-tools-"
+"toolchaintechnotes\" role=\"\"/>包含了关于这个描述符的更多信息。"
 
 #. type: Content of: <sect1><variablelist><varlistentry><term>
 #: /home/xry111/svn-repos/LFS-BOOK/chapter04/settingenviron.xml:113
 msgid "<parameter>PATH=/usr/bin</parameter>"
-msgstr ""
+msgstr "<parameter>PATH=/usr/bin</parameter>"
 
 #. type: Content of: <sect1><variablelist><varlistentry><listitem><para>
 #: /home/xry111/svn-repos/LFS-BOOK/chapter04/settingenviron.xml:115
 msgid ""
-"Many modern linux distributions have merged <filename "
-"class=\"directory\">/bin</filename> and <filename "
-"class=\"directory\">/usr/bin</filename>. When this is the case, the standard "
-"<envar>PATH</envar> variable needs just to be set to <filename "
-"class=\"directory\">/usr/bin/</filename> for the <xref "
+"Many modern linux distributions have merged <filename class=\"directory\">/"
+"bin</filename> and <filename class=\"directory\">/usr/bin</filename>. When "
+"this is the case, the standard <envar>PATH</envar> variable needs just to be "
+"set to <filename class=\"directory\">/usr/bin/</filename> for the <xref "
 "linkend=\"chapter-temporary-tools\"/> environment. When this is not the "
 "case, the following line adds <filename class=\"directory\">/bin</filename> "
 "to the path."
 msgstr ""
+"许多现代 Linux 发行版合并了 <filename class=\"directory\">/bin</filename> "
+"和 <filename class=\"directory\">/usr/bin</filename>。"
+"在这种情况下,标准 <envar>PATH</envar> 变量只需要被设定为 "
+"<filename class=\"directory\">/usr/bin</filename>,"
+"即可满足<xref linkend=\"chapter-temporary-tools\"/>的环境。"
+"否则,后续命令将会增加 <filename class=\"directory\">/bin</filename> "
+"到搜索路径中。"
 
 #. type: Content of: <sect1><variablelist><varlistentry><term>
 #: /home/xry111/svn-repos/LFS-BOOK/chapter04/settingenviron.xml:127
 msgid "<parameter>if [ ! -L /bin ]; then PATH=/bin:$PATH; fi</parameter>"
-msgstr ""
+msgstr "<parameter>if [ ! -L /bin ]; then PATH=/bin:$PATH; fi</parameter>"
 
 #. type: Content of: <sect1><variablelist><varlistentry><listitem><para>
 #: /home/xry111/svn-repos/LFS-BOOK/chapter04/settingenviron.xml:129
@@ -192,11 +239,13 @@ msgid ""
 "If <filename class=\"directory\">/bin</filename> is not a symbolic link, "
 "then it has to be added to the <envar>PATH</envar> variable."
 msgstr ""
+"如果 <filename class=\"directory\">/bin</filename> 不是符号链接,"
+"则它需要被添加到 <envar>PATH</envar> 变量中。"
 
 #. type: Content of: <sect1><variablelist><varlistentry><term>
 #: /home/xry111/svn-repos/LFS-BOOK/chapter04/settingenviron.xml:135
 msgid "<parameter>PATH=$LFS/tools/bin:$PATH</parameter>"
-msgstr ""
+msgstr "<parameter>PATH=$LFS/tools/bin:$PATH</parameter>"
 
 #. type: Content of: <sect1><variablelist><varlistentry><listitem><para>
 #: /home/xry111/svn-repos/LFS-BOOK/chapter04/settingenviron.xml:137
@@ -208,11 +257,15 @@ msgid ""
 "hashing, limits the risk that the compiler from the host be used instead of "
 "the cross-compiler."
 msgstr ""
+"我们将 <filename class=\"directory\">$LFS/tools/bin</filename> 附加在默认的 "
+"<envar>PATH</envar> 环境变量之前,这样在<xref linkend=\"chapter-cross-tools"
+"\"/>中,我们一旦安装了新的程序,shell 就能立刻使用它们。这与关闭散列功能相结"
+"合,降低了在第 5 章环境中新程序可用时错误地使用宿主系统中旧程序的风险。"
 
 #. type: Content of: <sect1><variablelist><varlistentry><term>
 #: /home/xry111/svn-repos/LFS-BOOK/chapter04/settingenviron.xml:147
 msgid "<parameter>export LFS LC_ALL LFS_TGT PATH</parameter>"
-msgstr ""
+msgstr "<parameter>export LFS LC_ALL LFS_TGT PATH</parameter>"
 
 #. type: Content of: <sect1><variablelist><varlistentry><listitem><para>
 #: /home/xry111/svn-repos/LFS-BOOK/chapter04/settingenviron.xml:149
@@ -220,6 +273,8 @@ msgid ""
 "While the above commands have set some variables, in order to make them "
 "visible within any sub-shells, we export them."
 msgstr ""
+"前面的命令设定了一些变量,为了让所有子 shell 都能使用这些变量,"
+"需要导出它们。"
 
 #. type: Content of: <sect1><para>
 #: /home/xry111/svn-repos/LFS-BOOK/chapter04/settingenviron.xml:156
@@ -227,9 +282,10 @@ msgid ""
 "Finally, to have the environment fully prepared for building the temporary "
 "tools, source the just-created user profile:"
 msgstr ""
+"最后,为了完全准备好编译临时工具的环境,指示 shell 读取刚才创建的配置文件:"
 
 #. type: Content of: <sect1><screen>
 #: /home/xry111/svn-repos/LFS-BOOK/chapter04/settingenviron.xml:159
 #, no-wrap
 msgid "<userinput>source ~/.bash_profile</userinput>"
-msgstr ""
+msgstr "<userinput>source ~/.bash_profile</userinput>"