On Wed, Nov 24, 2010 at 11:10:17PM +0100, Francesco Cosoleto wrote: > This version makes more clear the printed message specially when the > --user option is used. Good idea. > diff --git a/sys-utils/renice.c b/sys-utils/renice.c > index d804ca9..ff4c443 100644 > --- a/sys-utils/renice.c > +++ b/sys-utils/renice.c > @@ -151,25 +151,31 @@ main(int argc, char **argv) > static int > donice(int which, int who, int prio) { > int oldprio, newprio; > + const char *idtype = _("process ID"); > + > + if (which == PRIO_USER) > + idtype = _("user ID"); > + else if (which == PRIO_PGRP) > + idtype = _("process group ID"); > > errno = 0; > oldprio = getpriority(which, who); > if (oldprio == -1 && errno) { > - warn(_("%d: getpriority"), who); > + warn(_("failed to get priority for %s %d"), idtype, who); > return 1; > } > if (setpriority(which, who, prio) < 0) { > - warn(_("%d: setpriority"), who); > + warn(_("failed to set priority for %s %d"), idtype, who); Unfortunately, translators don't like this kind of strings where any translatable substring is inserted to the normal sentence. It would be better to use something like: "%d (%s): failed to set priority", who, idtype "%s: %d: failed to set priority", idtype, who or so... Karel -- Karel Zak <kzak@xxxxxxxxxx> http://karelzak.blogspot.com -- To unsubscribe from this list: send the line "unsubscribe util-linux-ng" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html