Re: [PATCH 13/22] docs: zh_CN: avoid duplicate citation references

From: Mauro Carvalho Chehab
Date: Tue Jun 04 2019 - 06:25:01 EST


Em Sun, 2 Jun 2019 23:01:21 +0800
Alex Shi <alex.shi@xxxxxxxxxxxxxxxxx> escreveu:

> On 2019/5/30 7:23 äå, Mauro Carvalho Chehab wrote:
> > Documentation/process/management-style.rst:35: WARNING: duplicate label decisions, other instance in Documentation/translations/zh_CN/process/management-style.rst
> > Documentation/process/programming-language.rst:37: WARNING: duplicate citation c-language, other instance in Documentation/translations/zh_CN/process/programming-language.rst
> > Documentation/process/programming-language.rst:38: WARNING: duplicate citation gcc, other instance in Documentation/translations/zh_CN/process/programming-language.rst
> > Documentation/process/programming-language.rst:39: WARNING: duplicate citation clang, other instance in Documentation/translations/zh_CN/process/programming-language.rst
> > Documentation/process/programming-language.rst:40: WARNING: duplicate citation icc, other instance in Documentation/translations/zh_CN/process/programming-language.rst
> > Documentation/process/programming-language.rst:41: WARNING: duplicate citation gcc-c-dialect-options, other instance in Documentation/translations/zh_CN/process/programming-language.rst
> > Documentation/process/programming-language.rst:42: WARNING: duplicate citation gnu-extensions, other instance in Documentation/translations/zh_CN/process/programming-language.rst
> > Documentation/process/programming-language.rst:43: WARNING: duplicate citation gcc-attribute-syntax, other instance in Documentation/translations/zh_CN/process/programming-language.rst
> > Documentation/process/programming-language.rst:44: WARNING: duplicate citation n2049, other instance in Documentation/translations/zh_CN/process/programming-language.rst
> >
> > Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@xxxxxxxxxx>
> > ---
> > .../zh_CN/process/management-style.rst | 4 +--
> > .../zh_CN/process/programming-language.rst | 28 +++++++++----------
> > 2 files changed, 16 insertions(+), 16 deletions(-)
> >
> > diff --git a/Documentation/translations/zh_CN/process/management-style.rst b/Documentation/translations/zh_CN/process/management-style.rst
> > index a181fa56d19e..c6a5bb285797 100644
> > --- a/Documentation/translations/zh_CN/process/management-style.rst
> > +++ b/Documentation/translations/zh_CN/process/management-style.rst
> > @@ -28,7 +28,7 @@ Linuxåæççéæ
> >
> > äçææïèéæï
> >
> > -.. _decisions:
> > +.. _cn_decisions:
> >
> > 1ïåç
> > -------
> > @@ -108,7 +108,7 @@ Linuxåæççéæ
> > äæïääååääåæççèçååïæåèääèçæääææïäèèçää
> > æèçææïääèçèååçåæååäåãäåèæïçèäæçååæçïè
> > äèääçèçäæåéçãåæïâçèâçååäâäåéâçèçïåææ
> > -:ref:`decisions` æäçäåäåçäæã
> > +:ref:`cn_decisions` æäçäåäåçäæã
>
> It's good to have.
>
> >
> > èéåæåäçåçèåï
> >
> > diff --git a/Documentation/translations/zh_CN/process/programming-language.rst b/Documentation/translations/zh_CN/process/programming-language.rst
> > index 51fd4ef48ea1..9de9a3108c4d 100644
> > --- a/Documentation/translations/zh_CN/process/programming-language.rst
> > +++ b/Documentation/translations/zh_CN/process/programming-language.rst
> > @@ -8,21 +8,21 @@
> > çåèèèè
> > ============
> >
> > -åææçCèè [c-language]_ çåçãæåçåèïåæéåæç ``gcc`` [gcc]_
> > -å ``-std=gnu89`` [gcc-c-dialect-options]_ äçèçïISO C90ç GNU æèï
> > +åææçCèè [cn_c-language]_ çåçãæåçåèïåæéåæç ``gcc`` [cn_gcc]_
>
> this change isn't good. cn_gcc will show in docs, it looks wired and confusing for peoples. other changes have the same issue. Could you find other way to fix the warning? or I'd rather tolerant it.

Well, Sphinx has a way to do that, like, for example:

diff --git a/Documentation/translations/zh_CN/process/programming-language.rst b/Documentation/translations/zh_CN/process/programming-language.rst
index 9de9a3108c4d..353fb8eaf4b5 100644
--- a/Documentation/translations/zh_CN/process/programming-language.rst
+++ b/Documentation/translations/zh_CN/process/programming-language.rst
@@ -9,7 +9,7 @@
============

åææçCèè [cn_c-language]_ çåçãæåçåèïåæéåæç ``gcc`` [cn_gcc]_
-å ``-std=gnu89`` [cn_gcc-c-dialect-options]_ äçèçïISO C90ç GNU æèï
+å ``-std=gnu89`` :ref:`gcc C dialect options <cn_gcc-c-dialect-options>` äçèçïISO C90ç GNU æèï
åæääC99çæï

èçæèåååèè [cn_gnu-extensions]_ çèåæåïåçïåäèåéååæääçã

If we use that, at least for some of those references, it would probably
be better to translate "dialect-options" (and similar terms) to Chinese.

Thanks,
Mauro