10000 inconsistent term references in translated message: not on every cases · Issue #3985 · sphinx-doc/sphinx · GitHub
[go: up one dir, main page]

Skip to content
inconsistent term references in translated message: not on every cases #3985
@JulienPalard

Description

@JulienPalard

Subject: On some specific translations, some references are hard to keep, or it may be usefull to duplicate them, a way to mute a warning locally should be provided.

Problem

  • We're getting some hard to fix "inconsistent term references in translated message".

Procedure to reproduce the problem

In a .po file, translate a paragraph containing term references, but remove or add one.

Error logs / results

WARNING: inconsistent term references in translated message

Expected results

It is expected to have this WARNING, and it's nice, it helps to spot translation errors, but sometimes we'd like to disable it for a specific paragraph.

Possible fixes I see are:

  • Allow a po translator comment to disable those warnings, like noqa
  • Don't warn if the references are present in the translation, just not the right number of them

I think the second fix is enough for our cases, typically the sentence:

Foo :ref:`a` bar :ref:`a` baz :ref:`b`.

When translated as:

Lorem :ref:`b` ipsum :ref:`a`.

currently warns, (invalid "number" of references) but all references are here, and maybe the redundency in not necessary in the translated message.

Reproducible project / your project

Environment info

  • OS: Debian buster
  • Python version: 3.5.3
  • Sphinx version: 1.6.1

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0