python / python/python-docs-es
`pospell` fails with code entries
まだ誰も着手していません。
- 主要言語
- Python
- スター
- 371
- フォーク
- 413
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
For 3.13, there was a change in the documentation that now snippets were marked as translatable.
This means that there is a large number of "new entries" that are snippets from the documentation page.
Even though I believe this is a great thing, the tooling around might need to be adapted.
Recently I discovered that in some cases, pospell fails to parse and handle such entries.
For example:
#: ../Doc/library/typing.rst:3167
msgid ""
"@type_check_only\n"
"class Response: # private or not available at runtime\n"
" code: int\n"
" def get_header(self, name: str) -> str: ...\n"
"\n"
"def fetch_response() -> Response: ..."
msgstr ""
"@type_check_only\n"
"class Response: # privada o no disponible en runtime\n"
" code: int\n"
" def get_header(self, name: str) -> str: ...\n"
"\n"
"def fetch_response() -> Response: ..."
Produces a
<rst-doc>:3: (ERROR/3) Unexpected indentation. while parsing: @type_check_only
class Response: # privada o no disponible en runtime
code: int
def get_header(self, name: str) -> str: ...
def fetch_response() -> Response: ...
Marking those entries as fuzzy or adding three back-ticks "```" doesn't work, so I'm trying to brainstorm a bit how we could solve this.
A couple of ideas would be to:
- Just try to fix at the docutils level (which is the source of the parsing error)
- Introduce a new identifier like
python-formatin order to take the content for granted and avoid parsing it.
Ideas?
CC: @JulienPalard
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
Doc/library/typing.rst から参照されている複数行の PO エントリで失敗を再現し、その後、pospell がコードエントリを docutils に渡す方法を調査してください。必要な変更を pospell に行うべきか、docutils レベルで行うべきかを判断してください。完了とは、報告された parsing error なしにこれらのエントリが処理されることを意味します。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- python
- 領域
- documentation, tooling
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 25/100