Update po-files when changing `_(value)` in code
Right now I update the PO-files for all translations keywords by hand. This can't be right..
There must be a way to automatically update these.. or not ?
I think elementary does this via xgettext: Here is a CMake example: http://bazaar.launchpad.net/~elementary-pantheon/pantheon-greeter/trunk/view/head:/cmake/Translations.cmake
Yeah, I do generate a template.pot already, which includes all translation-keys.
That cmake looks a lot cleaner than mine..
But when I change lets say _("1h later") to _("1 hour later")...
all old translations for "1h later" must be updated to use "1 hour later" ...
But yeah probably not possible to update by itself...
Or should I just update the en.po ?
The problem with just updating en.po would be:
- correct text in
en - wrong text in other translations which aren't translated
- wrong text without translation files
gettext doesn't fallback to en ... if no translation is present it will display untranslated _(value)