sphinx-doc / sphinx

The Sphinx documentation generator
https://www.sphinx-doc.org/
Other
6.46k stars 2.1k forks source link

Yandex Browser ignores the translation ban #12420

Open neznaika0 opened 3 months ago

neznaika0 commented 3 months ago

Describe the bug

Based on https://github.com/sphinx-doc/sphinx/pull/4424 , https://github.com/sphinx-doc/sphinx/issues/5727

The Yandex Browser translator is still trying to translate blocks with the class class="notranslate". The code is translated, spaces are added, or an empty block is shown.

The solution is to add the translate="no" property.

How to Reproduce

  1. Open https://codeigniter4.github.io/userguide/testing/overview.html in YandexBrowser 24.4
  2. Translate page EN -> RU

Environment Information

Platform:              linux; (Linux-6.7.12-amd64-x86_64-with-glibc2.38)
Python version:        3.11.9 (main, Apr 10 2024, 13:16:36) [GCC 13.2.0])
Python implementation: CPython
Sphinx version:        5.3.0
Docutils version:      0.19
Jinja2 version:        3.1.4

Sphinx extensions

extensions = [
    'sphinxcontrib.phpdomain',
    'sphinx_rtd_theme',
]

Additional context

See screenshot bug. Screenshot Translated

n-peugnet commented 3 months ago

Indeed, it seems like it is now the standard way to request browsers not to translate part of a document: https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/translate