Translatable strings in custom key files.
themuso at ubuntu.com
Mon Feb 1 07:21:23 UTC 2016
I'm using ini-like files for metadata, using the glib key file API to read these files. I'm wanting to implement translation support for some of the keys within the files. All is ok on the code side, using the get locale string calls, but I am wanting to integrate these files into my project in such a way that these strings are in the .pot file for translation. Dispite specifying these files in po/POTFILES.in, intltool-update doesn't act on them.
>From doing some research and looking at intltool in more depth, I see I am able to extract these translatable strings and write header files which xgettext can use for making a pot file. What I'm wondering is whether there is a way I can integrate things such that the pot file is generated with these extra strings from my custom key files, and do it all in a way that will allow the use of rosetta etc in Launchpad.
In short, I have something like this, with the file named profile.manifest.in:
_name=Name of profile, transalatable
_description=More detailed translatable description.
I've already looked into the various rules that intltool.m4 contains, so can easily adapt something for this situation, my primary concern is automating the translation tempate generatino such that Launchpad gets the pot file or whatever it does to allow translation.
More information about the ubuntu-desktop