Re: tasksel translated tasks
On Fri, Jul 25, 2003 at 08:37:31PM -0400, Joey Hess wrote:
> There are some starts in bug #157848 toward translating task names and
> descriptions, but they don't seem like complete fixes to me.
>
> Just translating the strings in tasksel's po file is not the right
> appropch, because other programs (aptitude) use the same task definition
> files. Also, we allow derived distributions to drop in other files in
> /usr/share/tasksel to change the set of tasks.
>
> The original patch which just adds -ll files in that directory bypasses
> gettext and so does not take issues like encoding into account. I've
> been down that road, and will not go down it again.
>
> Maybe there's some way to separate the strings into their own po file,
> and make gettext load both that po file and tasksel/aptitude's own at
> run time. I dunno if gettext can do things that flexably.
>
> This needs someone to get a complete fix out, or tasksel may not get
> translated task descriptions in time for the next release.
I am not familiar with those tools. but I had a look.
As .desc files are rfc822 compliant, I used debconf-gettextize to
generate PO files (tested with German file from Grisu's site). In this
very particular case, having 2 po directories makes sense, so these files
should go under e.g. po.tasks.
They can be compiled into .mo files and installed with another
textdomain, say 'tasksel-tasks'. Aptitude and friends could then use
dgettext(3) to retrieve translated descriptions.
After PO files are generated, debconf-updatepo can be used to update PO
files. There is a problem, this program does not work with #-comments,
so tasksel should ship a slightly modified version of this script.
Or I could patch debconf-updatepo if you (Joey Hess) want to allow those
comments in debconf templates files (of course po2debconf will then
remove these comments) too. As debconf-updatepo is mostly a wrapper
around intltool-update, I believe that the former is the best solution.
Ddtp translations are by essence moving, so I am reluctant to provide the
generated PO files now, but the German file is available at
http://people.debian.org/~barbier/i18n/tasksel.de.po
for testing purpose.
If this approach looks reasonable to everyone, next steps are:
a. Let the tasksel maintainer decide of a textdomain
b. Patch all tools printing tasksel descriptions to call
dgettext(textdomain, msgid)
c. Patch debconf-updatepo or let tasksel provide its own script, which
does not complain about #-comments.
d. Let the ddts provide PO files
e. Get PO files into tasksel and install .mo files
All these steps are fairly easy.
Denis
Reply to: