Stienen · R&D
AI translation pipeline
A tool that translates the screen texts of Stienen's barn climate controllers into new languages, with the context and length limits the firmware needs. Now in its third version.
The translation pipeline
- XML screen texts
- Context from the menus
- Translate with Gemini
- Checks: length limits, placeholders
- Write only changed languages
- Pull request
The problem
Every text on Stienen’s climate controllers, from menus to alarms and units, lives in XML, with one attribute per language. The same files feed the touchscreen app, the firmware’s text tables and a database for the operator panel. Translating by hand takes a lot of time, and new languages have to be added. Translating without context picks the wrong meaning, and the firmware has hard limits on how long a text can be.
What I built
- Version 1, in Python. It takes context from the menu structure, builds a glossary from the existing translations, sends texts in batches with retries and resume, gives each text a confidence score, and writes a review report with the least certain texts first.
- A JetBrains plugin that colleagues used to review and approve translations without leaving the IDE.
- Version 3, a small .NET command line tool with commands to translate, check, fix and add a language. It writes only the language attributes that change and keeps each file’s exact formatting, so a review shows only real changes.
- Checks for placeholders, for texts that must stay untranslated, and for the length limits the firmware actually enforces.
What went wrong
Colleagues used version 1 through the plugin, but its texts were too long for the firmware, so in practice it didn’t work. Without enough context it also picked the wrong meaning at times. Version 2, a .NET rewrite, became too complex to maintain. For version 3 I wrote down the requirements first and kept the design small enough to read from top to bottom.
Status
Version 3 is in development and not in use yet.