Comment 7 for bug 358283

Revision history for this message
David Planella (dpm) wrote :

I've made an attempt to fix this by creating a branch that adds preliminary i18n support for the update notification and the .desktop files, but might need some additional help where my packaging-fu does not reach.

Here's what's working:

* Extraction of strings from the update notification and .desktop files and merging them into the POT template using intltool

* Generating the POT template during the package build. This means that when uploading the package the template should get picked up automatically and imported into Launchpad. It will also mean that the translations (.mo files) will be correctly exported in language packs.

Here's where I might need some help:

* Postinstall script: looking at https://wiki.ubuntu.com/InteractiveUpgradeHooks, it mentions that the underscores needed to mark the update notification as translatable need to be removed in the postinstall script, and it shows an example of how to do this with sed. However, I could not find out how the notification is installed, so I wasn't sure at which point the underscores should be removed. I'm guessing figuring this out should not be difficult for someone with more packaging experience.

* Variable substitution in .desktop.in files: .desktop files are correctly generated on build. I also added the 'X-Ubuntu-Gettext-Domain' key to them, which should be assigned the package's translation domain. Rather than hardcoding the domain, I've tried to use the @GETTEXT_PACKAGE@ variable to be substituted on build. This, however, did not seem to work, as @GETTEXT_PACKAGE@ does not get substituted on build in the resulting .desktop files.