Proper way to create / manage gettext (.po, .pot) files?

So I’m trying to figure out how .po and .pot files work, seeing as this is what WordPress seems to use. But I can’t wrap my head around it.

I get that a .pot file is a template file that indicates what .po files need to have translations for. What I don’t get it how you’re supposed to add entries to these files?

I can find references on how to do it through the CLI but none of the GUI apps I’ve tried seem to support this. Is it common for the developer to just use the CLI to create these .pot files and then translators just provide the .po files?

Am I missing something? Are there no tools used that take care of the whole process?

It all looks good in theory but atm the whole process of managing translations just seems ridiculous, I’d expect an industry standard these days to be a bit more polished and user friendly.

I should note, I don’t have any problem understanding how to work it myself.. I’m just trying to figure out how everyone does this with non-programmers in their team. I can’t possibly ask them to open up their terminal and execute a bash command.

5 Answers
5

I can find references on how to do it through the CLI but none of the GUI apps I’ve tried seem to support this.

Did you see Poedit? Cross-platform GUI for preparing and producing gettext-translations (with some limitation compared to fresh CLI-tools)

Is it common for the developer to just use the CLI to create these .pot files and then translators just provide the .po files?

Yes, CLI have more flexibility in some areas and isn’t too hard to use (after learning curve)

Am I missing something? Are there no tools used that take care of the whole process?

Just learn Poedit (while xgettext&Co is still better)

I’m just trying to figure out how everyone does this with non-programmers in their team

Translators have Poedit (which they know how to use) and get updated pots, return changed po back

Leave a Comment