From: Weijie Yuan <wy@wyuan.org>
To: Daniel Pereira <danielmaraboo@gmail.com>
Cc: Jonathan Corbet <corbet@lwn.net>,
Shuah Khan <skhan@linuxfoundation.org>,
Randy Dunlap <rdunlap@infradead.org>, Alex Shi <alexs@kernel.org>,
Yanteng Si <si.yanteng@linux.dev>,
Dongliang Mu <dzm91@hust.edu.cn>,
Chen-Yu Yeh <chenyou910331@gmail.com>,
Federico Vaga <federico.vaga@vaga.pv.it>,
Akira Yokosawa <akiyks@gmail.com>,
Carlos Bilbao <carlos.bilbao@kernel.org>,
Jani Nikula <jani.nikula@linux.intel.com>,
linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 1/2] docs: doc-guide: add a guide for translators
Date: Sat, 28 Nov 2026 22:34:43 +0800 [thread overview]
Message-ID: <awrmgxPwwPICvTVG@wyuan.org> (raw)
In-Reply-To: <20261119041009.63651-2-danielmaraboo@gmail.com>
On Thu, Nov 19, 2026 at 01:10:08AM -0300, Daniel Pereira wrote:
[...]
> +Labels
> +------
> +
> +Sphinx labels (``.. _label:``) are global to the whole documentation
> +build. A label copied unchanged from the original therefore defines the
> +same name twice, which breaks the build or, at best, makes references
> +resolve to the wrong document.
> +
> +- Labels placed at the very top of a file are usually not needed at all
> + in the translation; simply drop them.
> +
> +- Labels that are needed, for example because other parts of the
> + translated document refer to them, must be made unique by adding a
> + language prefix. Each translation already uses one; look at existing
> + files to find it (``it_``, ``sp_``, ``cn_``, ``tw_``, ``pt_``, ...)::
> +
> + .. _it_process_howto:
> +
> +- References to labels of the English documentation are fine and
> + expected. When the target document is not translated yet, linking to
> + the English version is the right thing to do.
So sorry for bringing up this matter just now, here's what's recently
re-discussed in zh_CN:
Some contributors are adding unused (not referred) labels when sending
translations. Basically, in most(?) cases, they see this label in the
original English text, so they add it accordingly (and with "sp_").
So far, sorry that I haven't systematically investigated the situation
where these labels are cited. But I have come across some examples where
the labels in the original English text were not used at all. So the
labels in the newly added translation will definitely not be used. Or
there is another situation where the labels used in the original English
text come from articles that do not yet exist in this translation, or
vice versa.
For consistency, on the Simplified Chinese side, we have roughly decided
to follow the first principle, that is, do not add labels that have not
been used; if it needs to be used in the future, then add it in the
subsequent patches. However, it should be pointed out that this might
require more work from contributors and reviewers, because sphinx does
not warn labels that are not in use; therefore I mainly grep them every
time.
The following point may be beyond the scope of discussion in this patch
set: Currently, it is not seen in the existing documentation (sorry if I
missed any docs): Do not add unused labels. Do we need to notify it in
the existing documents not to do this? This might be helpful in
preventing the introduction of unused labels in new translations.
This is only the discussion result reached between me and Dongliang Mu.
It may not be applicable to all languages. Suggestions from everyone are
welcome as well.
Related thread:
https://lore.kernel.org/linux-doc/9d2b25e4-c5a0-4ef0-8698-1a622d05223e@hust.edu.cn/
Thanks.
next prev parent reply other threads:[~2026-11-28 14:34 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-19 4:10 [PATCH v3 0/2] docs: add a guide for translators Daniel Pereira
2026-11-19 4:10 ` [PATCH v3 1/2] docs: doc-guide: " Daniel Pereira
2026-11-23 12:19 ` Federico Vaga
2026-11-23 13:35 ` Dongliang Mu
2026-11-23 13:41 ` Weijie Yuan
2026-11-28 14:34 ` Weijie Yuan [this message]
2026-11-19 4:10 ` [PATCH v3 2/2] docs: pt_BR: translate doc-guide/translations.rst Daniel Pereira
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=awrmgxPwwPICvTVG@wyuan.org \
--to=wy@wyuan.org \
--cc=akiyks@gmail.com \
--cc=alexs@kernel.org \
--cc=carlos.bilbao@kernel.org \
--cc=chenyou910331@gmail.com \
--cc=corbet@lwn.net \
--cc=danielmaraboo@gmail.com \
--cc=dzm91@hust.edu.cn \
--cc=federico.vaga@vaga.pv.it \
--cc=jani.nikula@linux.intel.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rdunlap@infradead.org \
--cc=si.yanteng@linux.dev \
--cc=skhan@linuxfoundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox