diff --git a/ChangeLog b/ChangeLog index 20755417b46312abca52ec45995f3d24846a1979..1064db459f73fc4ca5b28bb8bc474e72c052507d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Fri Apr 13 10:00:04 CEST 2007 Daniel Veillard + + * 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 * src/xen_internal.c: Updated structs to work with new Xen 3.0.5 diff --git a/src/virsh.c b/src/virsh.c index 8237e93a843ff7f4f51b4e0b27c921fb1188f98f..4ad428c6b033e1f094d4a059667b68e916dc7ca1 100644 --- a/src/virsh.c +++ b/src/virsh.c @@ -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; }