Installation and Setup - AEM as a Cloud Service (Gtech API)
Installation
Section 1: Add S3 Bucket artefact information for Straker
1. Create a file in your repository called settings.xml (or modify the current one) in your AEM as a Cloud Service git repository. The path for this file should be .cloudmanager/maven /settings.xml
2. Add a straker-aem-repo with the AWS API keys given by Straker. The resulting file should look something like this :
<?xml version="1.0" encoding="UTF-8"?>
<settings
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
http://maven.apache.org/xsd/settings-1.0.0.xsd"
xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <servers>
<server>
<id>straker-gtech-aem-connector-snapshots</id>
<username>AAAAAAAA</username> <!-- Straker given AWS API key-->
<password>BBBBBBB</password> <!-- Straker given AWS API secret -->
<configuration>
<endpoint>https://s3.eu-de.cloud-object-storage.appdomain.cloud</endpoint>
<region>eu-de</region>
<pathStyleEnabled>true</pathStyleEnabled>
<publicRepository>false</publicRepository>
</configuration>
</server>
<server>
<id>straker-gtech-aem-connector-release</id>
<username>AAAAAAAA</username> <!-- Straker given AWS API key-->
<password>BBBBBBB</password> <!-- Straker given AWS API secret -->
<configuration>
<endpoint>https://s3.eu-de.cloud-object-storage.appdomain.cloud</endpoint>
<region>eu-de</region>
<pathStyleEnabled>true</pathStyleEnabled>
<publicRepository>false</publicRepository>
</configuration>
</server>
</servers>
</settings>
3. In the reactor POM (the pom.xml at the root of the directory), add the following lines just before the closing tag (or add extension into existing <extensions> tag):
<extensions>
<extension>
<groupId>com.github.ehsaniara</groupId>
<artifactId>maven-repository-aws-s3</artifactId>
<version>1.2.11</version>
</extension>
</extensions>
4. In the same POM, add the following repository inside any profile that is activated by default (it can be added in the adobe-public profile):
<repository>
<id>straker-aem-connector-release</id>
<name>Straker S3 Repository - Release</name>
<url>s3://straker-gtech-aem-connector/release</url>
<releases>
<enabled>true</enabled>
<updatePolicy>never</updatePolicy>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<repository>
<id>straker-gtech-aem-connector-snapshots</id>
<name>Straker S3 Repository - Snapshots</name>
<url>s3://straker-gtech-aem-connector/snapshots</url> <releases>
<enabled>true</enabled>
<updatePolicy>never</updatePolicy>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
5. In the all POM (all/pom.xml), add the following segment inside the dependencies (substituting the correct {straker-version-number}):
<dependency>
<groupId>com.adobe.granite.translation.connector</groupId>
<artifactId>straker-connector.all</artifactId>
<type>zip</type>
<version>1.0.16-SNAPSHOT</version>
</dependency>
6. Inside the same pom.xml (all/pom.xml), add the following snippet inside the <embedded>fort the filevault-maven-package-plugin artefact:
<embedded>
<groupId>com.adobe.granite.translation.connector</groupId>
<artifactId>straker-connector.all</artifactId>
<type>zip</type>
<target>/apps/straker-connector/application/install</target>
</embedded>
7. Commit all the changes to the branch and push the changes
8. The build for AEM as a Cloud Service can now be done.tion
1. Navigate to “{base_URL}/ui#/aem/mnt/overlay/cq/translation/gui/content/cloudservices.html”/AEM/navigate%20to%20base%20URL%20mnt.png?width=670&height=235&name=navigate%20to%20base%20URL%20mnt.png)
2. Under /Conf/Global, click on “Straker Connector” and click “Create”.
3. Give Title and Name as “Straker”. This can be anything that you desire(without spaces and special characters). Click “Create”.
4. Provide the Client ID, Client Secret, Endpoint URL and click on Live. Click “Save and Close” after that
1. Navigate to
“{base_URL}/ui#/aem/mnt/overlay/cq/translation/gui/content/cloudservices.html”
2. Select /сonf/global, click on the “Create” button and select “Translation Integration”

Sites Tab:
Translation Method: “Human Translation”;
Translation Providers: “Gtech Connector”;
Translate Page Assets: Select the value depending of your needs:

Assets Tab:
Translation Method: “Human Translation”;
Translation Providers: “Gtech Connector”:

Exclude content from the translation:
To exclude the content from the translation update the AEM Translation Configuration:
1. Open “{base_URL}/ui#/aem/libs/cq/translation/translationrules/contexts.html”;
2. Select existing/create a new context:
3. Go the Filters tab;
4. Add a custom Node Filter to filter out the content from the translation job when the condition is met. E.g.:
This will exclude pages and/or components that have a property “translate=no” from the translation flow.
Importing Content:
When content is submitted to the Gtech API, the corresponding translation job in AEM will update its status. You will notice that the lifecycle of these tiles follows this general format:

Once the translation is completed, it will be automatically reimported into AEM and ready for review. You can now re-enter the tile and preview pages that have had translations completed to view the translated content. At this point you can begin to manipulate the content as you please and publish at your leisure.
Configuration for Guides:
To allow AEM process assets and DITA files without interfering, provide a configuration for com.adobe.fmdita.config.ConfigManager.
The key properties are these:
● ignored.post.processing.paths -- specify a path to a folder(s) which should be ignored
by the DITA internal services. e.g..
● "component.translation" – need to properly handle dita files translation flow.
● "/content/dam/projects/translation_output" – default, DO NOT REMOVE
● "/content/dam/wknd" – custom folder
● "/content/dam/wknd-shared" -- custom folder
{
"enabled.post.processing.paths": "/content/dam",
"ignored.post.processing.paths": [
"/content/dam/projects/translation_output",
"/content/dam/wknd",
"/content/dam/wknd-shared"
],
"component.translation": "true"
}
Send content for a translation:
To be able to successfully translate a page or asset it should have an ibm:pid property filled in and stored under jcr:content or jcr:content/metadata node. If at least one file in the translation job has this property set, all files within the job will use it as a fallback in case they don’t have it set.
Extra configuration:
The code uses production “tenantId”, gtech api host but there is a way to override the values
using Cloud Manager Environment Configuration.
To override the properties:
1. Open a Cloud Manager;
2. Select the environment where you want to override properties:

3. Go to the Configuration Tab:

4. Select Add/Update;
5. Provide values for the following variables:
5.1. TENANT_ID
5.2. GET_JOB_URL (e.g. https://idhub-dev.straker.global/apirest/v2/jobs/)
5.3. CREATE_JOB_URL (e.g. https://idhub-dev.straker.global/apirest/v2/jobs/quick/mt).