Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

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

Aperta Adatta ai principianti
#15,812 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
83/100
Tipo di issue
Funzionalità
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
python

Direzione di ricerca

Inizia da _templates/versions.html e dalla configurazione gettext usata da make gettext; l’issue propone di elencare quattro etichette di versione di Sphinx in questo template analizzato, così che vengano incluse in sphinx.pot. Controlla il catalogo generato per confermare che tutte e quattro le stringhe siano estratte, quindi verifica che la compilazione della documentazione continui a usare le traduzioni integrate di Sphinx quando manca una traduzione del progetto.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
JavaScript
Stelle
633
Fork
2.6k
Merge medio
16h 42m
PR unite (30g)
121

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di nextcloud/documentation

Tutte le issue di nextcloud/documentation

Issue simili

Altre issue su JavaScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.