Introduction
In today’s globalized world, delivering applications in multiple languages is essential for reaching diverse audiences. IBM Globalization Pipeline (GP) is a DevOps-integrated translation management service that enables rapid translation and release of cloud and mobile applications to international markets. This blog explains what IBM Globalization Pipeline is, its main components, and how to configure it within a Jenkins pipeline—empowering teams to automate the translation of application strings with minimal dependencies.
What is IBM Globalization Pipeline?
IBM Globalization Pipeline is a service that streamlines the process of translating application resources. It supports a wide range of languages and can be integrated into your CI/CD pipeline, allowing you to manage translations as part of your regular build and release process. The service consists of several key components:
· REST Server: The core backend that processes all translation requests.
· GP Dashboard: A user interface for managing translations, bundles, and configurations.
· Tools/Plugins: DevOps tools and plugins that integrate with the REST server, making it easy to automate translation workflows in CI/CD environments like Jenkins.
Why Integrate Globalization Pipeline with Jenkins?
By integrating IBM Globalization Pipeline into your Jenkins pipeline, you can:
· Automate the translation of application strings as part of your build process.
· Ensure consistency by always using the latest translations.
· Reduce manual effort and errors associated with manual translation management.
· Support a wide range of languages with minimal configuration changes.
Prerequisites
Before you begin, ensure you have:
· A running Jenkins instance (LTS).
· An IBM Globalization Pipeline service instance on IBM Cloud.
· Access to the Jenkins IBM Globalization Pipeline plugin (if using the plugin, or custom scripts as shown below).
· A Git repository with your application’s resource files (e.g: properties files).
Step-by-Step: Integrating IBM Globalization Pipeline in Jenkins
Below is a detailed guide based on a real-world Jenkins pipeline using Groovy scripts and the IBM Globalization Pipeline CLI tool.
1. Checkout your GitHub repository
Start by checking out your application’s Git repository in your Jenkins pipeline. For example:
checkout([$class: 'GitSCM', branches: [[name: '*/master']], userRemoteConfigs: [[url: 'https://github.ibm.com/<ORG>/test-automation']]])
This fetches your codebase, including the resource files that need translation.
2. Prepare Resource Files
Clear or update the contents of your.properties files (typically under GVT/properties/). Add the English strings that require translation to en.properties and commit your changes.
3. Configure Secrets and Credentials
Securely inject credentials for accessing the IBM Globalization Pipeline service. This is typically done using Jenkins credentials and environment variables:
withCredentials([file(credentialsId: 'gvt-testcred', variable: 'TEST_SECRET_FILE')]) {
profile_secret = env.TEST_SECRET_FILE
}
This ensures that sensitive information is managed securely.
4. Create Resource Bundles
Use the Globalization Pipeline CLI tool to create a new resource bundle for translation:
java -jar gp-cli-2.4.8-with-dependencies.jar create -b resources.${release} -l en,ar,bg,ca,cs,da,de,es,fi,fr,he,hr,hu,it,ja,ko,nl,pl,pt,ro,sk,sv,th,tr,nb,zh-Hans,zh-Hant,pt-PT -j ${profile_secret}
This command registers your resource bundle with the GP service and specifies the target languages.
5. Upload and Download Translations
Generate a shell script to automate the import (upload) and export (download) of translations for each language:
java -Djavax.net.ssl.trustStore="/opt/.keystore" -Djavax.net.ssl.trustStorePassword=changeit -jar $gvtPipelineJar import -b resources.$release -l en -t JAVAUTF8 -f properties/en.properties -j $profile_secret
java -Djavax.net.ssl.trustStore="/opt/.keystore" -Djavax.net.ssl.trustStorePassword=changeit -jar $gvtPipelineJar import -b resources.$release -l ar -t JAVAUTF8 -f properties/ar.properties -j $profile_secret
# ...repeat for all supported languages
This script uploads your source strings and downloads the translated content for each language.
6. Process Translated Strings
After exporting the translations, process the results as needed (e.g., convert file formats, archive artifacts):
sh 'python3 convert.py'
archiveArtifacts artifacts: 'output/*.properties', followSymlinks: false, onlyIfSuccessful: true
This step ensures that the translated files are treated with Unicode conversion and that is ready for use in your application.
7. Trigger and Monitor the Pipeline
Trigger your Jenkins pipeline manually or automatically whenever new strings are added or updated. Use the Jenkins UI to monitor the build and access the translated resource files as build artifacts.
Best Practices
· Use Secure Credentials: Always manage your IBM Globalization Pipeline credentials securely using Jenkins credentials.
· Automate Everything: Integrate all steps into your Jenkins pipeline to minimize manual intervention.
· Review Translations: Use the is_reviewed flag to control whether translations are generated or only reviewed translations are exported.
· Billable Services: Use billable translation engines (like Straker) only for final translations to control costs.
Conclusion
Integrating IBM Globalization Pipeline into your Jenkins pipeline is a powerful way to automate the translation of application strings. By following the steps outlined above, your team can deliver multilingual applications faster, with greater consistency and less manual effort. This approach is scalable, secure, and can be adopted by other teams with minimal dependencies.
For more information, consult the official tutorial and documentation