-
Notifications
You must be signed in to change notification settings - Fork 338
⚡️Improve AI translations formatting #662
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
Conversation
0bd97a5
to
bf22553
Compare
bf22553
to
8133d29
Compare
3e8a2cf
to
e8161b9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great improvements !
Just so that we are aware.
We still have loss with
- Blockquotes
- Background color of blocks are lost
- Some formatting is loss inside paragraph.
We loose the custom blocks yes, background and usual formatting are normally not lost anymore, but it can happen yes. |
The ai translation were quite lossy about formatting. Colors, background, breaklines, table sizes were lost in the translation. We improve the AI translation request to keep the formatting as close as possible by using html instead of markdown.
The beautify action add emojis to the important parts of the text and add formatting to the text to make it more readable.
The emojify action add emojis to the important parts of the text.
Use the blockquote tag for quote block instead of a paragraph tag.
e8161b9
to
77467f6
Compare
J'ai review aussi c'est top. Passer par l'export html me semble bien, au pire on aura des artifacts de balise html si jamais le modèle se plante. |
Purpose
To translate with the AI we are using lossy functions
blocksToMarkdownLossy
/tryParseMarkdownToBlocks
, it transforms the content editor to markdown. The problem is this transpilation is very lossy, we loose color, background, table size, line break etc...Proposal
We will use html instead of markdown to do the translation, html can carry much more information that markdown about the content style.
Demo
What we have now with markdown :
scrnli_Ug6vr23om8ZN8E.webm
With preserved formatting :
scrnli_aTe1Ed2p695SF2.webm
Feature Beautify
scrnli_v7YQ56N18Q3O5n.webm