-
Notifications
You must be signed in to change notification settings - Fork 23
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
[Feature] translate rich text blocks #402
base: next
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #402 +/- ##
==========================================
+ Coverage 45.95% 47.77% +1.81%
==========================================
Files 47 47
Lines 866 942 +76
Branches 187 211 +24
==========================================
+ Hits 398 450 +52
- Misses 310 322 +12
- Partials 158 170 +12
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
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.
I don't think we should merge this into main
right now. At most as an opt-in via a next
release or something like that.
I agree that the handling of code (both blocks and inline) is not great, not sure what to do here. Same with the clearing of the img cache
plugin/README.md
Outdated
translatedFieldTypes: [ | ||
'string', | ||
{ type: 'block', format: 'jsonb' }, |
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.
Again:
is it block or blocks?
cf. playground/config/plugins.js and root-level README
textArray = formatService.markdownToHtml(textArray) | ||
let input = text | ||
if (format === 'jsonb') { | ||
input = formatService.blockToHtml(input) |
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.
i think the inverse conversion back to blocks format is missing.
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.
translation of blocks-article
type via libretranslate fails, not sure if this is the (only) reason
Is there any progress on this? Would be a very useful feature to have. |
3cb37ca
to
def1f32
Compare
I actually realised that code is currently handled the same with markdown and other html stuff. I believe that this should be made into a separate "known" bug for now. |
8bcc8be
to
083804e
Compare
Adds a new content type with the new blocks rich text format
This implements basic support for the blocks format for the blocks rich text editor fix #401
083804e
to
69bf97b
Compare
This adds experimental support for translating the blocks editor (fixes #401). The current implementation is very rudimentary.
Things to consider before merging: