sphinx-doc/sphinx

allow to specify translation context

Open

#8.251 aberto em 28 de set. de 2020

Ver no GitHub
 (0 comments) (1 reaction) (0 assignees)Python (1.985 forks)batch import
help wantedinternals:internationalisationtype:enhancement

Métricas do repositório

Stars
 (5.625 stars)
Métricas de merge de PR
 (Mesclagem média 10d 11h) (11 fundiu PRs em 30d)

Description

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

Guia do colaborador