1
0

locale.po 14 KB

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