Skip to content

Support for data-translate-ignore #17867

@nclm

Description

@nclm

Describe the issue

The Translate Toolkit now has support for the data-translate-ignore attribute (and <!-- translate:off --> and <!-- translate:on --> comments) and when translating HTML (see translate/translate#5760). However, Weblate (5.15.2) doesn’t seem to take those into account and provide the marked items for translation even though they shouldn’t.

I already tried

  • I've read and searched the documentation.
  • I've searched for similar filed issues in this repository.

Steps to reproduce the behavior

  • Add data-translate-ignore to some HTML elements in your source document
  • Go into Weblate
  • Notice that the elements are still offered for translation

Expected behavior

Ideally, the elements shouldn’t even appear in Weblate at all.

At the very least, they should get a read-only or some kind of ignore flag.

Screenshots

How it is in the source:

      <ul class="lang-menu" data-translate-ignore>
        <li><a href="/ar" lang="ar">العربية</a></li>
        <li><a href="/ca" lang="ca">Català</a></li>
        <li><a href="/de" lang="de">Deutsch</a></li>
        <li><a href="/en" lang="en">English</a></li>
        <li><a href="/eo" lang="eo">Esperanto</a></li>
        <li><a href="/es" lang="es">Español</a></li>
        <li><a href="/eu" lang="eu">Euskara</a></li>
        <li><a href="/fa" lang="fa">فارسی</a></li>
        <li><a href="/fr" lang="fr">Français</a></li>
        <li><a href="/gl" lang="gl">Galego</a></li>
        <li><a href="/he" lang="he">עברית</a></li>
        <li><a href="/id" lang="id">Bahasa Indonesia</a></li>
        <li><a href="/it" lang="it">Italiano</a></li>
        <li><a href="/ko" lang="ko">한국어</a></li>
        <li><a href="/pt-br" lang="pt-br">Português&nbsp;(Brasil)</a></li>
        <li><a href="/ru" lang="ru">Русский</a></li>
        <li><a href="/uk" lang="uk">Українська</a></li>
        <li><a href="/zh-hans" lang="zh-hans">汉语</a></li>
      </ul>

How it appears in Weblate:

How do you run Weblate?

Other

Weblate versions

Weblate 5.15.2 on https://translate.codeberg.org

Metadata

Metadata

Assignees

No one assigned

    Labels

    Waiting for: TriageAssigned automatically for any new issue, needs attention from a Weblate member.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions