8000 Translate `library/linecache.po` (#1092) · python/python-docs-zh-tw@a9f9fea · GitHub
[go: up one dir, main page]

Skip to content

Commit a9f9fea

Browse files
Translate library/linecache.po (#1092)
Co-authored-by: W. H. Wang <mattwang44@gmail.com>
1 parent 0860a65 commit a9f9fea

File tree

1 file changed

+35
-12
lines changed

1 file changed

+35
-12
lines changed

library/linecache.po

Lines changed: 35 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,22 @@
33
# This file is distributed under the same license as the Python package.
44
#
55
# Translators:
6+
# Weilin Du, 2025
67
msgid ""
78
msgstr ""
89
"Project-Id-Version: Python 3.13\n"
910
"Report-Msgid-Bugs-To: \n"
1011
"POT-Creation-Date: 2024-09-01 22:24+0800\n"
11-
"PO-Revision-Date: 2018-05-23 16:05+0000\n"
12-
"Last-Translator: Adrian Liaw <adrianliaw2000@gmail.com>\n"
12+
"PO-Revision-Date: 2025-07-07 23:50+0800\n"
13+
"Last-Translator: Weilin Du <1372449351@qq.com>\n"
1314
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
1415
"tw)\n"
1516
"Language: zh_TW\n"
1617
"MIME-Version: 1.0\n"
1718
"Content-Type: text/plain; charset=UTF-8\n"
1819
"Content-Transfer-Encoding: 8bit\n"
1920
"Plural-Forms: nplurals=1; plural=0;\n"
21+
"X-Generator: Poedit 3.6\n"
2022

2123
#: ../../library/linecache.rst:2
2224
msgid ":mod:`!linecache` --- Random access to text lines"
@@ -30,51 +32,69 @@ msgstr "**原始碼:**\\ :source:`Lib/linecache.py`"
3032
msgid ""
3133
"The :mod:`linecache` module allows one to get any line from a Python source "
3234
"file, while attempting to optimize internally, using a cache, the common "
33-
"case where many lines are read from a single file. This is used by the :mod:"
34-
"`traceback` module to retrieve source lines for inclusion in the formatted "
35-
"traceback."
35+
"case where many lines are read from a single file. This is used by "
36+
"the :mod:`traceback` module to retrieve source lines for inclusion in the "
37+
"formatted traceback."
3638
msgstr ""
39+
":mod:`linecache` 模組允許從 Python 原始碼檔案中取得任何一行。當嘗試在程式內部"
40+
"進行最佳化,會使用快取,這是從單一檔案讀取許多行的常見情況。 這"
41+
"被 :mod:`traceback` 模組用來擷取來自原始碼檔案的行,以包含在格式化的 "
42+
"traceback 中。"
3743

3844
#: ../../library/linecache.rst:18
3945
msgid ""
4046
"The :func:`tokenize.open` function is used to open files. This function "
4147
"uses :func:`tokenize.detect_encoding` to get the encoding of the file; in "
4248
"the absence of an encoding token, the file encoding defaults to UTF-8."
4349
msgstr ""
50+
":func:`tokenize.open` 函式用來開啟檔案。這個函式使"
51+
"用 :func:`tokenize.detect_encoding` 來取得檔案的編碼;在沒有編碼標記的情況"
52+
"下,檔案編碼預設為 UTF-8。"
4453

4554
#: ../../library/linecache.rst:22
4655
msgid "The :mod:`linecache` module defines the following functions:"
47-
msgstr ""
56+
msgstr ":mod:`linecache` 模組定義了下列函式:"
4857

4958
#: ../../library/linecache.rst:27
5059
msgid ""
5160
"Get line *lineno* from file named *filename*. This function will never raise "
5261
"an exception --- it will return ``''`` on errors (the terminating newline "
5362
"character will be included for lines that are found)."
5463
msgstr ""
64+
"從名為 *filename* 的檔案中取得 *lineno* 行。這個函式不會產生例外 --- 它會在出"
65+
"錯時回傳 ``''`` (找到的行會包含終止換行字元)。"
5566

5667
#: ../../library/linecache.rst:33
5768
msgid ""
58-
"If a file named *filename* is not found, the function first checks for a :"
59-
"pep:`302` ``__loader__`` in *module_globals*. If there is such a loader and "
60-
"it defines a ``get_source`` method, then that determines the source lines "
61-
"(if ``get_source()`` returns ``None``, then ``''`` is returned). Finally, if "
62-
"*filename* is a relative filename, it is looked up relative to the entries "
63-
"in the module search path, ``sys.path``."
69+
"If a file named *filename* is not found, the function first checks for "
70+
"a :pep:`302` ``__loader__`` in *module_globals*. If there is such a loader "
71+
"and it defines a ``get_source`` method, then that determines the source "
72+
"lines (if ``get_source()`` returns ``None``, then ``''`` is returned). "
73+
"Finally, if *filename* is a relative filename, it is looked up relative to "
74+
"the entries in the module search path, ``sys.path``."
6475
msgstr ""
76+
"如果找不到名為 *filename* 的檔案,函式會先檢查 *module_globals* 中是否"
77+
"有 :pep:`302` `__loader__` 載入器。如果有這樣一個載入器,而且它定義了一個 "
78+
"``get_source`` 方法,這之後它就會決定原始碼行(如果 ``get_source()`` 回傳 "
79+
"``None``,那麼就會回傳 ``''``)。最後,如果 *filename* 是相對的檔案名稱,則會"
80+
"相對於模組搜尋路徑 ``sys.path`` 中的項目進行搜尋。"
6581

6682
#: ../../library/linecache.rst:44
6783
msgid ""
6884
"Clear the cache. Use this function if you no longer need lines from files "
6985
"previously read using :func:`getline`."
7086
msgstr ""
87+
"清除快取。如果你不再需要先前使用 :func:`getline` 讀取的檔案行數,請使用此函"
88+
"式。"
7189

7290
#: ../../library/linecache.rst:50
7391
msgid ""
7492
"Check the cache for validity. Use this function if files in the cache may "
7593
"have changed on disk, and you require the updated version. If *filename* is "
7694
"omitted, it will check all the entries in the cache."
7795
msgstr ""
96+
"檢查快取是否有效。如果快取中的檔案可能已在磁碟上變更,而你需要更新的版本,請"
97+
"使用此功能。 如果省略 *filename*,則會檢查快取中的所有項目。"
7898

7999
#: ../../library/linecache.rst:56
80100
msgid ""
@@ -83,6 +103,9 @@ msgid ""
83103
"later call. This avoids doing I/O until a line is actually needed, without "
84104
"having to carry the module globals around indefinitely."
85105
msgstr ""
106+
"即使 *module_globals* 在稍後的呼叫中是 ``None`` ,也可以擷取非檔案型模組的足"
107+
"夠細節,以允許稍後透過 :func:`getline` 取得其行。這可以避免在真正需要某一行之"
108+
"前進行 I/O 操作,而不必無限期地帶著模組的全域變數。"
86109

87110
#: ../../library/linecache.rst:63
88111
msgid "Example::"

0 commit comments

Comments
 (0)
0