KoKuToru / gTox

[abandoned] GTK3 Tox-Client
GNU General Public License v3.0
45 stars 7 forks source link

Update po-files when changing `_(value)` in code #174

Open KoKuToru opened 9 years ago

KoKuToru commented 9 years ago

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 ?

Teemperor commented 9 years ago

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

KoKuToru commented 9 years ago

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:

gettext doesn't fallback to en ... if no translation is present it will display untranslated _(value)