Skip to content

Add support for translating HTML blocks #254

@shinmili

Description

@shinmili

The current implementation of mdbook-xgettext extracts (inline) raw HTML tags as translatable, but skips HTML blocks. So the extracted .po file has msgid for this img:

...

<img alt="Two tables: the first table contains the representation of s1 on the
stack, consisting of its length (5), capacity (5), and a pointer to the first
value in the second table. The second table contains the representation of the
string data on the heap, byte by byte." src="img/trpl04-01.svg" class="center"
style="width: 50%;" />

...

but not for this img:

...

<img alt="Rendered HTML documentation for the `add_one` function of `my_crate`" src="img/trpl14-01.png" class="center" />

...

I want the latter one to be translatable too, especially for alt texts. Why does it skip HTML blocks?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions