Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Translate Sphinx's version labels ("Added in version") through our own sphinx.pot

オープン 初心者向け
#15,812 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
83/100
issue の種類
機能追加
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
python

調査の方向性

_templates/versions.html と make gettext が使用する gettext 設定から始めます。issue では、この走査対象のテンプレートに Sphinx のバージョンラベルを 4 つ列挙し、それらが sphinx.pot に含まれるようにすることを提案しています。生成されたカタログを確認して 4 つの文字列すべてが抽出されていることを確かめ、その後、プロジェクトの翻訳がない場合もドキュメントのビルドで Sphinx 組み込みの翻訳が引き続き使われることを確認します。

索引モデルが issue の本文から書いたものです。

説明

0. needs triage

Found this as part of my effort to translate the documentation.

The label that Sphinx puts in front of every .. versionadded:: block is shown in English in most translated manuals, for example "Added in version 5.7: Nextcloud 32 or later" on the Danish desktop pages (40 places in the Danish user manual).

The label comes from Sphinx's own message catalog, not from ours. Sphinx renamed it from "New in version %s" to "Added in version %s" in 7.3, and in Sphinx 8.1.3, which requirements.txt pins, the new string is untranslated for 29 of the user manual's 40 languages:

ar, cs, da, de_DE, el, es, fi_FI, gl, hu_HU, id, it, ja_JP, ko, lt, nb_NO, nl, pl, pt_PT, ro, si, sk_SK, sr, sv, ta, tr, uk_UA, vi, zh_CN, zh_HK

Six more (br, ga, lo, mn, nn, uz) have no Sphinx catalog at all. Only ca, fr, pt_BR, ru and zh_TW have it.

Proposal: let the labels go through our own sphinx.pot, which Transifex already handles. Our project catalog for the sphinx domain is loaded before Sphinx's built-in one, which is why "Search docs", "Languages" and "Versions" already appear translated. If the gettext build also extracted the four version labels, every language team could translate them in the "Nextcloud user documentation" project, and they would show on the next build.

One way to get them extracted is a line in a template that make gettext already scans, e.g. _templates/versions.html:

{#- Sphinx's own version labels, listed here so they reach sphinx.pot and Transifex -#}
{%- set _version_labels = [_('Added in version %s'), _('Changed in version %s'), _('Deprecated since version %s'), _('Removed in version %s')] -%}

Strings left untranslated in our catalog fall back to Sphinx's built-in translation, so languages that already have them lose nothing.

The alternative is to wait for the labels to be translated upstream (Danish was added to Sphinx's Transifex project today) and then upgrade Sphinx, which only helps the languages someone translates there.

AI

Used Claude Opus 5.5 to assist with the analysis and this write-up.

主要言語
JavaScript
スター
633
フォーク
2.6k
平均マージ
16時間 42分
マージ済み PR(30日)
121

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

nextcloud/documentation のほかの issue

nextcloud/documentation の issue をすべて見る

似ている issue

JavaScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。