Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

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

Đang mở Phù hợp với người mới
#15,812 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
83/100
Loại issue
Tính năng
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
python

Hướng nghiên cứu

Bắt đầu với _templates/versions.html và cấu hình gettext được make gettext sử dụng; issue đề xuất liệt kê bốn nhãn phiên bản Sphinx trong template được quét này để chúng được đưa vào sphinx.pot. Kiểm tra catalog đã tạo để xác nhận cả bốn chuỗi đều được trích xuất, sau đó xác minh rằng quá trình build tài liệu vẫn sử dụng các bản dịch tích hợp sẵn của Sphinx khi thiếu bản dịch của dự án.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
JavaScript
Star
633
Fork
2.6k
Merge trung bình
16 giờ 42 phút
Pull request đã merge (30 ngày)
121

Chuẩn bị môi trường

Mở trong Codespaces

Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của nextcloud/documentation

Tất cả issue của nextcloud/documentation

Issue tương tự

Thêm issue về JavaScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.