.pot, what’s that? It’s something really useful when doing i18n, l10n or g11n (just i18n in my case), but really something tough to tackle when it’s generated from source code… Maybe not that tough, but do I really need to do this manually? Not anymore… Yesterday I had to create an update of an existing .pot file, and since my .pots are generated from the source, I figured it would be easier to create an application to merge the translations from the existing .po(t) files to the new, generated (and with no translations) .pot file.
I did a couple of searches in the past for a tool like this and failed to find a solution… This application is actually pretty embarrassing (especially the source code) to put online, but I hope someone might find it useful.
- download (link below) and extract
- start PotPatch.exe
- select “New .pot (untranslated)” file, this is the newly generated file without any translations
- select “Existing .pot (translated)” file, this is the old .pot file you’ve already been working on, it should contain some translations
- click “Patch & Save” and the tranlsations from the existing file will be merged into the new .pot file
Source on GitHub: