Localization of The Requests Documentation
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 28/100
- issue の種類
- ドキュメント
- 明瞭さ
- 説明が足りない
- 活発さ
- 静か
- 技術スタック
- github-actions, python
調査の方向性
まず、リンクされている .github/workflows/ci-sphinx-update-pot.yml と ci-gettext-update-po.yml の workflow を読み、続いて docs/requirements.txt と Sphinx のビルドコマンドを確認してください。この Issue では外部の翻訳プロジェクトとメンテナンスプロセスについて説明されていますが、具体的なリポジトリの変更や受け入れ基準は定義されていないため、具体的な次のステップと Definition of Done がまだ必要です。
索引モデルが issue の本文から書いたものです。
説明
Announcement
Hello Requests Community,
I am the author of the @localizethedocs organization. And I’m glad to announce that the 🎉 requests-docs-l10n 🎉 project is published now:
- 🚀 Preview: requests-docs-l10n
- 🌐 Crowdin: requests-docs-l10n
- 🐙 GitHub: requests-docs-l10n
The goal of this project is to translate The Requests Documentation into multiple languages. Translations are contributed via the Crowdin platform, automatically synchronized with the GitHub repository, and can be previewed on GitHub Pages.
How to Contribute Translations?
To contribute the translations to the project, just follow the following steps:
- Create an account on Crowdin Enterprise if you don't have one.
- Log in and go the requests-docs-l10n project.
- Choose the language you would like to contribute.
If translators want to translate a language that is not yet supported, they just need to open a new issue to request the new language. Once the requested language is added, they can begin translating.
How to Keep Content Up-to-date?
An FAQ that is sure to come up in the Requests community is: How to keep translations up-to-date?
First and foremost, in my opinion, the focus should be on how to keep the "Translatable Content (msgid)" up-to-date, rather than the "Translations (msgstr)". I will focus on the most critical part of the whole infrastructure here.
In short, the ci-sphinx-update-pot.yml workflow will be executed weekly to check the upstream project for any required updates to the document content, which in turn triggers the update of the .pot files. If an update is needed, a Pull Request (PR) is automatically created to merge into the l10n branch. For example:
- https://github.com/localizethedocs/requests-docs-l10n/pull/2
- https://github.com/localizethedocs/requests-docs-l10n/pull/3
Once those PRs are merged, the ci-gettext-update-po.yml workflow will be triggered to merge the updated content from the .pot files into the .po files for each language. This is essentially how it keeps the "Translatable Content" up-to-date.
Therefore, the core responsibility of the code maintainers, besides ensuring the stable operation of the scripts and workflows, is to regularly check whether there are any pending PRs that need to be merged.
How to Reuse Translations?
If the upstream project or anyone wants to reuse the translated .po files prepared by the requests-docs-l10n project, they can clone the .po files from the po/${VERSION} branch by using the following command:
git clone --depth=1 --branch=po/${VERSION} https://github.com/localizethedocs/requests-docs-l10n.git docs/locale
Those po/${VERSION} branches are created to facilitate reusage by the upstream project. For instance, the zh_TW documentation for the latest version can be generated using the commands below:
BRANCH=main
VERSION=latest
LANGUAGE=zh_TW
BUILDER=html
# Prepare the repository and environment
git clone --branch=${BRANCH} https://github.com/psf/requests.git requests-docs
cd requests-docs
conda create --prefix ./.conda --yes
conda activate ./.conda
conda install python=3.13 -c conda-forge -c nodefaults --yes
export PYTHONNOUSERSITE=1
pip install . -r docs/requirements.txt
# Clone the .po files to the 'locale' directory
git clone --branch=po/${VERSION} --depth=1 https://github.com/localizethedocs/requests-docs-l10n.git docs/locale
# Build the documentation
sphinx-build \
-b ${BUILDER} \
-D language=${LANGUAGE} \
-D locale_dirs=locale \
-D gettext_compact=0 \
-D gettext_additional_targets=index,literal-block,raw \
docs \
docs/_build/${LANGUAGE}
# Preview the documentation
firefox docs/_build/${LANGUAGE}/index.html
Related Discussions
There were issues and PRs related to documentation translations:
- https://github.com/psf/requests/issues/3033
- https://github.com/psf/requests/issues/624
- https://github.com/psf/requests/issues/5902
- https://github.com/psf/requests/issues/5518
- https://github.com/psf/requests/issues/2750
- https://github.com/psf/requests/issues/5679
- https://github.com/psf/requests/issues/3221
- https://github.com/psf/requests/issues/2744
- https://github.com/psf/requests/issues/6142
- https://github.com/psf/requests/pull/1330
- https://github.com/psf/requests/pull/2746
- https://github.com/psf/requests/pull/2751
- https://github.com/psf/requests/pull/6144
And the @requests community once actively maintained documentation translations through the "source translation" method:
- Chinese: https://github.com/requests/requests-docs-cn
- Japanese: https://github.com/requests/requests-docs-jp
- German: https://github.com/requests/requests-docs-de
- French: https://github.com/requests/requests-docs-fr
- Polish: https://github.com/requests/requests-docs-pl
- Portuguese: https://github.com/requests/requests-docs-pt
- Dutch: https://github.com/requests/requests-docs-nl
- Bulgarian: https://github.com/requests/requests-docs-bg
- Arabic: https://github.com/requests/requests-docs-ar
- Danish: https://github.com/requests/requests-docs-da
- Italian: https://github.com/requests/requests-docs-it
However, these efforts were eventually abandoned and became unmaintainable for various reasons. Notably, issue #3033 suggested migrating documentation translations to a TMS platform. Therefore, I believe that the requests-docs-l10n project should be able to serve this purpose.
- 主要言語
- Python
- スター
- 54.7k
- フォーク
- 10.8k
- 平均マージ
- 18分
- マージ済み PR(30日)
- 1
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
psf/requests のほかの issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
-
`iter_lines(decode_unicode=True, delimiter=<str>)` raises `TypeError` when `Response.encoding` is `None`再び着手できるかも このイシューのプルリクエストはマージされずにクローズされました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
-
get_encoding_from_headers treats any content type containing 'text' as text/* (ISO-8859-1)対応中かも @suyashgitt が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
Invalid `params` type (e.g. int) raises misleading "TypeError: Cannot mix str and non-str arguments"オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
似ている issue
-
add entry to blockオープン
難易度 1/5 1時間未満 初心者へのやさしさ 65/100
StevenBlack/hosts#3299 ·
-
`garak --report` overwrites the input report when its name has no ".report"対応中かも @0z5a が今日担当しました。 オープンneeds-triage
難易度 2/5 半日 初心者へのやさしさ 72/100
メンテナーはふだん 2 日以内に返信
-
plot_graph crashes when a mesh node has no m2m edge対応中かも @tygvi が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
mllam/neural-lam#883 · コメント 1 件 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
future-agi/future-agi#4092 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
transcript analytics: a text whose only protected spans the prose pass redacts is withheld wholeオープン
難易度 1/5 1時間未満 初心者へのやさしさ 82/100
WingedGuardian/GENesis-AGI#4641 ·
メンテナーはふだん 1 日以内に返信