### Instalasi dan Penggunaan POEdit untuk Berkas .po Source: https://context7.com/python/python-docs-id/llms.txt Perintah instalasi POEdit di Ubuntu/Debian, macOS (via Homebrew), dan Fedora. Setelah terinstal, POEdit dapat digunakan untuk membuka dan mengedit berkas .po. ```bash # Instalasi POEdit di berbagai platform # Ubuntu/Debian sudo apt install poedit # macOS dengan Homebrew brew install --cask poedit # Fedora sudo dnf install poedit # Setelah instalasi, buka berkas .po poedit tutorial/interpreter.po ``` -------------------------------- ### Perintah Transifex untuk Sinkronisasi Source: https://github.com/python/python-docs-id/blob/3.14/README.md Perintah untuk mengelola sinkronisasi data terjemahan antara repositori lokal dan platform Transifex. ```bash tx pull -l id ``` ```bash tx push -t ``` ```bash tx push -t -r python-newest.tutorial--interactive ``` ```bash tx config mapping-remote https://www.transifex.com/python-doc/python-newest/ ``` -------------------------------- ### Membangun Dokumentasi Python Lokal dengan Bahasa Indonesia Source: https://context7.com/python/python-docs-id/llms.txt Langkah-langkah untuk membangun dokumentasi Python secara lokal, termasuk mengkloning skrip pembangun, menyiapkan lingkungan virtual, menginstal dependensi, mengonfigurasi bahasa, menjalankan build, dan menyajikan hasil melalui server HTTP. ```bash # Clone skrip pembangun dokumentasi git clone git@github.com:python/docsbuild-scripts.git cd docsbuild-scripts # Buat direktori yang diperlukan mkdir -p www logs build_root # Buat virtual environment python3.7 -m venv build_root/venv/ # Instalasi dependensi build_root/venv/bin/python -m pip install -r requirements.txt # Edit build_docs.py untuk menambahkan bahasa Indonesia # Tambahkan "id" ke LANGUAGES list: # LANGUAGES = ["en", "fr", "ja", "ko", "pt-br", "zh-cn", "zh-tw", "id"] # # Tambahkan konfigurasi Sphinx untuk Indonesian: # SPHINXOPTS = { # "id": [ # "-D latex_engine=xelatex", # "-D latex_elements.inputenc=", # "-D latex_elements.fontenc=", # ], # } # Jalankan build untuk branch 3.8 dengan bahasa Indonesia python3.7 ./build_docs.py --quick --build-root build_root --www-root www \ --log-directory logs --group $(id -g) --skip-cache-invalidation \ --branch 3.8 --languages id # Jalankan web server untuk melihat hasil python3.7 -m http.server -d www/ # Buka browser: http://127.0.0.1:8000 ``` -------------------------------- ### Mengelola Terjemahan dengan Transifex CLI Source: https://context7.com/python/python-docs-id/llms.txt Perintah Transifex CLI untuk mengunduh terjemahan terbaru dalam Bahasa Indonesia (`tx pull -l id`) dan mengirim pembaruan terjemahan ke Transifex (`tx push -t`). Juga termasuk cara mendorong resource spesifik dan sinkronisasi konfigurasi. ```bash # Mengambil terjemahan terbaru dari Transifex (hanya Bahasa Indonesia) tx pull -l id ``` ```bash # Mengirim pembaruan terjemahan ke Transifex tx push -t ``` ```bash # Mengirim pembaruan resource spesifik tx push -t -r python-newest.tutorial--interactive ``` ```bash # Sinkronisasi ulang konfigurasi dari proyek python-newest tx config mapping-remote https://www.transifex.com/python-doc/python-newest/ ``` -------------------------------- ### Project Directory Structure Source: https://context7.com/python/python-docs-id/llms.txt Overview of the directory layout for the Indonesian Python documentation translation project. ```tree python-docs-id/ ├── .tx/config # Konfigurasi Transifex ├── README.md # Panduan kontribusi ├── TRANSLATORS # Daftar kontributor ├── __wiki__/ # Wiki dan panduan tambahan │ ├── Daftar-Istilah.md # Glosarium standar │ └── Membangun-Dokumentasi-Python-di-Komputer.md ├── tutorial/ # Tutorial Python │ ├── interpreter.po │ ├── introduction.po │ ├── controlflow.po │ ├── datastructures.po │ └── ... ├── library/ # Referensi Pustaka Standar │ ├── functions.po # Fungsi bawaan │ ├── stdtypes.po │ └── ... ├── reference/ # Referensi Bahasa ├── howto/ # Panduan How-To ├── faq/ # FAQ ├── c-api/ # C API Reference ├── whatsnew/ # Catatan What's New per versi │ ├── 3.14.po │ ├── 3.13.po │ └── ... └── glossary.po # Glosarium Python ``` -------------------------------- ### Contribution Workflow via GitHub Source: https://context7.com/python/python-docs-id/llms.txt Steps to fork, clone, checkout the active branch, edit translation files, commit changes, and push for a Pull Request. ```bash # Fork and clone repositori git clone https://github.com/YOUR_USERNAME/python-docs-id.git cd python-docs-id # Checkout branch aktif git checkout 3.14 # Edit berkas terjemahan # Gunakan editor teks atau POEdit vim tutorial/interpreter.po # Commit perubahan git add tutorial/interpreter.po git commit -m "Terjemahkan tutorial/interpreter.po" # Push dan buat Pull Request git push origin 3.14 # Buka GitHub dan buat Pull Request ke python/python-docs-id ``` -------------------------------- ### Konfigurasi Bahasa dan Opsi Sphinx Source: https://github.com/python/python-docs-id/wiki/Membangun-Dokumentasi-Python-di-Komputer Tambahkan konfigurasi bahasa 'id' ke dalam skrip pembangun untuk menyertakan terjemahan bahasa Indonesia dalam proses build. ```python LANGUAGES = ["en", "fr", "ja", "ko", "pt-br", "zh-cn", "zh-tw", "id"] SPHINXOPTS = { # ... yang ada tidak perlu diubah, tambahkan di akhir, sesuaikan indentasi "id": [ "-D latex_engine=xelatex", "-D latex_elements.inputenc=", "-D latex_elements.fontenc=", ], } ``` -------------------------------- ### Format Penandaan Istilah dalam Dokumentasi Source: https://github.com/python/python-docs-id/blob/3.14/README.md Contoh penandaan elemen yang tidak perlu diterjemahkan seperti nama kelas, konstanta, atau fungsi. ```text :attr:`the_answer` :class:`~decimal.Decimal` :const:`True` :data:`sys.stdout` :dfn:`serializing` :exc:`KeyboardInterrupt` :envvar:`PATH` :file:`.profile` :func:`print` :issue:`36817` :keyword:`try` :kbd:`Delete` :meth:`~list.append` :mod:`sitecustomize` :newsgroup:`comp.lang.python` :option:`-s` :pep:`475` :program:`chmod` :samp:`{n}` :source:`Lib/html/entitas.py` :term:`>>>` ``` -------------------------------- ### Panduan Penerjemahan Markup reStructuredText untuk Dokumentasi Python Source: https://context7.com/python/python-docs-id/llms.txt Contoh markup reStructuredText yang tidak boleh diterjemahkan (direktif Sphinx, kode dalam backtick ganda) dan yang boleh diterjemahkan (teks setelah direktif, teks dalam backtick tunggal). Menunjukkan contoh entri .po yang benar. ```rst # JANGAN diterjemahkan - Direktif Sphinx (diapit tanda titik dua) :func:`print` :class:`~decimal.Decimal` :const:`True` :exc:`KeyboardInterrupt` :mod:`sitecustomize` :keyword:`try` :pep:`475` # JANGAN diterjemahkan - Kode dalam backtick ganda ``python.exe`` ``'\n'`` ``.py`` ``#!`` # BOLEH diterjemahkan - Teks dalam backtick tunggal setelah direktif :dfn:`serializing` -> :dfn:`serialisasi` # Contoh entri .po dengan markup yang benar msgid "The :func:`print` function outputs text to the console." msgstr "Fungsi :func:`print` menampilkan teks ke konsol." msgid "Press :kbd:`Control-D` to exit." msgstr "Tekan :kbd:`Control-D` untuk keluar." ``` -------------------------------- ### Struktur Berkas .po untuk Terjemahan Source: https://context7.com/python/python-docs-id/llms.txt Contoh struktur berkas .po yang menunjukkan header metadata dan entri terjemahan dengan msgid (asli) dan msgstr (terjemahan). String kosong pada msgstr menandakan belum diterjemahkan. ```po # Header berkas .po msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Language: id\n" "Content-Type: text/plain; charset=UTF-8\n" "Plural-Forms: nplurals=1; plural=0;\n" # Entri terjemahan msgid "Using the Python Interpreter" msgstr "Menggunakan Interpreter Python" msgid "Built-in Functions" msgstr "Fungsi Bawaan" msgid "Data Structures" msgstr "Struktur Data" # String yang belum diterjemahkan (msgstr kosong) msgid "python3.14" msgstr "" ``` -------------------------------- ### Format Variabel Kustom Source: https://github.com/python/python-docs-id/blob/3.14/README.md Contoh variabel kustom yang diapit oleh backtick ganda yang tidak boleh diterjemahkan. ```text ``#!`` ``'\n'`` ``'\r\n'`` ``'#'`` ``.py`` ``python.exe`` ``.pyw`` ``` -------------------------------- ### Standard Terminology Glossary (Markdown Table) Source: https://context7.com/python/python-docs-id/llms.txt A table listing standard English terms and their Indonesian translations to ensure consistency in translated documentation. ```markdown | Istilah Inggris | Terjemahan Indonesia | |---------------------|----------------------------------------| | built-in | bawaan | | default | bawaan | | file | berkas | | library | pustaka | | standard library | pustaka standar | | exception | pengecualian | | inheritance | pewarisan | | loop | perulangan | | mutable | dapat berubah | | immutable | kekal, tidak dapat berubah | | dictionary | dictionary (tidak diterjemahkan) | | tuple | tuple (tidak diterjemahkan) | | boolean | boolean (tidak diterjemahkan) | | iterator | iterator (tidak diterjemahkan) | | deprecated | usang | | raise | menimbulkan, memunculkan | | returns | mengembalikan | | source code | kode sumber | ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.