[Aptitude-devel] String freeze for aptitude?

Daniel Burrows dburrows at debian.org
Mon Apr 14 02:06:26 UTC 2008

On Sun, Apr 13, 2008 at 07:05:25PM +0200, Jens Seidel <jensseidel at users.sf.net> was heard to say:
> On Sat, Apr 12, 2008 at 06:50:45PM +0200, Christian Perrier wrote:
> > Quoting Daniel Burrows (dburrows at debian.org):
> > >   I think that I've got all the changes into aptitude that I wanted to
> > > get by Lenny.  I know the translators have some catching up to do, so
> > > I'll try to restrain myself from fixing any more bugs or adding features
> Translators work should never stop you from fixing bugs :-)

  Unfortunately, it seems like all the bugs I fix in aptitude end up
requiring string changes...

> diff -r 8066f9615345 src/cmdline/cmdline_why.cc
> --- a/src/cmdline/cmdline_why.cc	Sun Apr 13 18:17:07 2008 +0200
> +++ b/src/cmdline/cmdline_why.cc	Sun Apr 13 18:20:08 2008 +0200
> @@ -255,7 +255,7 @@ namespace aptitude
>        switch(dep_level)
>  	{
>  	case DependsOnly:
> -	  rval += W_("DependsOnly");
> +	  rval += W_("DependsOnly"); // Missing translator comment!
> You really have to explain this! Are you sure this should be
> translateable? "DependsOnly" looks like a special keyword or action
> but is no proper English! Is there a limitation for this string such as
> "no spaces allowed"?

  I'm not sure if this should be translatable or not.  It doesn't have
any special format (it's for human consumption), which is probably why I
marked it translatable in the first place.  It's written with words run
together mostly to emphasize that it represents a member of an
enumeration.  It's printed in "aptitude why" when you pass -v a few times
to see the whole search process.

> -      case InstallType:
> +      case InstallType: // CHECKME: Is a space needed? (#453776)
>  	return cw::fragf(_("Install(%s)"), mpkg.Name());
> Clytie asked whether it should/could be "Install (%s)". Hard to say
> without a comment.

  This is in the same situation as the above.  The way the English form
is written is meant to be suggestive of constructor notation for readers
who are familiar with that.

>    cw::menu_info(cw::menu_info::MENU_ITEM, N_("^News"), NULL,
> -		N_("View the important changes made in each version of " PACKAGE),
> +		N_("View the important changes made in each version of " PACKAGE), // TODO: use %s!
> This string is really a problem for me. I honestly do not know how to
> translate this sentence such that PACKAGE (== "aptitude") will be the last
> word.

  Unfortunately, it can't safely be written using %s with the current setup.
This string is statically evaluated and has to be a char*, and there's nowhere
safe to put the output of dynamically building it.  To solve this, you'd
need to either move the big initializer for the menu structure into a
function or alter menu_info to take std::strings as constructor
arguments.  (that way you could pass the output of ssprintf and
everything would work, at the expense of a small amount of memory and CPU
time)  I'd like to take the second option, but probably not for lenny
since it changes the cwidget ABI.


More information about the Aptitude-devel mailing list