Post

Integrating Weblate into the SAP Translation Workflow - Part 1

Integrating Weblate into the SAP Translation Workflow - Part 1

At my company, we often faced challenges when translating ABAP reports and dictionary objects. These issues were primarily caused by two factors:

  • Dynpro (and ALV) texts can originate from different sources:
    • DDIC objects
    • Report texts
    • Dynpro texts

Translating through SE63 can be tricky, especially when you’re unsure about the actual source of the text (as mentioned above). Additionally, SE63 is not the most user-friendly tool for translations.

Due to these two issues (and my positive experience with Weblate), I decided to explore a solution for translating ABAP DDIC and report/dynpro texts using Weblate.


🔍 Solving the DDIC Objects Identification Problem

The first challenge — identifying all the necessary DDIC objects for translation — was relatively straightforward to address. I developed a report that searches (recursively) through reports and development packages to gather all used components.


🔄 Addressing the Lack of Official SAP-Weblate Integration

The second problem was more complex. There is no official interface between SAP and Weblate. Weblate typically relies on source code management tools such as Git, Mercurial, and Subversion for importing and exporting translations.

⚙️ Weblate Workflow

Weblate workflow

  1. Import translations from Git
  2. Translate in Weblate
  3. Merge translation changes from Git
  4. Export translations to Git

To integrate Weblate into the translation process, I needed to export and import translations between the SAP system and Git. Fortunately, SAP already provides XLIFF export (via report RS_LXE_TEXTEXT_EXPORT) and import (via report RS_LXE_TEXTEXT_IMPORT) functionality through transaction LXE_MASTER. I only had to modify the code for XLIFF marshalling/unmarshalling.


🚚 Exporting Translations to Git

To export the generated XLIFF files to Git, you either need the Git toolkit installed on your application server (which we didn’t have) or a Git server with an API. At our company, we use GitLab, which provides the GitLab API for transferring files to and from Git.

By combining SAP’s XLIFF export/import functions with the GitLab API, we were able to create a streamlined workflow that fully integrates Weblate into the SAP translation process.

🔁 Full SAP-Weblate Workflow

Weblate workflow

  1. Export translations from SAP (XLIFF)
  2. Import translations into Git
  3. Translate in Weblate
  4. Merge translation changes from Git
  5. Export translations to Git
  6. Import translations into SAP

🧠 Final Thoughts

In this series, I’ll explain the steps involved in integrating Weblate into the SAP translation workflow. With this integration, we were able to significantly streamline the process, making translations easier to manage and more efficient. If you’re dealing with similar translation challenges in your SAP system, this approach might be worth considering.

This post is licensed under CC BY 4.0 by the author.