1
0

profile.po 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308
  1. msgid ""
  2. msgstr ""
  3. "Project-Id-Version: PACKAGE VERSION\n"
  4. "POT-Creation-Date: 2020-06-17 12:44+0800\n"
  5. "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
  6. "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
  7. "Language-Team: LANGUAGE <LL@li.org>\n"
  8. "Language: zh_CN\n"
  9. "MIME-Version: 1.0\n"
  10. "Content-Type: text/plain; charset=UTF-8\n"
  11. "Content-Transfer-Encoding: 8bit\n"
  12. "X-Generator: Translate Toolkit 2.2.5\n"
  13. #. type: Content of: <sect1><title>
  14. #: /home/xry111/svn-repos/LFS-BOOK/chapter09/profile.xml:11
  15. msgid "The Bash Shell Startup Files"
  16. msgstr "Bash Shell 启动文件"
  17. #. type: Content of: <sect1><indexterm><primary>
  18. #: /home/xry111/svn-repos/LFS-BOOK/chapter09/profile.xml:14
  19. msgid "/etc/profile"
  20. msgstr "/etc/profile"
  21. #. type: Content of: <sect1><para>
  22. #: /home/xry111/svn-repos/LFS-BOOK/chapter09/profile.xml:17
  23. msgid ""
  24. "The shell program <command>/bin/bash</command> (hereafter referred to as "
  25. "<quote>the shell</quote>) uses a collection of startup files to help create "
  26. "an environment to run in. Each file has a specific use and may affect login "
  27. "and interactive environments differently. The files in the <filename class="
  28. "\"directory\">/etc</filename> directory provide global settings. If an "
  29. "equivalent file exists in the home directory, it may override the global "
  30. "settings."
  31. msgstr ""
  32. "Shell 程序 <command>/bin/bash</command> (之后简称 shell) 使用一组启动文件,以"
  33. "帮助创建运行环境。每个文件都有专门的用途,它们可能以不同方式影响登录和交互环"
  34. "境。<filename class=\"directory\">/etc</filename> 中的文件提供全局设定。如果"
  35. "在用户主目录中有对应的文件存在,它可能覆盖全局设定。"
  36. #. type: Content of: <sect1><para>
  37. #: /home/xry111/svn-repos/LFS-BOOK/chapter09/profile.xml:25
  38. msgid ""
  39. "An interactive login shell is started after a successful login, using "
  40. "<command>/bin/login</command>, by reading the <filename>/etc/passwd</"
  41. "filename> file. An interactive non-login shell is started at the command-"
  42. "line (e.g., <prompt>[prompt]$</prompt><command>/bin/bash</command>). A non-"
  43. "interactive shell is usually present when a shell script is running. It is "
  44. "non-interactive because it is processing a script and not waiting for user "
  45. "input between commands."
  46. msgstr ""
  47. "在成功登录后,<command>/bin/login</command> 读取 <filename>/etc/passwd</"
  48. "filename> 中的 shell 命令行,启动一个交互式登录 shell。通过命令行 (如 "
  49. "<prompt>[prompt]$</prompt><command>/bin/bash</command>) 启动的 shell 是交互式"
  50. "非登录 shell。非交互 shell 通常在运行 shell 脚本时存在,它处理脚本,在执行命"
  51. "令的过程中不等待用户输入,因此是非交互的。"
  52. #. type: Content of: <sect1><para>
  53. #: /home/xry111/svn-repos/LFS-BOOK/chapter09/profile.xml:33
  54. msgid ""
  55. "For more information, see <command>info bash</command> under the "
  56. "<emphasis>Bash Startup Files and Interactive Shells</emphasis> section."
  57. msgstr ""
  58. "阅读 <command>info bash</command> 中的 <emphasis>Bash Startup Files and "
  59. "Interactive Shells</emphasis> 一节,了解更多信息。"
  60. #. type: Content of: <sect1><para>
  61. #: /home/xry111/svn-repos/LFS-BOOK/chapter09/profile.xml:36
  62. msgid ""
  63. "The files <filename>/etc/profile</filename> and <filename>~/.bash_profile</"
  64. "filename> are read when the shell is invoked as an interactive login shell."
  65. msgstr ""
  66. "登录 shell 会读取文件 <filename>/etc/profile</filename> 和 <filename>~/."
  67. "bash_profile</filename>。"
  68. #. type: Content of: <sect1><para>
  69. #: /home/xry111/svn-repos/LFS-BOOK/chapter09/profile.xml:40
  70. msgid ""
  71. "The base <filename>/etc/profile</filename> below sets some environment "
  72. "variables necessary for native language support. Setting them properly "
  73. "results in:"
  74. msgstr ""
  75. "下面给出最基本的 <filename>/etc/profile</filename> 文件,它设定本地语言支持所"
  76. "需的一些环境变量。正确设定它们有以下好处:"
  77. #. type: Content of: <sect1><itemizedlist><listitem><para>
  78. #: /home/xry111/svn-repos/LFS-BOOK/chapter09/profile.xml:46
  79. msgid "The output of programs translated into the native language"
  80. msgstr "程序输出被翻译成本地语言"
  81. #. type: Content of: <sect1><itemizedlist><listitem><para>
  82. #: /home/xry111/svn-repos/LFS-BOOK/chapter09/profile.xml:49
  83. msgid ""
  84. "Correct classification of characters into letters, digits and other classes. "
  85. "This is necessary for <command>bash</command> to properly accept non-ASCII "
  86. "characters in command lines in non-English locales"
  87. msgstr ""
  88. "字符被正确分类为字母,数字,以及其他类型。在非英文 locale 中,这对于使 "
  89. "<command>bash</command> 正确接受命令行中的非 ASCII 字符是必要的。"
  90. #. type: Content of: <sect1><itemizedlist><listitem><para>
  91. #: /home/xry111/svn-repos/LFS-BOOK/chapter09/profile.xml:54
  92. msgid "The correct alphabetical sorting order for the country"
  93. msgstr "根据所在地区惯例排序字母"
  94. #. type: Content of: <sect1><itemizedlist><listitem><para>
  95. #: /home/xry111/svn-repos/LFS-BOOK/chapter09/profile.xml:57
  96. msgid "Appropriate default paper size"
  97. msgstr "适用于所在地区的默认纸张尺寸"
  98. #. type: Content of: <sect1><itemizedlist><listitem><para>
  99. #: /home/xry111/svn-repos/LFS-BOOK/chapter09/profile.xml:60
  100. msgid "Correct formatting of monetary, time, and date values"
  101. msgstr "正确格式化货币,时间,以及日期值"
  102. #. type: Content of: <sect1><para>
  103. #: /home/xry111/svn-repos/LFS-BOOK/chapter09/profile.xml:64
  104. msgid ""
  105. "Replace <replaceable>&lt;ll&gt;</replaceable> below with the two-letter code "
  106. "for the desired language (e.g., <quote>en</quote>) and <replaceable>&lt;"
  107. "CC&gt;</replaceable> with the two-letter code for the appropriate country (e."
  108. "g., <quote>GB</quote>). <replaceable>&lt;charmap&gt;</replaceable> should be "
  109. "replaced with the canonical charmap for your chosen locale. Optional "
  110. "modifiers such as <quote>@euro</quote> may also be present."
  111. msgstr ""
  112. "将下面的 <replaceable>&lt;ll&gt;</replaceable>替换为所需语言的双字符代号 (例"
  113. "如 <quote>en</quote>),<replaceable>&lt;CC&gt;</replaceable> 替换为国家或地区"
  114. "的双字符代号 (例如 <quote>GB</quote>),<replaceable>&lt;charmap&gt;</"
  115. "replaceable> 替换为您选定的 locale 的标准字符映射。另外,还可以加入 "
  116. "<quote>@euro</quote> 等可选修饰符。"
  117. #. type: Content of: <sect1><para>
  118. #: /home/xry111/svn-repos/LFS-BOOK/chapter09/profile.xml:71
  119. msgid ""
  120. "The list of all locales supported by Glibc can be obtained by running the "
  121. "following command:"
  122. msgstr "Glibc 支持的所有 locale 可以用以下命令列出:"
  123. #. type: Content of: <sect1><screen>
  124. #: /home/xry111/svn-repos/LFS-BOOK/chapter09/profile.xml:74
  125. #, no-wrap
  126. msgid "<userinput>locale -a</userinput>"
  127. msgstr "<userinput>locale -a</userinput>"
  128. #. type: Content of: <sect1><para>
  129. #: /home/xry111/svn-repos/LFS-BOOK/chapter09/profile.xml:76
  130. msgid ""
  131. "Charmaps can have a number of aliases, e.g., <quote>ISO-8859-1</quote> is "
  132. "also referred to as <quote>iso8859-1</quote> and <quote>iso88591</quote>. "
  133. "Some applications cannot handle the various synonyms correctly (e.g., "
  134. "require that <quote>UTF-8</quote> is written as <quote>UTF-8</quote>, not "
  135. "<quote>utf8</quote>), so it is safest in most cases to choose the canonical "
  136. "name for a particular locale. To determine the canonical name, run the "
  137. "following command, where <replaceable>&lt;locale name&gt;</replaceable> is "
  138. "the output given by <command>locale -a</command> for your preferred locale "
  139. "(<quote>en_GB.iso88591</quote> in our example)."
  140. msgstr ""
  141. "字符映射可能有多个别名,例如 <quote>ISO-8859-1</quote> 也可以称为 "
  142. "<quote>iso8859-1</quote> 或者 <quote>iso88591</quote>。某些程序不能正确处理一"
  143. "些别名 (例如,只识别 <quote>UTF-8</quote>,不能识别 <quote>utf8</quote>),因"
  144. "此在多数情况下,为了保险起见,最好使用 locale 的规范名称。为了确定规范名称,"
  145. "执行以下命令,将 <replaceable>&lt;locale 名&gt;</replaceable> 替换成 "
  146. "<command>locale -a</command> 对于您希望的 locale 的输出 (以 <quote>en_GB."
  147. "iso88591</quote> 为例)。"
  148. #. type: Content of: <sect1><screen>
  149. #: /home/xry111/svn-repos/LFS-BOOK/chapter09/profile.xml:86
  150. #, no-wrap
  151. msgid "<userinput>LC_ALL=<replaceable>&lt;locale name&gt;</replaceable> locale charmap</userinput>"
  152. msgstr "<userinput>LC_ALL=<replaceable>&lt;locale 名&gt;</replaceable> locale charmap</userinput>"
  153. #. type: Content of: <sect1><para>
  154. #: /home/xry111/svn-repos/LFS-BOOK/chapter09/profile.xml:88
  155. msgid ""
  156. "For the <quote>en_GB.iso88591</quote> locale, the above command will print:"
  157. msgstr "对于 <quote>en_GB.iso88591</quote> locale,以上命令输出:"
  158. #. type: Content of: <sect1><screen>
  159. #: /home/xry111/svn-repos/LFS-BOOK/chapter09/profile.xml:91
  160. #, no-wrap
  161. msgid "<computeroutput>ISO-8859-1</computeroutput>"
  162. msgstr "<computeroutput>ISO-8859-1</computeroutput>"
  163. #. type: Content of: <sect1><para>
  164. #: /home/xry111/svn-repos/LFS-BOOK/chapter09/profile.xml:93
  165. msgid ""
  166. "This results in a final locale setting of <quote>en_GB.ISO-8859-1</quote>. "
  167. "It is important that the locale found using the heuristic above is tested "
  168. "prior to it being added to the Bash startup files:"
  169. msgstr ""
  170. "这样就最终确定 locale 应设置为 <quote>en_GB.ISO-8859-1</quote>。在将以上启发"
  171. "方法获得的 locale 添加到 Bash 启动文件之前,一定要进行下列测试:"
  172. #. type: Content of: <sect1><screen>
  173. #: /home/xry111/svn-repos/LFS-BOOK/chapter09/profile.xml:97
  174. #, no-wrap
  175. msgid ""
  176. "<userinput>LC_ALL=&lt;locale name&gt; locale language\n"
  177. "LC_ALL=&lt;locale name&gt; locale charmap\n"
  178. "LC_ALL=&lt;locale name&gt; locale int_curr_symbol\n"
  179. "LC_ALL=&lt;locale name&gt; locale int_prefix</userinput>"
  180. msgstr ""
  181. "<userinput>LC_ALL=&lt;locale 名&gt; locale language\n"
  182. "LC_ALL=&lt;locale 名&gt; locale charmap\n"
  183. "LC_ALL=&lt;locale 名&gt; locale int_curr_symbol\n"
  184. "LC_ALL=&lt;locale 名&gt; locale int_prefix</userinput>"
  185. #. type: Content of: <sect1><para>
  186. #: /home/xry111/svn-repos/LFS-BOOK/chapter09/profile.xml:102
  187. msgid ""
  188. "The above commands should print the language name, the character encoding "
  189. "used by the locale, the local currency, and the prefix to dial before the "
  190. "telephone number in order to get into the country. If any of the commands "
  191. "above fail with a message similar to the one shown below, this means that "
  192. "your locale was either not installed in <xref linkend=\"ch-system-glibc\"/> "
  193. "or is not supported by the default installation of Glibc."
  194. msgstr ""
  195. "以上命令应该输出语言名称,选定 locale 使用的字符编码,本地货币符号,以及所在"
  196. "国家或地区的国际电话区号。如果以上某个命令失败并输出类似下面这样的消息,意味"
  197. "着您的 locale 在<xref linkend=\"ch-system-glibc\"/>中没有安装,或者不被 Glibc 的默认安装支持。"
  198. #. type: Content of: <sect1><screen>
  199. #: /home/xry111/svn-repos/LFS-BOOK/chapter09/profile.xml:109
  200. #, no-wrap
  201. msgid "<computeroutput>locale: Cannot set LC_* to default locale: No such file or directory</computeroutput>"
  202. msgstr "<computeroutput>locale: Cannot set LC_* to default locale: No such file or directory</computeroutput>"
  203. #. type: Content of: <sect1><para>
  204. #: /home/xry111/svn-repos/LFS-BOOK/chapter09/profile.xml:111
  205. msgid ""
  206. "If this happens, you should either install the desired locale using the "
  207. "<command>localedef</command> command, or consider choosing a different "
  208. "locale. Further instructions assume that there are no such error messages "
  209. "from Glibc."
  210. msgstr ""
  211. "如果出现了这种消息,您应该用 <command>localedef</command> 命令安装所需的 "
  212. "locale,或重新选择一个不同的 locale。后文假设 Glibc 没有输出类似错误消息。"
  213. #. type: Content of: <sect1><para>
  214. #: /home/xry111/svn-repos/LFS-BOOK/chapter09/profile.xml:132
  215. msgid ""
  216. "Other packages can also function incorrectly (but may not necessarily "
  217. "display any error messages) if the locale name does not meet their "
  218. "expectations. In those cases, investigating how other Linux distributions "
  219. "support your locale might provide some useful information."
  220. msgstr ""
  221. "其他软件包在 locale 名不符合它们的期望时可能工作不正常(但未必输出错误消息)。"
  222. "在这种情况下,探索一下其他 Linux 发行版是如何支持您的 locale 的,可以得到一些"
  223. "有用的信息。"
  224. #. type: Content of: <sect1><para>
  225. #: /home/xry111/svn-repos/LFS-BOOK/chapter09/profile.xml:137
  226. msgid ""
  227. "Once the proper locale settings have been determined, create the <filename>/"
  228. "etc/profile</filename> file:"
  229. msgstr ""
  230. "在确定了正确的 locale 设置后,创建 <filename>/etc/profile</filename> 文件:"
  231. #. type: Content of: <sect1><screen>
  232. #: /home/xry111/svn-repos/LFS-BOOK/chapter09/profile.xml:140
  233. #, no-wrap
  234. msgid ""
  235. "<userinput>cat &gt; /etc/profile &lt;&lt; \"EOF\"\n"
  236. "<literal># Begin /etc/profile\n"
  237. "\n"
  238. "export LANG=<replaceable>&lt;ll&gt;_&lt;CC&gt;.&lt;charmap&gt;&lt;@modifiers&gt;</replaceable>\n"
  239. "\n"
  240. "# End /etc/profile</literal>\n"
  241. "EOF</userinput>"
  242. msgstr ""
  243. "<userinput>cat &gt; /etc/profile &lt;&lt; \"EOF\"\n"
  244. "<literal># Begin /etc/profile\n"
  245. "\n"
  246. "export LANG=<replaceable>&lt;ll&gt;_&lt;CC&gt;.&lt;charmap&gt;&lt;@modifiers&gt;</replaceable>\n"
  247. "\n"
  248. "# End /etc/profile</literal>\n"
  249. "EOF</userinput>"
  250. #. type: Content of: <sect1><para>
  251. #: /home/xry111/svn-repos/LFS-BOOK/chapter09/profile.xml:148
  252. msgid ""
  253. "The <quote>C</quote> (default) and <quote>en_US.utf8</quote> (the "
  254. "recommended one for United States English users) locales are different. "
  255. "<quote>C</quote> uses the US-ASCII 7-bit character set, and treats bytes "
  256. "with the high bit set as invalid characters. That's why, e.g., the "
  257. "<command>ls</command> command substitutes them with question marks in that "
  258. "locale. Also, an attempt to send mail with such characters from Mutt or Pine "
  259. "results in non-RFC-conforming messages being sent (the charset in the "
  260. "outgoing mail is indicated as <quote>unknown 8-bit</quote>). So you can use "
  261. "the <quote>C</quote> locale only if you are sure that you will never need 8-"
  262. "bit characters."
  263. msgstr ""
  264. "<quote>C</quote> (默认 locale) 和<quote>en_US</quote>(推荐美式英语用户使用"
  265. "的 locale) 是不同的。<quote>C</quote> locale 使用 US-ASCII 7 位字符集,并且将"
  266. "最高位为 1 的字节视为无效字符。因此,<command>ls</command> 等命令会将它们替换"
  267. "为问号。另外,如果试图用 Mutt 或 Pine 发送包含这些字符的邮件,会发出不符合 "
  268. "RFC 标准的消息 (发出邮件的字符集会被标为<quote>未知 8 位</quote>)。因此,您"
  269. "只能在确信自己永远不会使用 8 位字符时才能使用<quote>C</quote> locale。"
  270. #. type: Content of: <sect1><para>
  271. #: /home/xry111/svn-repos/LFS-BOOK/chapter09/profile.xml:158
  272. msgid ""
  273. "UTF-8 based locales are not supported well by some programs. Work is in "
  274. "progress to document and, if possible, fix such problems, see <ulink url="
  275. "\"&blfs-book;introduction/locale-issues.html\"/>."
  276. msgstr ""
  277. "许多程序不能很好地支持基于 UTF-8 的 locale。我们正在努力记录并 (如果可能的"
  278. "话) 修复它们,参阅 <ulink url=\"&blfs-book;introduction/locale-issues.html\"/"
  279. ">。"