* src/virsh.c: fixed a bad messaging mechanism preventing localization

and raised by Thomas Canniot
Daniel
This commit is contained in:
Daniel Veillard 2007-04-13 08:04:08 +00:00
parent 42ee7111c3
commit c73708ea46
2 changed files with 25 additions and 8 deletions

View File

@ -1,3 +1,8 @@
Fri Apr 13 10:00:04 CEST 2007 Daniel Veillard <veillard@redhat.com>
* src/virsh.c: fixed a bad messaging mechanism preventing localization
and raised by Thomas Canniot
Thu Apr 12 19:51:00 EST 2007 Daniel Berrange <berrange@redhat.com>
* src/xen_internal.c: Updated structs to work with new Xen 3.0.5

View File

@ -327,14 +327,20 @@ cmdAutostart(vshControl * ctl, vshCmd * cmd)
autostart = !vshCommandOptBool(cmd, "disable");
if (virDomainSetAutostart(dom, autostart) < 0) {
vshError(ctl, FALSE, _("Failed to %smark domain %s as autostarted"),
autostart ? "" : "un", name);
if (autostart)
vshError(ctl, FALSE, _("Failed to mark domain %s as autostarted"),
name);
else
vshError(ctl, FALSE, _("Failed to unmark domain %s as autostarted"),
name);
virDomainFree(dom);
return FALSE;
}
vshPrint(ctl, _("Domain %s %smarked as autostarted\n"),
name, autostart ? "" : "un");
if (autostart)
vshPrint(ctl, _("Domain %s marked as autostarted\n"), name);
else
vshPrint(ctl, _("Domain %s unmarked as autostarted\n"), name);
return TRUE;
}
@ -1754,14 +1760,20 @@ cmdNetworkAutostart(vshControl * ctl, vshCmd * cmd)
autostart = !vshCommandOptBool(cmd, "disable");
if (virNetworkSetAutostart(network, autostart) < 0) {
vshError(ctl, FALSE, _("Failed to %smark network %s as autostarted"),
autostart ? "" : "un", name);
if (autostart)
vshError(ctl, FALSE, _("failed to mark network %s as autostarted"),
name);
else
vshError(ctl, FALSE,_("failed to unmark network %s as autostarted"),
name);
virNetworkFree(network);
return FALSE;
}
vshPrint(ctl, _("Network %s %smarked as autostarted\n"),
name, autostart ? "" : "un");
if (autostart)
vshPrint(ctl, _("Network %s marked as autostarted\n"), name);
else
vshPrint(ctl, _("Network %s unmarked as autostarted\n"), name);
return TRUE;
}