-
Notifications
You must be signed in to change notification settings - Fork 1
FEATURE: Translate CR Nodes automatically. #1
base: main
Are you sure you want to change the base?
FEATURE: Translate CR Nodes automatically. #1
Conversation
This has still lots of limitations an probably needs tweaking.
Wow, that was fast :) Definitely needs some docs. |
Am bit skeptical regarding performance because every translated property will yield a separate request. Maybe the documents api could help here as this would support to translate multiple fields at once. Or we trick a little and put all the properties of a node into a single html that gets translated and later split again. However would render the caching quite obsolete for this specific use case. |
This is in preparation of translating multiple texts with one api call in the deepl service.
…ragments with a single request.
28ce5c7
to
eac360d
Compare
@rolandschuetz some things that i still would like to improve are
Do you have specific ideas for that? PS: If you feel this totally is out of scope for your package just tell me and i will use the code otherwise. Could make sense to have a separate TranslationHelper and NodeTranslator package. |
This avoids the direct dependency to guzzle but still uses psr factories and requests as much as possible. Only the http timeout is set as curl option.
Close in favor of custom package |
@mficzel Sorry for the late response, I thought we might go over it together next week. |
The new package has very few similarities to yours and even my original pr: |
Looks cool. So I will keep my package as EelHelper.. what I need, and keep your project in mind if I need that feature in another project :) |
Translate node properties while they are adopted to another language.
When nodes are copied (adopted) into another languge the fields can be translated automatically.
The following setting enables the translation of all inlineEditable properties:
Other properties of type string can be translated aswell with the following configuration.
In additions this PR:
CodeQ.DeepLTranslationHelper.DeepLService.useFreeApi: false
to switch between free and payed apiCodeQ.DeepLTranslationHelper.DeepLService.defaultOptions
to configure additional arguments for the translation