-
Notifications
You must be signed in to change notification settings - Fork 15
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
Advanced Markdown and HTML translation #25
Comments
Since some providers do not handle Markdown or HTML out of the box, this feature enables the configuration and handling of different text formats. There are 3 different formats defined: plain, markdown and html. On translation fields are grouped by their format and submitted per format to the provider. Providers can either translate the text in the respective format or optionally parse them to a format supported by them. There is a new service defined, that allows the parsing between html and markdown. BREAKING CHANGE: Translate service api requires array of objects of shape {field:string,format:string} instead of just the field as string fix #25
Since some providers do not handle Markdown or HTML out of the box, this feature enables the configuration and handling of different text formats. There are 3 different formats defined: plain, markdown and html. On translation fields are grouped by their format and submitted per format to the provider. Providers can either translate the text in the respective format or optionally parse them to a format supported by them. There is a new service defined, that allows the parsing between html and markdown. BREAKING CHANGE: Translate service api requires array of objects of shape {field:string,format:string} instead of just the field as string fix #25
Since some providers do not handle Markdown or HTML out of the box, this feature enables the configuration and handling of different text formats. There are 3 different formats defined: plain, markdown and html. On translation fields are grouped by their format and submitted per format to the provider. Providers can either translate the text in the respective format or optionally parse them to a format supported by them. There is a new service defined, that allows the parsing between html and markdown. BREAKING CHANGE: Translate service api requires array of objects of shape {field:string,format:string} instead of just the field as string fix #25
Since some providers do not handle Markdown or HTML out of the box, this feature enables the configuration and handling of different text formats. There are 3 different formats defined: plain, markdown and html. On translation fields are grouped by their format and submitted per format to the provider. Providers can either translate the text in the respective format or optionally parse them to a format supported by them. There is a new service defined, that allows the parsing between html and markdown. BREAKING CHANGE: Translate service api requires array of objects of shape {field:string,format:string} instead of just the field as string fix #25
Closing this since implementation merged into next |
Since some providers do not handle Markdown or HTML out of the box, this feature enables the configuration and handling of different text formats. There are 3 different formats defined: plain, markdown and html. On translation fields are grouped by their format and submitted per format to the provider. Providers can either translate the text in the respective format or optionally parse them to a format supported by them. There is a new service defined, that allows the parsing between html and markdown. BREAKING CHANGE: Translate service api requires array of objects of shape {field:string,format:string} instead of just the field as string fix #25
# strapi-provider-translate-deepl 1.0.0-next.1 (2022-11-13) ### Features * handle format of text field types ([94570e0](94570e0)), closes [#25](#25) * **provider system:** use a provider system, renames the plugin to strapi-plugin-translate ([dcde4af](dcde4af)), closes [#30](#30) [#26](#26) * **setup:** parse default environment variables ([da79089](da79089)) ### BREAKING CHANGES * Translate service api requires array of objects of shape {field:string,format:string} instead of just the field as string * **provider system:** Rename plugin to strapi-plugin-translate ### Dependencies * **strapi-plugin-translate:** upgraded to 1.0.0-next.1
# 1.0.0-next.1 (2022-11-13) ### Bug Fixes * 413 Error when fields are too large ([f9f1f4a](f9f1f4a)) * do not translate localizations ([351156c](351156c)) * function formatComponentData was renamed in helper-plugin ([adc2637](adc2637)) * show deepl section only with appropriate permissions ([093cec4](093cec4)) ### Features * **admin:** update translate icon ([9bf1c07](9bf1c07)) * handle format of text field types ([94570e0](94570e0)), closes [#25](#25) * **provider system:** use a provider system, renames the plugin to strapi-plugin-translate ([dcde4af](dcde4af)), closes [#30](#30) [#26](#26) * **setup:** parse default environment variables ([da79089](da79089)) ### BREAKING CHANGES * Translate service api requires array of objects of shape {field:string,format:string} instead of just the field as string * **provider system:** Rename plugin to strapi-plugin-translate
🎉 This issue has been resolved in version 1.0.0-next.1 🎉 The release is available on npm package (@next dist-tag) Your semantic-release bot 📦🚀 |
🎉 This issue has been resolved in version 1.0.0-next.1 🎉 The release is available on npm package (@next dist-tag) Your semantic-release bot 📦🚀 |
# strapi-provider-translate-deepl 1.0.0 (2023-01-06) ### Features * handle format of text field types ([94570e0](94570e0)), closes [#25](#25) * **provider system:** use a provider system, renames the plugin to strapi-plugin-translate ([dcde4af](dcde4af)), closes [#30](#30) [#26](#26) * **setup:** parse default environment variables ([da79089](da79089)) ### BREAKING CHANGES * Translate service api requires array of objects of shape {field:string,format:string} instead of just the field as string * **provider system:** Rename plugin to strapi-plugin-translate ### Dependencies * **strapi-plugin-translate:** upgraded to 1.0.0
# 1.0.0 (2023-01-06) ### Bug Fixes * 413 Error when fields are too large ([f9f1f4a](f9f1f4a)) * build issue with strapi <4.5 ([702c058](702c058)), closes [#38](#38) * do not translate localizations ([351156c](351156c)) * function formatComponentData was renamed in helper-plugin ([adc2637](adc2637)) * make strapi name lowercase ([d71bdf6](d71bdf6)) * populate media in direct translation ([7b803d6](7b803d6)) * relations not translated in normal mode ([1b5327c](1b5327c)), closes [#35](#35) * relations not translated in normal mode ([15673fe](15673fe)), closes [#35](#35) * show deepl section only with appropriate permissions ([093cec4](093cec4)) ### Features * **admin:** remove tabs for now ([c0d587c](c0d587c)) * **admin:** update translate icon ([9bf1c07](9bf1c07)) * handle format of text field types ([94570e0](94570e0)), closes [#25](#25) * **provider system:** use a provider system, renames the plugin to strapi-plugin-translate ([dcde4af](dcde4af)), closes [#30](#30) [#26](#26) * **setup:** parse default environment variables ([da79089](da79089)) ### BREAKING CHANGES * Translate service api requires array of objects of shape {field:string,format:string} instead of just the field as string * **provider system:** Rename plugin to strapi-plugin-translate
🎉 This issue has been resolved in version 1.0.0 🎉 The release is available on npm package (@latest dist-tag) Your semantic-release bot 📦🚀 |
Rationale
Markdown is not officially supported by DeepL, so there are sometimes issues with the translation. In particular the following issues have been discovered:
**
at the end of lines)Also some people use not Markdown in the richtext fields, but HTML (for example with the HTML editor or CK Editor), so this should not be translated but directly interpreted as HTML
Approach
DeepL supports xml tag filtering and beta HTML support, so HTML should work well and Markdown could be parsed to HTML and back.
For each field type allow adding settings either with
string
or withobject
of shape{type: string, format: 'plain' | 'markdown' | 'html'}
tag_handling=html
The text was updated successfully, but these errors were encountered: