mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-31 00:45:18 +00:00
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.
This commit is contained in:
parent
b620bdee14
commit
a144f28467
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user