[Aptitude-devel] Several i18n patches and updated German translation

Jens Seidel jensseidel at users.sf.net
Tue Jan 15 16:25:34 UTC 2008


On Tue, Jan 15, 2008 at 06:28:07AM -0800, Daniel Burrows wrote:
> On Tue, Jan 15, 2008 at 08:48:07AM +0100, Jens Seidel <jensseidel at users.sf.net> was heard to say:
> > First a simple question: I read somewhere that the debian/ subdirectory
> > is contained in another repository but could not find it. Where is it?
> 
>     hg://hg.debian.org/aptitude/debian{,-upstream}

Please document it! I suggest you google for "aptitude mercurial" to find
all site I look at.
 
> > OK, let me explain my patches:
> > 
> > aptitude.i18n.diff:
> >  * I18n did not worked! Updating PO files (make update-po in po/) resulted
> >    in some errors as po/POTFILES.in contained invalid source files!
> 
>   Ow.  That's a chronic problem; I suspect I should just put a rule in
> to regenerate POTFILES.in every time you run update-po via "find".  (oddly
> enough, "make update-po" works on my computer, or at least it completes)

OK, not sure whether it was indeed "make update-po" which failed. But at
least one step didn't worked. To be honest I think I also failed to get
Makefile regenerated after editing POTFILES.in and edited it as well.

I know gettext really well but there are still many obstacles ...
 
> >  * Also some strings (W_("...")) where not extracted from source which
> >    resulted in untranslated messages!
> 
>   That's not so good.  I've added it to Makevars.template to be on the
> safe side.  Note, however, that I can't actually reproduce the problem
> here: even without this change, W_ -quoted strings ended up in .po
> files.  I don't know what's up with that, since they really shouldn't
> have AFAIK.

Maybe xgettext (I use 0.16.1) is smarter on your side and noticed that
W_ calls itself gettext which is probably a default keyword. So it is
indirectly supported by better preprocessor support?
 
> >  * Radio buttons in the preferences dialog where untranslated as W_()
> >    was accessed during a static array initialisation which happens
> >    before main() is started and while C is still the current locale.
> >    I fixed this by specifying the English message to class radio_choice
> >    and calling gettext in get_description() and get_long_description().
> >    Instead of using W_ in the static array initialisation one has to use
> >    now N_ to just mark the message translateable but not to translate
> >    immediately.
> 
>   I did use N_(),

Nope, you used _() in apt_options.cc for choice() arguments.

> but it looks like maybe the code that invokes gettext
> runs too soon?

Yep, that's the problem.
 
>   wrt the comments: the one thing I noticed in skimming it is that you
> tripped over fragf() format codes.  It uses format codes that are
> suggestive of printf(), but not identical: for instance, in fragf, %B
> turns on bold text and %b turns it off.

I know. But I did not expect to see "If this option is %Bnot%b enabled"
(with literal %B and %b!) in the dialog! Please fix it!

Jens



More information about the Aptitude-devel mailing list