Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Translation removes the italic formatting #66

Open
nucleus-ffm opened this issue Apr 18, 2024 · 3 comments
Open

Translation removes the italic formatting #66

nucleus-ffm opened this issue Apr 18, 2024 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@nucleus-ffm
Copy link

nucleus-ffm commented Apr 18, 2024

Conditions:

  • OS: Linux
  • App Version: Latest
  • Source language: German
  • Target language: English
  • Translation service: Deepl-API

Source file:

_Markdown Docs Translator ist ein automatischer Übersetzer für Markdown-Dokumente, der mit Python entwickelt wurde. Das Tool unterstützt mehrere Übersetzungsdienste und bietet eine Vielzahl von Optionen zur Anpassung des Übersetzungsprozesses._

Expected translation:

_Markdown Docs Translator is an automatic translator for Markdown documents developed with Python. The tool supports multiple translation services and offers a variety of options to customize the translation process._

Actual translation:

Markdown Docs Translator is an automatic translator for Markdown documents developed with Python. The tool supports multiple translation services and offers a variety of options to customize the translation process.

Additional context [Optional]
It seems that the translation does not correctly preserve the formatting of italicized sentences. Individual words work without problems.

@nucleus-ffm nucleus-ffm added the bug Something isn't working label Apr 18, 2024
@nucleus-ffm
Copy link
Author

is there an update on this issue?

@ilyachch
Copy link
Owner

Hi, @nucleus-ffm!

Sorry for such a long answer. I can confirm the problem. Also, as I found out, this is caused with deepl api. Web version translation saves italic marks, but api responses with cleared text (that is not obvious=()

Also, I think, the most obvious way to fix it (send different parts of Paragraph) is not the best - the translation can vary depending on context.

The second way is to do recursive translation inside-out - Find the most nested element, translate it, substitute in parent and so on. But will make translation process much more long and, potentially can cause money drainage if translation uses paid plan.

In my opinion, the best way - is to check if the container contains only one nested block and if so, translate inner block (with the same check also). Some kind of recursive search inside to find the most deep common container. Instead on previous option, this can save additional money (deepl api charges for symbols).

@ilyachch
Copy link
Owner

After thinking about it, I have a question: is it has to be fixed? Since it's a third-party service issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants