You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2019/09/12 09:02:34 UTC

[camel] branch master updated (0e9fbf3 -> 617f12b)

This is an automated email from the ASF dual-hosted git repository.

acosentino pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git.


    from 0e9fbf3  docs/components/modules/ROOT/pages/test-spring.adoc: Restore :page-source: (deleted by mistake)
     new 8b7d70c  Camel-AWS Translate: Docs improvement
     new 617f12b  Camel-AWS Translate: Improved tests

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../src/main/docs/aws-translate-component.adoc               | 12 ++++++++++++
 .../camel/component/aws/translate/TranslateProducerTest.java |  1 -
 2 files changed, 12 insertions(+), 1 deletion(-)


[camel] 02/02: Camel-AWS Translate: Improved tests

Posted by ac...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

acosentino pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 617f12bff1b1abf2ae7432260226305adc4b157c
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Thu Sep 12 11:00:04 2019 +0200

    Camel-AWS Translate: Improved tests
---
 .../org/apache/camel/component/aws/translate/TranslateProducerTest.java  | 1 -
 1 file changed, 1 deletion(-)

diff --git a/components/camel-aws-translate/src/test/java/org/apache/camel/component/aws/translate/TranslateProducerTest.java b/components/camel-aws-translate/src/test/java/org/apache/camel/component/aws/translate/TranslateProducerTest.java
index 115cb15..4f3f507 100644
--- a/components/camel-aws-translate/src/test/java/org/apache/camel/component/aws/translate/TranslateProducerTest.java
+++ b/components/camel-aws-translate/src/test/java/org/apache/camel/component/aws/translate/TranslateProducerTest.java
@@ -40,7 +40,6 @@ public class TranslateProducerTest extends CamelTestSupport {
         Exchange exchange = template.request("direct:translateText", new Processor() {
             @Override
             public void process(Exchange exchange) throws Exception {
-                exchange.getIn().setHeader(TranslateConstants.OPERATION, TranslateOperations.translateText);
                 exchange.getIn().setHeader(TranslateConstants.SOURCE_LANGUAGE, TranslateLanguageEnum.ITALIAN);
                 exchange.getIn().setHeader(TranslateConstants.TARGET_LANGUAGE, TranslateLanguageEnum.ENGLISH);
                 exchange.getIn().setBody("ciao");


[camel] 01/02: Camel-AWS Translate: Docs improvement

Posted by ac...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

acosentino pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 8b7d70c12a52ab47f2f4fa5add1564e4f009a629
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Thu Sep 12 10:57:32 2019 +0200

    Camel-AWS Translate: Docs improvement
---
 .../src/main/docs/aws-translate-component.adoc               | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/components/camel-aws-translate/src/main/docs/aws-translate-component.adoc b/components/camel-aws-translate/src/main/docs/aws-translate-component.adoc
index 0416d09..a91c363 100644
--- a/components/camel-aws-translate/src/main/docs/aws-translate-component.adoc
+++ b/components/camel-aws-translate/src/main/docs/aws-translate-component.adoc
@@ -156,6 +156,18 @@ The component is capable of detecting the presence of an AmazonTranslate bean in
 If it's the only instance of that type it will be used as client and you won't have to define it as uri parameter.
 This may be really useful for smarter configuration of the endpoint.
 
+== Translate Text example
+
+------------------------------------------------------------------------------------------------------
+from("direct:start")
+  .setHeader(TranslateConstants.SOURCE_LANGUAGE, TranslateLanguageEnum.ITALIAN)
+  .setHeader(TranslateConstants.TARGET_LANGUAGE, TranslateLanguageEnum.GERMAN)
+  .setBody("Ciao")
+  .to("aws-translate://test?translateClient=#amazonTranslateClient&operation=translateText");
+------------------------------------------------------------------------------------------------------
+
+As result you'll get an exchange containing the translated text.
+
 Dependencies
 
 Maven users will need to add the following dependency to their pom.xml.