From: Pino Toscano Date: Wed, 24 Aug 2016 14:14:24 +0000 (+0200) Subject: virsh: avoid i18n puzzle X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=a144f28467809cf223295001b3c2b8f1c9b3d840;p=libvirt.git virsh: avoid i18n puzzle Use the full versions of the message, instead of composing a base message with what was updated; the change makes the messages properly translatable, since different parts of a sentence might need different declensions for example. --- diff --git a/tools/virsh-network.c b/tools/virsh-network.c index 16980411f3..eec7faf7b8 100644 --- a/tools/virsh-network.c +++ b/tools/virsh-network.c @@ -907,7 +907,6 @@ cmdNetworkUpdate(vshControl *ctl, const vshCmd *cmd) bool config = vshCommandOptBool(cmd, "config"); bool live = vshCommandOptBool(cmd, "live"); unsigned int flags = VIR_NETWORK_UPDATE_AFFECT_CURRENT; - const char *affected; VSH_EXCLUSIVE_OPTIONS("current", "live"); VSH_EXCLUSIVE_OPTIONS("current", "config"); @@ -978,19 +977,22 @@ cmdNetworkUpdate(vshControl *ctl, const vshCmd *cmd) if (config) { if (live) - affected = _("persistent config and live state"); + vshPrint(ctl, _("Updated network %s persistent config and live state"), + virNetworkGetName(network)); else - affected = _("persistent config"); + vshPrint(ctl, _("Updated network %s persistent config"), + virNetworkGetName(network)); } else if (live) { - affected = _("live state"); + vshPrint(ctl, _("Updated network %s live state"), + virNetworkGetName(network)); } else if (virNetworkIsActive(network)) { - affected = _("live state"); + vshPrint(ctl, _("Updated network %s live state"), + virNetworkGetName(network)); } else { - affected = _("persistent config"); + vshPrint(ctl, _("Updated network %s persistent config"), + virNetworkGetName(network)); } - vshPrint(ctl, _("Updated network %s %s"), - virNetworkGetName(network), affected); ret = true; cleanup: vshReportError(ctl);