Skip to main content

Google Translate

Google Translate

Introduction

In this sample the bot translates a list of words defined in datastore using RPA of web google translate and finally generates a email report. The technologies applied in this sample are browser driver, Excel and notifications.


Prerequisites

In order to successfully set up and run the demo:

  1. Ensure that you have a running node with the "SELENIUM" and "AP_RUN" capabilities.
  2. Configured Google Translate Sample Channel. Config name parameter is related to translation.report.channel configuration parameter (you also can change the parameter value to already existing channel).
  3. Upload the Google Translate Demo package to the Control Server. The package can be found in the following directory:https://<CS host>/nexus/repository/rpaplatform/eu/ibagroup/samples/ap/easy-rpa-gtranslate-ap/<version>/easy-rpa-gtranslate-ap-<version>-bin.zip.
    The souce code can be founs here:  https://code.easyrpa.eu/easyrpa/easy-rpa-samples/-/tree/dev/easy-rpa-gtranslate/easy-rpa-gtranslate-ap.
  4. Ensure the following details are provided for the Google Translation Sample automation process in the Automation Process Details tab:

Module class: eu.ibagroup.easyrpa.ap.google_translate.ap.GoogleTranslateSampleAp

Group Id: eu.ibagroup.samples.ap

Artifact Id: easy-rpa-gtranslate-ap

Version Id: <EasyRPA version>

Automation process package content:

Entity

Description

Google Translation Sample

Google Translation Sample automation process

easy-rpa-gtranslate-ap-<EasyRPA version>.jar

Root archive and dependencies. Contains code of the automation process

Google Translate Sample ReportNotification template

GOOGLE_TRANSLATE_SAMPLE

Process datastore

Configuration Parameters:

KeyDefault valueDescription
translation.target.langbeTarget language
translation.cleanuptrueMake all words in the  GOOGLE_TRANSLATE_SAMPLE are not translated
translation.report.tpl.nameGoogle Translate Sample ReportTemplate to use for notification
translation.report.channel

Google Translate Sample Channel

Notification channel

Process datastores:

NameColumns
GOOGLE_TRANSLATE_SAMPLEoriginal,from_lang,translated,to_lang


Included Steps

Clean Up Demo

The translation.cleanup switched on this step on. It clears all words translation in the GOOGLE_TRANSLATE_SAMPLE, this allows to run the demo again without adding new words into the datastore.

Get Words for Translation

Obtain all words from the GOOGLE_TRANSLATE_SAMPLE where the translated field is empty. The splits the words translation into several parallel RPA steps using grouping by source language.

Translate Words

Use BrowserDriver RPA task to translate the words and store the result into the word's translated field.


Send Results

Generates email report using translation.report.tpl.name parameter template and sent it into the translation.report.channel channel: