core icon indicating copy to clipboard operation
core copied to clipboard

Complete Translation Workflow Action

Open wezell opened this issue 10 years ago • 3 comments

Finish the work here on the Google Translation Workflow Actionlet https://github.com/dotCMS/plugin-dotcms-actionlet-google-translate


This actionlet translate a piece of content to the specified languages. The translation is done by translating the (specified fields)' values of the content and creating new versions (same identifier, new inode). The resulting versions will be saved and published if the source content is live, otherwise they will be saved only.

The actionlet takes three parameters:

  • Translate to: comma-separated list of languages codes. E.g. "fr, it, es". Wildcard "all" can be used to include all languages defined in DotCMS. Important note: when including a language code in the list, a language with that language code must be already configured in dotcms for it to the included in the translation process, otherwise it will be ignored. See: https://dotcms.com/docs/latest/adding-and-editing-languages.
  • Translate Field Types: comma-separated list of field types to translate. E.g. "text,wysiwyg,textarea"
  • Ignore Fields: comma-separated list of the velocity-var-names of the fields to exclude from the translation.

Acceptance criteria:

  • When executed on an already saved content, it needs to create new versions of the content (with the same identifier) in the specified languages with the specified fields translated accordingly.

Test cases (feel free to add more):

  • Excecute action on non-saved content. It should throw error indicating the content needs to be already saved.
  • Execute action on only saved content (working, not live). New versions of the content should be saved (not published).
  • Execute action on live content. New versions of the content should be saved and published.
  • Include a language code in the "Translate to" list that does not belong to any of the existing languages defined in the system. (E.g "zh"). Version in that language should not be created.
  • Include a vel-var-name in the list of exclusions that does not correspond to the vel-var

wezell avatar May 06 '16 15:05 wezell

Looking for a translate interface service.

The google translate should be more of a driver. Create a proper dotCMS interface

The actionlet is actually providing a service that would autotranslate

jtesser avatar May 31 '16 14:05 jtesser

Passed QA. Tested locally in: master-3.6 // Mac OS 10.10 // MySQL 5.6.23 // Firefox v45.0.1

shaydotcms avatar Jun 27 '16 18:06 shaydotcms

Documented, although we still need a decision on how to configure the google api key - waiting Daniel to talk to Will on that one: http://auth.dotcms.com/docs/latest/translate-content-sub-action

DeanGonzalez avatar Jun 29 '16 20:06 DeanGonzalez