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 - character moves into inline element #142

Copy link
Copy link
@matsbert

Description

@matsbert
Issue body actions

I am translating large amounts of XML text. Every time when I translate text, a character that preceeds an inline element (superScript) is being moved into the inline element.

Input:

Problemet är att bokstaven före superScript elementet flyttas in i inline elementet: tank rymmer 48 m3 och tanken rymmer 43 m3. Lite mer text här.

Translated output:

The problem is that the letter preceding the superScript element is being moved into the inline element: tank holds 48m3 and the tank holds 43m3. A little more text here.

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

I have noticed that adding the superScript element to the 'ignore_tags' attribute will help. The unfortunate thing is that the superScript element can also contain other text that must be translated.

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.