Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 18 additions & 19 deletions library/linecache.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Python 3.14\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-09-08 15:25+0800\n"
"POT-Creation-Date: 2025-12-28 00:16+0000\n"
"PO-Revision-Date: 2025-07-07 23:50+0800\n"
"Last-Translator: Weilin Du <1372449351@qq.com>\n"
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
Expand All @@ -31,24 +31,23 @@ msgstr "**原始碼:**\\ :source:`Lib/linecache.py`"
msgid ""
"The :mod:`linecache` module allows one to get any line from a Python source "
"file, while attempting to optimize internally, using a cache, the common "
"case where many lines are read from a single file. This is used by "
"the :mod:`traceback` module to retrieve source lines for inclusion in the "
"formatted traceback."
"case where many lines are read from a single file. This is used by the :mod:"
"`traceback` module to retrieve source lines for inclusion in the formatted "
"traceback."
msgstr ""
":mod:`linecache` 模組允許從 Python 原始碼檔案中取得任何一行。當嘗試在程式內部"
"進行最佳化,會使用快取,這是從單一檔案讀取許多行的常見情況。 這"
"被 :mod:`traceback` 模組用來擷取來自原始碼檔案的行,以包含在格式化的 "
"traceback 中。"
"進行最佳化,會使用快取,這是從單一檔案讀取許多行的常見情況。 這被 :mod:"
"`traceback` 模組用來擷取來自原始碼檔案的行,以包含在格式化的 traceback 中。"

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

#: ../../library/linecache.rst:22
msgid "The :mod:`linecache` module defines the following functions:"
Expand All @@ -66,21 +65,21 @@ msgstr ""
#: ../../library/linecache.rst:33
msgid ""
"If *filename* indicates a frozen module (starting with ``'<frozen '``), the "
"function will attepmt to get the real file name from "
"function will attempt to get the real file name from "
"``module_globals['__file__']`` if *module_globals* is not ``None``."
msgstr ""

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