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

Manuel A. Fernandez Montecelo manuel.montezelo at gmail.com
Sat Feb 1 14:55:49 UTC 2014

2014-01-31 Daniel Hartwig <mandyke at gmail.com>:
> 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

Thanks for the pointers, I think that it's OK now.


Manuel A. Fernandez Montecelo <manuel.montezelo at gmail.com>

More information about the Aptitude-devel mailing list