How to Translate PO Files with ChatGPT: The Prompt Guide

A practical prompt guide for translating gettext PO files with ChatGPT or any GPT model. Covers exactly why pasting the raw .po file breaks it (translated msgids, localized placeholder names, silent truncation), the seven parts of a prompt that works, a full copy-paste system prompt, the JSON batching envelope, extract and merge scripts for the chat-window workflow, feeding msgctxt and translator comments, getting correct plural arrays in one call, glossary and tone control, the API version in Python with per-entry retries, a placeholder validator, and a symptom → cause → fix debugging table.

Back to the PO-File blog