1
0

locale.po 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320
  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/locale.xml:11
  15. msgid "Configuring the System Locale"
  16. msgstr "配置系统 Locale"
  17. #. type: Content of: <sect1><indexterm><primary>
  18. #: /home/xry111/svn-repos/LFS-BOOK/chapter09/locale.xml:14
  19. msgid "/etc/locale.conf"
  20. msgstr "/etc/locale.conf"
  21. #. type: Content of: <sect1><para>
  22. #: /home/xry111/svn-repos/LFS-BOOK/chapter09/locale.xml:17
  23. msgid ""
  24. "The <filename>/etc/locale.conf</filename> file below sets some environment "
  25. "variables necessary for native language support. Setting them properly "
  26. "results in:"
  27. msgstr ""
  28. "下面将创建的 <filename>/etc/locale.conf</filename> 设定本地语言支持需要的若干"
  29. "环境变量,正确设定它们可以带来以下好处:"
  30. #. type: Content of: <sect1><itemizedlist><listitem><para>
  31. #: /home/xry111/svn-repos/LFS-BOOK/chapter09/locale.xml:23
  32. msgid "The output of programs being translated into your native language"
  33. msgstr "程序输出被翻译成本地语言"
  34. #. type: Content of: <sect1><itemizedlist><listitem><para>
  35. #: /home/xry111/svn-repos/LFS-BOOK/chapter09/locale.xml:26
  36. msgid ""
  37. "The correct classification of characters into letters, digits and other "
  38. "classes. This is necessary for <command>bash</command> to properly accept "
  39. "non-ASCII characters in command lines in non-English locales"
  40. msgstr ""
  41. "字符被正确分类为字母、数字和其他类别,这对于使 <command>bash</command> 正确接"
  42. "受命令行中的非 ASCII 本地非英文字符来说是必要的"
  43. #. type: Content of: <sect1><itemizedlist><listitem><para>
  44. #: /home/xry111/svn-repos/LFS-BOOK/chapter09/locale.xml:31
  45. msgid "The correct alphabetical sorting order for the country"
  46. msgstr "根据所在地区惯例排序字母"
  47. #. type: Content of: <sect1><itemizedlist><listitem><para>
  48. #: /home/xry111/svn-repos/LFS-BOOK/chapter09/locale.xml:34
  49. msgid "The appropriate default paper size"
  50. msgstr "适用于所在地区的默认纸张尺寸"
  51. #. type: Content of: <sect1><itemizedlist><listitem><para>
  52. #: /home/xry111/svn-repos/LFS-BOOK/chapter09/locale.xml:37
  53. msgid "The correct formatting of monetary, time, and date values"
  54. msgstr "正确格式化货币、时间和日期值"
  55. #. type: Content of: <sect1><para>
  56. #: /home/xry111/svn-repos/LFS-BOOK/chapter09/locale.xml:41
  57. msgid ""
  58. "Replace <replaceable>&lt;ll&gt;</replaceable> below with the two-letter code "
  59. "for your desired language (e.g., <quote>en</quote>) and <replaceable>&lt;"
  60. "CC&gt;</replaceable> with the two-letter code for the appropriate country (e."
  61. "g., <quote>GB</quote>). <replaceable>&lt;charmap&gt;</replaceable> should be "
  62. "replaced with the canonical charmap for your chosen locale. Optional "
  63. "modifiers such as <quote>@euro</quote> may also be present."
  64. msgstr ""
  65. "将下面的 <replaceable>&lt;ll&gt;</replaceable> 替换为所需语言的双字符代号 (例"
  66. "如<quote>en</quote>),<replaceable>&lt;CC&gt;</replaceable> 替换为国家或地区"
  67. "的双字符代号 (例如<quote>GB</quote>),<replaceable>&lt;charmap&gt;</"
  68. "replaceable> 替换为您选定的 locale 的标准字符映射。另外,还可以加入 "
  69. "<quote>@euro</quote> 等可选修饰符。"
  70. #. type: Content of: <sect1><para>
  71. #: /home/xry111/svn-repos/LFS-BOOK/chapter09/locale.xml:48
  72. msgid ""
  73. "The list of all locales supported by Glibc can be obtained by running the "
  74. "following command:"
  75. msgstr "Glibc 支持的所有 locale 可以用以下命令列出:"
  76. #. type: Content of: <sect1><screen>
  77. #: /home/xry111/svn-repos/LFS-BOOK/chapter09/locale.xml:51
  78. #, no-wrap
  79. msgid "<userinput>locale -a</userinput>"
  80. msgstr "<userinput>locale -a</userinput>"
  81. #. type: Content of: <sect1><para>
  82. #: /home/xry111/svn-repos/LFS-BOOK/chapter09/locale.xml:53
  83. msgid ""
  84. "Charmaps can have a number of aliases, e.g., <quote>ISO-8859-1</quote> is "
  85. "also referred to as <quote>iso8859-1</quote> and <quote>iso88591</quote>. "
  86. "Some applications cannot handle the various synonyms correctly (e.g., "
  87. "require that <quote>UTF-8</quote> is written as <quote>UTF-8</quote>, not "
  88. "<quote>utf8</quote>), so it is the safest in most cases to choose the "
  89. "canonical name for a particular locale. To determine the canonical name, run "
  90. "the following command, where <replaceable>&lt;locale name&gt;</replaceable> "
  91. "is the output given by <command>locale -a</command> for your preferred "
  92. "locale (<quote>en_GB.iso88591</quote> in our example)."
  93. msgstr ""
  94. "字符映射可能有多个别名,例如<quote>ISO-8859-1</quote>也可以称为"
  95. "<quote>iso8859-1</quote>或者<quote>iso88591</quote>。某些程序不能正确处理一"
  96. "些别名 (例如,只识别<quote>UTF-8</quote>,不能识别<quote>utf8</quote>),因"
  97. "此在多数情况下,为了保险起见,最好使用 locale 的规范名称。为了确定规范名称,"
  98. "执行以下命令,将 <replaceable>&lt;locale 名&gt;</replaceable> 替换成 "
  99. "<command>locale -a</command> 对于您希望的 locale 的输出 (以<quote>en_GB."
  100. "iso88591</quote>为例)。"
  101. #. type: Content of: <sect1><screen>
  102. #: /home/xry111/svn-repos/LFS-BOOK/chapter09/locale.xml:63
  103. #, no-wrap
  104. msgid "<userinput>LC_ALL=<replaceable>&lt;locale name&gt;</replaceable> locale charmap</userinput>"
  105. msgstr "<userinput>LC_ALL=<replaceable>&lt;locale 名&gt;</replaceable> locale charmap</userinput>"
  106. #. type: Content of: <sect1><para>
  107. #: /home/xry111/svn-repos/LFS-BOOK/chapter09/locale.xml:65
  108. msgid ""
  109. "For the <quote>en_GB.iso88591</quote> locale, the above command will print:"
  110. msgstr "对于<quote>en_GB.iso88591</quote>locale,以上命令输出:"
  111. #. type: Content of: <sect1><screen>
  112. #: /home/xry111/svn-repos/LFS-BOOK/chapter09/locale.xml:68
  113. #, no-wrap
  114. msgid "<computeroutput>ISO-8859-1</computeroutput>"
  115. msgstr "<computeroutput>ISO-8859-1</computeroutput>"
  116. #. type: Content of: <sect1><para>
  117. #: /home/xry111/svn-repos/LFS-BOOK/chapter09/locale.xml:70
  118. msgid ""
  119. "This results in a final locale setting of <quote>en_GB.ISO-8859-1</quote>. "
  120. "It is important that the locale found using the heuristic above is tested "
  121. "prior to it being added to the Bash startup files:"
  122. msgstr ""
  123. "这样就最终确定 locale 应设置为<quote>en_GB.ISO-8859-1</quote>。在将以上启发"
  124. "方法获得的 locale 添加到 Bash 启动文件之前,一定要进行下列测试:"
  125. #. type: Content of: <sect1><screen>
  126. #: /home/xry111/svn-repos/LFS-BOOK/chapter09/locale.xml:74
  127. #, no-wrap
  128. msgid ""
  129. "<userinput>LC_ALL=&lt;locale name&gt; locale language\n"
  130. "LC_ALL=&lt;locale name&gt; locale charmap\n"
  131. "LC_ALL=&lt;locale name&gt; locale int_curr_symbol\n"
  132. "LC_ALL=&lt;locale name&gt; locale int_prefix</userinput>"
  133. msgstr ""
  134. "<userinput>LC_ALL=&lt;locale 名&gt; locale language\n"
  135. "LC_ALL=&lt;locale 名&gt; locale charmap\n"
  136. "LC_ALL=&lt;locale 名&gt; locale int_curr_symbol\n"
  137. "LC_ALL=&lt;locale 名&gt; locale int_prefix</userinput>"
  138. #. type: Content of: <sect1><para>
  139. #: /home/xry111/svn-repos/LFS-BOOK/chapter09/locale.xml:79
  140. msgid ""
  141. "The above commands should print the language name, the character encoding "
  142. "used by the locale, the local currency, and the prefix to dial before the "
  143. "telephone number in order to get into the country. If any of the commands "
  144. "above fail with a message similar to the one shown below, this means that "
  145. "your locale was either not installed in Chapter&nbsp;6 or is not supported "
  146. "by the default installation of Glibc."
  147. msgstr ""
  148. "以上命令应该输出语言名称,选定 locale 使用的字符编码,本地货币符号,以及所在"
  149. "国家或地区的国际电话区号。如果以上某个命令失败并输出类似下面这样的消息,意味"
  150. "着您的 locale 在第 6 章中没有安装,或者不被 Glibc 的默认安装支持。"
  151. #. type: Content of: <sect1><screen>
  152. #: /home/xry111/svn-repos/LFS-BOOK/chapter09/locale.xml:86
  153. #, no-wrap
  154. msgid "<computeroutput>locale: Cannot set LC_* to default locale: No such file or directory</computeroutput>"
  155. msgstr "<computeroutput>locale: Cannot set LC_* to default locale: No such file or directory</computeroutput>"
  156. #. type: Content of: <sect1><para>
  157. #: /home/xry111/svn-repos/LFS-BOOK/chapter09/locale.xml:88
  158. msgid ""
  159. "If this happens, you should either install the desired locale using the "
  160. "<command>localedef</command> command, or consider choosing a different "
  161. "locale. Further instructions assume that there are no such error messages "
  162. "from Glibc."
  163. msgstr ""
  164. "如果出现了这种消息,您应该用 <command>localedef</command> 命令安装所需的 "
  165. "locale,或重新选择一个不同的 locale。后文假设 Glibc 没有输出类似错误消息。"
  166. #. type: Content of: <sect1><para>
  167. #: /home/xry111/svn-repos/LFS-BOOK/chapter09/locale.xml:94
  168. msgid ""
  169. "Some packages beyond LFS may also lack support for your chosen locale. One "
  170. "example is the X library (part of the X Window System), which outputs the "
  171. "following error message if the locale does not exactly match one of the "
  172. "character map names in its internal files:"
  173. msgstr ""
  174. "某些 LFS 以外的软件包可能缺乏对您选择的 locale 的支持,例如 X 库 (X 窗口系统"
  175. "的一部分),它在您的 locale 与它内部文件中的字符映射表名不完全匹配时,会输出以"
  176. "下错误消息:"
  177. #. type: Content of: <sect1><screen>
  178. #: /home/xry111/svn-repos/LFS-BOOK/chapter09/locale.xml:99
  179. #, no-wrap
  180. msgid "<computeroutput>Warning: locale not supported by Xlib, locale set to C</computeroutput>"
  181. msgstr "<computeroutput>Warning: locale not supported by Xlib, locale set to C</computeroutput>"
  182. #. type: Content of: <sect1><para>
  183. #: /home/xry111/svn-repos/LFS-BOOK/chapter09/locale.xml:101
  184. msgid ""
  185. "In several cases Xlib expects that the character map will be listed in "
  186. "uppercase notation with canonical dashes. For instance, \"ISO-8859-1\" "
  187. "rather than \"iso88591\". It is also possible to find an appropriate "
  188. "specification by removing the charmap part of the locale specification. "
  189. "This can be checked by running the <command>locale charmap</command> command "
  190. "in both locales. For example, one would have to change \"de_DE."
  191. "ISO-8859-15@euro\" to \"de_DE@euro\" in order to get this locale recognized "
  192. "by Xlib."
  193. msgstr ""
  194. "某些情况下 Xlib 期望字符映射以带有规范连字符的大写形式给出,例如应该使用 "
  195. "“ISO-8859-1”而不是“iso88591”。有时也可以通过去除 locale 规范中的字符映射部"
  196. "分找到合适的规范,可以通过运行 <command>locale charmap</command> 确认。例如,"
  197. "您需要将“de_DE.ISO-8859-15@euro”替换成“de_DE@euro”,以获得 Xlib 能够识别"
  198. "的 locale。"
  199. #. type: Content of: <sect1><para>
  200. #: /home/xry111/svn-repos/LFS-BOOK/chapter09/locale.xml:109
  201. msgid ""
  202. "Other packages can also function incorrectly (but may not necessarily "
  203. "display any error messages) if the locale name does not meet their "
  204. "expectations. In those cases, investigating how other Linux distributions "
  205. "support your locale might provide some useful information."
  206. msgstr ""
  207. "其他软件包在 locale 名不符合它们的期望时可能工作不正常(但未必输出错误消息)。"
  208. "在这种情况下,探索一下其他 Linux 发行版是如何支持您的 locale 的,可以得到一些"
  209. "有用的信息。"
  210. #. type: Content of: <sect1><para>
  211. #: /home/xry111/svn-repos/LFS-BOOK/chapter09/locale.xml:114
  212. msgid ""
  213. "Once the proper locale settings have been determined, create the <filename>/"
  214. "etc/locale.conf</filename> file:"
  215. msgstr ""
  216. "在确定了正确的 locale 设置后,创建 <filename>/etc/locale.conf</filename> 文"
  217. "件:"
  218. #. type: Content of: <sect1><screen>
  219. #: /home/xry111/svn-repos/LFS-BOOK/chapter09/locale.xml:117
  220. #, no-wrap
  221. msgid ""
  222. "<userinput>cat &gt; /etc/locale.conf &lt;&lt; \"EOF\"\n"
  223. "<literal>LANG=<replaceable>&lt;ll&gt;_&lt;CC&gt;.&lt;charmap&gt;&lt;@modifiers&gt;</replaceable></literal>\n"
  224. "EOF</userinput>"
  225. msgstr ""
  226. "<userinput>cat &gt; /etc/locale.conf &lt;&lt; \"EOF\"\n"
  227. "<literal>LANG=<replaceable>&lt;ll&gt;_&lt;CC&gt;.&lt;charmap&gt;&lt;@modifiers&gt;</replaceable></literal>\n"
  228. "EOF</userinput>"
  229. #. type: Content of: <sect1><para>
  230. #: /home/xry111/svn-repos/LFS-BOOK/chapter09/locale.xml:121
  231. msgid ""
  232. "Note that you can modify <filename>/etc/locale.conf</filename> with the "
  233. "systemd <command>localectl</command> utility. To use <command>localectl</"
  234. "command> for the example above, run:"
  235. msgstr ""
  236. "您也可以使用 systemd 的 <command>localectl</command> 工具修改 <filename>/etc/"
  237. "locale.conf</filename>。如果希望使用 <command>localectl</command> 创建以上例"
  238. "子中的 <filename>locale.conf</filename>,运行:"
  239. #. type: Content of: <sect1><screen>
  240. #: /home/xry111/svn-repos/LFS-BOOK/chapter09/locale.xml:125
  241. #, no-wrap
  242. msgid "<userinput>localectl set-locale LANG=\"<replaceable>&lt;ll&gt;_&lt;CC&gt;.&lt;charmap&gt;&lt;@modifiers&gt;</replaceable>\"</userinput>"
  243. msgstr "<userinput>localectl set-locale LANG=\"<replaceable>&lt;ll&gt;_&lt;CC&gt;.&lt;charmap&gt;&lt;@modifiers&gt;</replaceable>\"</userinput>"
  244. #. type: Content of: <sect1><para>
  245. #: /home/xry111/svn-repos/LFS-BOOK/chapter09/locale.xml:127
  246. msgid ""
  247. "You can also specify other language specific environment variables such as "
  248. "<envar>LANG</envar>, <envar>LC_CTYPE</envar>, <envar>LC_NUMERIC</envar> or "
  249. "any other environment variable from <command>locale</command> output. Just "
  250. "separate them with a space. An example where <envar>LANG</envar> is set as "
  251. "en_US.UTF-8 but <envar>LC_CTYPE</envar> is set as just en_US is:"
  252. msgstr ""
  253. "您也可以指定其他语言相关的环境变量,例如 <envar>LANG</envar>,"
  254. "<envar>LC_CTYPE</envar>,<envar>LC_NUMERIC</envar>,或 <command>locale</"
  255. "command> 输出的其他环境变量,用空格将它们分割即可。例如,将 <envar>LANG</"
  256. "envar> 设置为 en_US.UTF-8,<envar>LC_CTYPE</envar> 设置为 en_US:"
  257. #. type: Content of: <sect1><screen>
  258. #: /home/xry111/svn-repos/LFS-BOOK/chapter09/locale.xml:133
  259. #, no-wrap
  260. msgid "<userinput>localectl set-locale LANG=\"en_US.UTF-8\" LC_CTYPE=\"en_US\"</userinput>"
  261. msgstr "<userinput>localectl set-locale LANG=\"en_US.UTF-8\" LC_CTYPE=\"en_US\"</userinput>"
  262. #. type: Content of: <sect1><note><para>
  263. #: /home/xry111/svn-repos/LFS-BOOK/chapter09/locale.xml:135
  264. msgid ""
  265. "Please note that the <command>localectl</command> command can be used only "
  266. "on a system booted with systemd."
  267. msgstr ""
  268. "请注意 <command>localectl</command> 只能在使用 systemd 引导的系统中使用。"
  269. #. type: Content of: <sect1><para>
  270. #: /home/xry111/svn-repos/LFS-BOOK/chapter09/locale.xml:138
  271. msgid ""
  272. "The <quote>C</quote> (default) and <quote>en_US</quote> (the recommended one "
  273. "for United States English users) locales are different. <quote>C</quote> "
  274. "uses the US-ASCII 7-bit character set, and treats bytes with the high bit "
  275. "set as invalid characters. That's why, e.g., the <command>ls</command> "
  276. "command substitutes them with question marks in that locale. Also, an "
  277. "attempt to send mail with such characters from Mutt or Pine results in non-"
  278. "RFC-conforming messages being sent (the charset in the outgoing mail is "
  279. "indicated as <quote>unknown 8-bit</quote>). It's suggested that you use the "
  280. "<quote>C</quote> locale only if you are certain that you will never need 8-"
  281. "bit characters."
  282. msgstr ""
  283. "<quote>C</quote> (默认 locale) 和<quote>en_US</quote>(推荐美式英语用户使用"
  284. "的 locale) 是不同的。<quote>C</quote> locale 使用 US-ASCII 7 位字符集,并且将"
  285. "最高位为 1 的字节视为无效字符。因此,<command>ls</command> 等命令会将它们替换"
  286. "为问号。另外,如果试图用 Mutt 或 Pine 发送包含这些字符的邮件,会发出不符合 "
  287. "RFC 标准的消息 (发出邮件的字符集会被标为<quote>未知 8 位</quote>)。因此,您"
  288. "只能在确信自己永远不会使用 8 位字符时才能使用<quote>C</quote> locale。"