Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

XML translation - Doctype statement turns < and > characters into entity characters #143

Copy link
Copy link
@matsbert

Description

@matsbert
Issue body actions

When translating XML documents, the doctype statement is not properly handled. The less than and greater than characters surrounding the DOCTYPE statement are being converted to entities:

Before translation:

<!ENTITY ICN-S1000DBIKE-AAA-D000000-0-U8025-00536-A-04-1 SYSTEM "ICN-S1000DBIKE-AAA-D000000-0-U8025-00536-A-04-1.CGM" NDATA cgm >

]>

After translation:

<!DOCTYPE dmodule[

<!ENTITY ICN-S1000DBIKE-AAA-D000000-0-U8025-00536-A-04-1 SYSTEM "ICN-S1000DBIKE-AAA-D000000-0-U8025-00536-A-04-1.CGM" NDATA cgm > ]&gt;

Code:

result = deepl_client.translate_text(
    text,
    tag_handling="xml",
    source_lang="SV",
    target_lang="EN-GB",
    model_type="prefer_quality_optimized",
    non_splitting_tags="div",
    split_sentences="nonewlines"
)

I have heard that DeepL is working on improving the tag handling, is there an expected timeframe for this?

Any settings that could help improve this situation?

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.