8000 Translate `reference/toplevel_components.po` by mattwang44 · Pull Request #364 · python/python-docs-zh-tw · GitHub
[go: up one dir, main page]

Skip to content

Translate reference/toplevel_components.po #364

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 18, 2023
Merged
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
53 changes: 37 additions & 16 deletions reference/toplevel_components.po
Original file line number Diff line number Diff line change
@@ -1,26 +1,29 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) 2001-2022, Python Software Foundation
# This file is distributed under the same license as the Python package.
#
# Translators:
# Liang-Bo Wang <me@liang2.tw>, 2015
# Matt Wang <mattwang44@gmail.com>, 2022
#
msgid ""
msgstr ""
"Project-Id-Version: Python 3.11\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-06-26 18:54+0800\n"
"PO-Revision-Date: 2015-12-09 17:51+0000\n"
"Last-Translator: Liang-Bo Wang <me@liang2.tw>\n"
"POT-Creation-Date: 2021-06-29 12:56+0000\n"
"PO-Revision-Date: 2022-12-01 01:37+0800\n"
"Last-Translator: Matt Wang <mattwang44@gmail.com>\n"
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
"tw)\n"
"Language: zh_TW\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
"X-Generator: Poedit 3.2\n"

#: ../../reference/toplevel_components.rst:6
msgid "Top-level components"
msgstr ""
msgstr "最高層級元件"

#: ../../reference/toplevel_components.rst:10
msgid ""
Expand All @@ -29,10 +32,12 @@ msgid ""
"interactively, from a module source file, etc. This chapter gives the "
"syntax used in these cases."
msgstr ""
"Python 直譯器可以從多種來源獲得輸入:作為標準輸入或程式引數自腳本傳入、以互動"
"式鍵入、自模組原始檔引入等等。這一章將給出在這些情況下所用的語法。"

#: ../../reference/toplevel_components.rst:19
msgid "Complete Python programs"
msgstr ""
msgstr "完整的 Python 程式"

#: ../../reference/toplevel_components.rst:28
msgid ""
Expand All @@ -45,12 +50,18 @@ msgid ""
"`__main__`. The latter is used to provide the local and global namespace "
"for execution of the complete program."
msgstr ""
"雖然語言規範描述不必規定語言直譯器是如何被調用(invoke)的,但對完整的 "
"Python 程式加以說明還是很有用的。一個完整的 Python 程式會在最小初始化環境中被"
"執行:所有內建和標準模組均為可用,但均處於未初始化狀態,只有 :mod:`sys`\\ "
"(各種系統服務)、:mod:`builtins`\\ (內建函式、例外和 ``None``)和 :mod:"
"`__main__` 除外。後者用於為完整程式的執行提供區域性和全域性命名空間 "
"(namespace)。"

#: ../../reference/toplevel_components.rst:36
msgid ""
"The syntax for a complete Python program is that for file input, described "
"in the next section."
msgstr ""
msgstr "用於一個完整 Python 程式的語法,即下節所描述的檔案輸入。"

#: ../../reference/toplevel_components.rst:43
msgid ""
Expand All @@ -60,6 +71,9 @@ msgid ""
"identical to that of a complete program; each statement is executed in the "
"namespace of :mod:`__main__`."
msgstr ""
"直譯器也可以透過互動模式被調用;在此情況下,它並不讀取和執行一個完整程式,而"
"是每讀取一條陳述式就執行一次(可能為複合陳述式)。此時的初始環境與一個完整程"
"式的相同;每條陳述式會在 :mod:`__main__` 的命名空間中被執行。"

#: ../../reference/toplevel_components.rst:55
msgid ""
Expand All @@ -69,52 +83,59 @@ msgid ""
"is a tty device, the interpreter enters interactive mode; otherwise, it "
"executes the file as a complete program."
msgstr ""
"一個完整程式可透過三種形式被傳遞給直譯器:使用 :option:`-c` *字串*\\ 命令列選"
"項、使用一個檔案作為第一個命令列引數、或者使用標準輸入。如果檔案或標準輸入是"
"一個 tty 裝置,直譯器會進入互動模式;否則它會將檔案當作一個完整程式來執行。"

#: ../../reference/toplevel_components.rst:65
msgid "File input"
msgstr ""
msgstr "檔案輸入"

#: ../../reference/toplevel_components.rst:67
msgid "All input read from non-interactive files has the same form:"
msgstr ""
msgstr "所有從非互動式檔案讀取的輸入都具有相同的形式:"

#: ../../reference/toplevel_components.rst:72
msgid "This syntax is used in the following situations:"
msgstr ""
msgstr "此語法用於下列幾種情況:"

#: ../../reference/toplevel_components.rst:74
msgid "when parsing a complete Python program (from a file or from a string);"
msgstr ""
msgstr "剖析一個完整 Python 程式時(從檔案或字串);"

#: ../../reference/toplevel_components.rst:76
msgid "when parsing a module;"
msgstr ""
msgstr "剖析一個模組時;"

#: ../../reference/toplevel_components.rst:78
msgid "when parsing a string passed to the :func:`exec` function;"
msgstr ""
msgstr "剖析一個傳遞给 :func:`exec` 函数的字串時;"

#: ../../reference/toplevel_components.rst:84
msgid "Interactive input"
msgstr ""
msgstr "互動式輸入"

#: ../../reference/toplevel_components.rst:86
msgid "Input in interactive mode is parsed using the following grammar:"
msgstr ""
msgstr "互動模式下的輸入使用以下語法進行剖析:"

#: ../../reference/toplevel_components.rst:91
msgid ""
"Note that a (top-level) compound statement must be followed by a blank line "
"in interactive mode; this is needed to help the parser detect the end of the "
"input."
msgstr ""
"注意在互動模式下,一條(最高層級)複合陳述式最後必須帶有一個空行;這能夠幫助"
"剖析器確定輸入已經結束。"

#: ../../reference/toplevel_components.rst:98
msgid "Expression input"
msgstr ""
msgstr "運算式輸入"

#: ../../reference/toplevel_components.rst:103
msgid ""
":func:`eval` is used for expression input. It ignores leading whitespace. "
"The string argument to :func:`eval` must have the following form:"
msgstr ""
":func:`eval` 被用於運算式輸入,它會忽略開頭的空白。傳遞給 :func:`eval` 的字串"
"引數必須具有以下形式:"
0