[Aptitude-devel] Gettext and split phrases (Re: Remove dead code, document one method and ...)

Daniel Hartwig mandyke at gmail.com
Fri Jan 31 03:29:25 UTC 2014


Hi Manuel

[commit 6ae2d97 on master]

> -    const std::string short_description =
> -      (boost::format("Changelog of %s") % ver.ParentPkg().Name()).str();
> +    const std::string short_description = _("Changelog of") + std::string(" ") + info->get_display_name();

Nice catch, that this was not being translated before.

Note that for proper translation, the string passed to gettext must
contain as much of a complete sentence or phrase as possible.  In this
case, it should be _("Changelog of %s"), to allow for changes to word
order or punctuation etc. as may be appropriate for each language.

You can see examples of other places using ssprintf (from
cwidget/generic/util/ssprintf.h) with the complete phrase I mentioned,
so it is already translated for anything up to date.  See, for
example, src/view_changelog.cc:272.

Please amend your patch.

Regards



More information about the Aptitude-devel mailing list