sphinx-doc/sphinx

allow to specify translation context

Open

#8,251 建立於 2020年9月28日

在 GitHub 查看
 (0 留言) (1 反應) (0 負責人)Python (1,985 fork)batch import
help wantedinternals:internationalisationtype:enhancement

倉庫指標

Star
 (5,625 star)
PR 合併指標
 (平均合併 10天 11小時) (30 天內合併 11 個 PR)

描述

Is your feature request related to a problem? Please describe. Sometimes you need to have separate translations for the same source strings.

Describe the solution you'd like This is accomplished by translation contexts, eg

#: src/gui/widgets/preferences.c:858
msgctxt "guilabel"
msgid "Plugins"
msgstr "プラグイン"

Here, the string "Plugins" is for the translation context "guilabel". There might be another string "Plugins" for another translation context, where the translation will be different.

There should be a way to optionally specify translation contexts, either, per-string, or per-document, or for the whole project that sphinx is translating.

Describe alternatives you've considered N/A

Additional context See Contexts in gettext manual: https://www.gnu.org/software/gettext/manual/html_node/Contexts.html

貢獻者指南