@@ -29,13 +29,19 @@ msgid ""
2929"running a :program:`python` executable and entering commands at an "
3030"interactive prompt, or by running a Python script."
3131msgstr ""
32+ "Android 上的 Python 與桌面版的 Python 不同。在桌面版上,Python 通常作為系統"
33+ "資源安裝,供該台電腦上的任何使用者使用。使用者通常透過執行 :program:`python` "
34+ "可執行檔並在互動式提示字元中輸入指令,或是直接執行 Python 腳本與 Python 互"
35+ "動。"
3236
3337#: ../../using/android.rst:13
3438msgid ""
3539"On Android, there is no concept of installing as a system resource. The only "
3640"unit of software distribution is an \" app\" . There is also no console where "
3741"you could run a :program:`python` executable, or interact with a Python REPL."
3842msgstr ""
43+ "在 Android 上,沒有將其安裝為系統資源的概念。唯一的軟體單位是 \" app\" 。也沒有"
44+ "可以執行 :program:`python` 可執行檔的控制台,或與 Python REPL 互動。"
3945
4046#: ../../using/android.rst:17
4147msgid ""
@@ -46,13 +52,20 @@ msgid ""
4652"standard library, and all your Python code is then packaged into your app "
4753"for its own private use."
4854msgstr ""
55+ "因此,在 Android 上使用 Python 的唯一方式就是以嵌入模式運作 - 也就是撰寫一個"
56+ "原生的 Android 應用程式,使用 ``libpython`` 嵌入 Python 直譯器,並透"
57+ "過 :ref:`Python 嵌入式 API <embedding>` 呼叫 Python 程式碼。完整的 Python "
58+ "直譯器、標準函式庫,以及你所有的 Python 程式碼,都會被打包進你的應用程式,供"
59+ "該應用程式使用。"
4960
5061#: ../../using/android.rst:23
5162msgid ""
5263"The Python standard library has some notable omissions and restrictions on "
5364"Android. See the :ref:`API availability guide <mobile-availability>` for "
5465"details."
5566msgstr ""
67+ "Python 的標準函式庫在 Android 上有一些明顯的缺漏與限制。詳情請參考 :ref:`API "
68+ "可用性指南 <mobile-availability>`。"
5669
5770#: ../../using/android.rst:28
5871msgid "Adding Python to an Android app"
@@ -63,6 +76,8 @@ msgid ""
6376"Most app developers should use one of the following tools, which will "
6477"provide a much easier experience:"
6578msgstr ""
79+ "大多數的應用程式開發者應該使用下面其中一種工具,這些工具能提供更輕鬆的使用體"
80+ "驗:"
6681
6782#: ../../using/android.rst:33
6883msgid ""
@@ -93,35 +108,44 @@ msgid ""
93108"the :source:`testbed app <Android/testbed>` as a guide; each step below "
94109"contains a link to the relevant file."
95110msgstr ""
111+ "如果你確定要全部手動操作,請繼續閱讀。你可以將 :source:`testbed app <Android/"
112+ "testbed>` 作為參考;下面的每個步驟都包含相關檔案的連結。"
96113
97114#: ../../using/android.rst:43
98115msgid "First, acquire a build of Python for Android:"
99- msgstr ""
116+ msgstr "首先,取得一個用於 Android 的 Python 建置: "
100117
101118#: ../../using/android.rst:45
102119msgid ""
103120"The easiest way is to download an Android release from `python.org <https://"
104121"www.python.org/downloads/android/>`__. The ``prefix`` directory mentioned "
105122"below is at the top level of the package."
106123msgstr ""
124+ "最簡單的方式是從 `python.org <https://www.python.org/downloads/android/>`__ "
125+ "下載 Android 版本。下面提到的 ``prefix`` 目錄位於套件的最上層。"
107126
108127#: ../../using/android.rst:49
109128msgid ""
110129"Or if you want to build it yourself, follow the instructions in :source:"
111130"`Android/README.md`. The ``prefix`` directory will be created under :samp:"
112131"`cross-build/{HOST}`."
113132msgstr ""
133+ "或者如果你想自行建置它,請依照 :source:`Android/README.md` 中的操作。"
134+ "``prefix`` 目錄將會建立在 :samp:`cross-build/{HOST}` 底下。"
114135
115136#: ../../using/android.rst:53
116137msgid ""
117138"Add code to your :source:`build.gradle <Android/testbed/app/build.gradle."
118139"kts>` file to copy the following items into your project. All except your "
119140"own Python code can be copied from ``prefix/lib``:"
120141msgstr ""
142+ "在你的 :source:`build.gradle <Android/testbed/app/build.gradle.kts>` 檔案中加"
143+ "入程式碼,將以下項目複製到你的專案中。除了你自己的 Python 程式碼外,其他項目"
144+ "都可以從 ``prefix/lib`` 複製:"
121145
122146#: ../../using/android.rst:57
123147msgid "In your JNI libraries:"
124- msgstr ""
148+ msgstr "在你的 JNI 函式庫: "
125149
126150#: ../../using/android.rst:59
127151msgid "``libpython*.*.so``"
@@ -133,7 +157,7 @@ msgstr "``lib*_python.so``\\ (外部函式庫,例如 OpenSSL)"
133157
134158#: ../../using/android.rst:62
135159msgid "In your assets:"
136- msgstr ""
160+ msgstr "在你的資產: "
137161
138162#: ../../using/android.rst:64
139163msgid "``python*.*`` (the Python standard library)"
@@ -148,13 +172,17 @@ msgid ""
148172"Add code to your app to :source:`extract the assets to the filesystem "
149173"<Android/testbed/app/src/main/java/org/python/testbed/MainActivity.kt>`."
150174msgstr ""
175+ "在你的應用程式中加入程式碼,以 :source:`解壓縮資產到檔案系統 <Android/"
176+ "testbed/app/src/main/java/org/python/testbed/MainActivity.kt>`。"
151177
152178#: ../../using/android.rst:70
153179msgid ""
154180"Add code to your app to :source:`start Python in embedded mode <Android/"
155181"testbed/app/src/main/c/main_activity.c>`. This will need to be C code called "
156182"via JNI."
157183msgstr ""
184+ "在你的應用程式中加入程式碼,以 :source:`嵌入模式啟動 Python <Android/testbed/"
185+ "app/src/main/c/main_activity.c>`。這需要透過 JNI 呼叫的 C 語言程式碼。"
158186
159187#: ../../using/android.rst:75
160188msgid "Building a Python package for Android"
@@ -168,3 +196,7 @@ msgid ""
168196"setting up a cross-compilation environment, building the wheel, and testing "
169197"it on an emulator."
170198msgstr ""
199+ "Python 套件可以為 Android 建置成 wheels 並發布到 PyPI。建議使用的工具是 "
200+ "`cibuildwheel <https://cibuildwheel.pypa.io/en/stable/platforms/"
201+ "#android>`__,它會自動設定交叉編譯環境、建置 wheel,以及在模擬器上測試等所有"
202+ "細節。"
0 commit comments