[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[libvirt] VIR_WARN and VIR_WARN0: many diags were not marked for translation



I noticed some VIR_WARN* uses with unmarked (for translation)
strings.  It turns out there are more than 50:

    $ g grep -E 'VIR_WARN0?\(".*"[,)]'|wc -l
    128

Here's a sample:

  src/phyp/phyp_driver.c:        VIR_WARN0("Unable to stat local file.");
  src/phyp/phyp_driver.c:        VIR_WARN0("Unable to open local file.");
  src/qemu/qemu_conf.c:            VIR_WARN0("Failed to get host CPU");

Affected files:

  $ g grep -l -E 'VIR_WARN0?\(".*"\)'
  daemon/remote.c
  src/esx/esx_driver.c
  src/lxc/lxc_conf.c
  src/lxc/lxc_controller.c
  src/phyp/phyp_driver.c
  src/qemu/qemu_conf.c
  src/qemu/qemu_driver.c
  src/qemu/qemu_monitor_json.c
  src/remote/remote_driver.c
  src/storage/storage_backend_logical.c
  src/uml/uml_conf.c
  src/uml/uml_driver.c
  src/util/pci.c
  src/util/util.c
  src/xen/proxy_internal.c

This change ensures that no new ones will sneak in:

diff --git a/cfg.mk b/cfg.mk
index 96d6953..49300a0 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -358,6 +358,8 @@ msg_gen_function += virXendError
 msg_gen_function += xenapiSessionErrorHandler
 msg_gen_function += xenUnifiedError
 msg_gen_function += xenXMError
+msg_gen_function += VIR_WARN
+msg_gen_function += VIR_WARN0

 # Uncomment the following and run "make syntax-check" to see diagnostics
 # that are not yet marked for translation, but that need to be rewritten

Running these commands fixes the vast majority:

    git grep -l -E 'VIR_WARN0 *\(".*?"\)'|xargs perl -pi -e \
      's/(VIR_WARN0\s*)\((".*")\)/$1(_($2))/'

    git grep -l -E 'VIR_WARN *\(".*?",'|xargs perl -pi -e \
      's/(VIR_WARN\s*)\((".*"),/$1(_($2),/'

Addressing the remaining problems showed some abuses
(e.g., VIR_WARN(_("%s"), "untranslated string") that should be
       VIR_WARN(_("untranslated string"))          )

Finally, since the above introduced translatable strings into
three files that previously had none, I have to add them
to po/POTFILES.in (which I also sorted):

diff --git a/po/POTFILES.in b/po/POTFILES.in
index 88218bd..3346654 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -1,4 +1,5 @@
 daemon/dispatch.c
+daemon/event.c
 daemon/libvirtd.c
 daemon/remote.c
 daemon/stream.c
@@ -18,6 +19,7 @@ src/cpu/cpu_generic.c
 src/cpu/cpu_map.c
 src/cpu/cpu_x86.c
 src/datatypes.c
+src/driver.c
 src/esx/esx_driver.c
 src/esx/esx_util.c
 src/esx/esx_vi.c
@@ -27,6 +29,7 @@ src/esx/esx_vmx.c
 src/interface/netcf_driver.c
 src/internal.h
 src/libvirt.c
+src/lxc/lxc_conf.c
 src/lxc/lxc_container.c
 src/lxc/lxc_controller.c
 src/lxc/lxc_driver.c
@@ -53,8 +56,8 @@ src/qemu/qemu_monitor_text.c
 src/qemu/qemu_security_dac.c
 src/remote/remote_driver.c
 src/secret/secret_driver.c
-src/security/security_driver.c
 src/security/security_apparmor.c
+src/security/security_driver.c
 src/security/security_selinux.c
 src/security/virt-aa-helper.c
 src/storage/storage_backend.c
@@ -89,10 +92,10 @@ src/util/xml.c
 src/vbox/vbox_driver.c
 src/vbox/vbox_tmpl.c
 src/xen/proxy_internal.c
-src/xen/xend_internal.c
 src/xen/xen_driver.c
 src/xen/xen_hypervisor.c
 src/xen/xen_inotify.c
+src/xen/xend_internal.c
 src/xen/xm_internal.c
 src/xen/xs_internal.c
 src/xenapi/xenapi_driver.c

Here are the three separate changes:

  - the first is 100% automatically generated, so probably not worth much
    review effort
  - the 2nd was all manual, so would benefit from a 2nd pair of eyes
  - the 3rd is tiny and trivial


>From ca5fc870b68d09fdd14144ce67a4c0e1add45a34 Mon Sep 17 00:00:00 2001
From: Jim Meyering <meyering redhat com>
Date: Tue, 18 May 2010 16:12:41 +0200
Subject: [PATCH 1/3] maint: mark VIR_WARN and VIR_WARN0 diagnostics for translation

Running these commands fixes the vast majority:

  git grep -l -E 'VIR_WARN0 *\(".*?"\)'|xargs perl -pi -e \
    's/(VIR_WARN0\s*)\((".*")\)/$1(_($2))/'

  git grep -l -E 'VIR_WARN *\(".*?",'|xargs perl -pi -e \
    's/(VIR_WARN\s*)\((".*"),/$1(_($2),/'
---
 daemon/event.c                        |    8 ++--
 daemon/remote.c                       |    4 +-
 daemon/stream.c                       |    4 +-
 src/conf/domain_event.c               |    2 +-
 src/driver.c                          |    2 +-
 src/esx/esx_driver.c                  |   24 +++++-----
 src/esx/esx_util.c                    |    2 +-
 src/esx/esx_vi.c                      |   18 ++++----
 src/esx/esx_vi_types.c                |    2 +-
 src/esx/esx_vmx.c                     |    6 +-
 src/lxc/lxc_conf.c                    |    4 +-
 src/lxc/lxc_controller.c              |    2 +-
 src/lxc/lxc_driver.c                  |    2 +-
 src/nodeinfo.c                        |    2 +-
 src/phyp/phyp_driver.c                |   24 +++++-----
 src/qemu/qemu_conf.c                  |    4 +-
 src/qemu/qemu_driver.c                |   72 ++++++++++++++++----------------
 src/qemu/qemu_monitor_json.c          |   24 +++++-----
 src/remote/remote_driver.c            |   26 ++++++------
 src/security/security_selinux.c       |    2 +-
 src/storage/storage_backend_logical.c |    2 +-
 src/uml/uml_conf.c                    |    2 +-
 src/uml/uml_driver.c                  |    4 +-
 src/util/hooks.c                      |    2 +-
 src/util/json.c                       |    2 +-
 src/util/pci.c                        |    4 +-
 src/util/util.c                       |    2 +-
 src/xen/proxy_internal.c              |    4 +-
 src/xenapi/xenapi_utils.c             |    2 +-
 29 files changed, 129 insertions(+), 129 deletions(-)

diff --git a/daemon/event.c b/daemon/event.c
index 6971409..77ecd5e 100644
--- a/daemon/event.c
+++ b/daemon/event.c
@@ -147,7 +147,7 @@ void virEventUpdateHandleImpl(int watch, int events) {
     EVENT_DEBUG("Update handle w=%d e=%d", watch, events);

     if (watch <= 0) {
-        VIR_WARN("Ignoring invalid update watch %d", watch);
+        VIR_WARN(_("Ignoring invalid update watch %d"), watch);
         return;
     }

@@ -174,7 +174,7 @@ int virEventRemoveHandleImpl(int watch) {
     EVENT_DEBUG("Remove handle w=%d", watch);

     if (watch <= 0) {
-        VIR_WARN("Ignoring invalid remove watch %d", watch);
+        VIR_WARN(_("Ignoring invalid remove watch %d"), watch);
         return -1;
     }

@@ -248,7 +248,7 @@ void virEventUpdateTimeoutImpl(int timer, int frequency) {
     EVENT_DEBUG("Updating timer %d timeout with %d ms freq", timer, frequency);

     if (timer <= 0) {
-        VIR_WARN("Ignoring invalid update timer %d", timer);
+        VIR_WARN(_("Ignoring invalid update timer %d"), timer);
         return;
     }

@@ -282,7 +282,7 @@ int virEventRemoveTimeoutImpl(int timer) {
     EVENT_DEBUG("Remove timer %d", timer);

     if (timer <= 0) {
-        VIR_WARN("Ignoring invalid remove timer %d", timer);
+        VIR_WARN(_("Ignoring invalid remove timer %d"), timer);
         return -1;
     }

diff --git a/daemon/remote.c b/daemon/remote.c
index c54565c..307a265 100644
--- a/daemon/remote.c
+++ b/daemon/remote.c
@@ -337,7 +337,7 @@ static int remoteRelayDomainEventGraphics(virConnectPtr conn ATTRIBUTE_UNUSED,

     data.subject.subject_len = subject->nidentity;
     if (VIR_ALLOC_N(data.subject.subject_val, data.subject.subject_len) < 0) {
-        VIR_WARN0("cannot allocate memory for graphics event subject");
+        VIR_WARN0(_("cannot allocate memory for graphics event subject"));
         return -1;
     }
     for (i = 0 ; i < data.subject.subject_len ; i++) {
@@ -5296,7 +5296,7 @@ remoteDispatchDomainEventSend (struct qemud_client *client,
         goto xdr_error;

     if (!(proc)(&xdr, data)) {
-        VIR_WARN("Failed to serialize domain event %d", procnr);
+        VIR_WARN(_("Failed to serialize domain event %d"), procnr);
         goto xdr_error;
     }

diff --git a/daemon/stream.c b/daemon/stream.c
index d64fe73..86c894d 100644
--- a/daemon/stream.c
+++ b/daemon/stream.c
@@ -77,7 +77,7 @@ remoteStreamEvent(virStreamPtr st, int events, void *opaque)
     stream = remoteFindClientStream(client, st);

     if (!stream) {
-        VIR_WARN("event for client=%p stream st=%p, but missing stream state", client, st);
+        VIR_WARN(_("event for client=%p stream st=%p, but missing stream state"), client, st);
         virStreamEventRemoveCallback(st);
         goto cleanup;
     }
@@ -467,7 +467,7 @@ remoteStreamHandleAbort(struct qemud_client *client,
     if (msg->hdr.status == REMOTE_ERROR)
         remoteDispatchFormatError(&rerr, "%s", _("stream aborted at client request"));
     else {
-        VIR_WARN("unexpected stream status %d", msg->hdr.status);
+        VIR_WARN(_("unexpected stream status %d"), msg->hdr.status);
         remoteDispatchFormatError(&rerr, _("stream aborted with unexpected status %d"),
                                   msg->hdr.status);
     }
diff --git a/src/conf/domain_event.c b/src/conf/domain_event.c
index e88aafe..0599c94 100644
--- a/src/conf/domain_event.c
+++ b/src/conf/domain_event.c
@@ -924,7 +924,7 @@ void virDomainEventDispatchDefaultFunc(virConnectPtr conn,
         break;

     default:
-        VIR_WARN("Unexpected event ID %d", event->eventID);
+        VIR_WARN(_("Unexpected event ID %d"), event->eventID);
         break;
     }

diff --git a/src/driver.c b/src/driver.c
index e6f3aaa..e153e9d 100644
--- a/src/driver.c
+++ b/src/driver.c
@@ -58,7 +58,7 @@ virDriverLoadModule(const char *name)
         return NULL;

     if (access(modfile, R_OK) < 0) {
-        VIR_WARN("Module %s not accessible", modfile);
+        VIR_WARN(_("Module %s not accessible"), modfile);
         goto cleanup;
     }

diff --git a/src/esx/esx_driver.c b/src/esx/esx_driver.c
index 8e55fc6..5c83dc4 100644
--- a/src/esx/esx_driver.c
+++ b/src/esx/esx_driver.c
@@ -122,7 +122,7 @@ esxSupportsLongMode(esxPrivate *priv)

             break;
         } else {
-            VIR_WARN("Unexpected '%s' property", dynamicProperty->name);
+            VIR_WARN(_("Unexpected '%s' property"), dynamicProperty->name);
         }
     }

@@ -274,7 +274,7 @@ esxOpen(virConnectPtr conn, virConnectAuthPtr auth, int flags ATTRIBUTE_UNUSED)

     if (conn->uri->path != NULL && STRNEQ(conn->uri->path, "") &&
         STRNEQ(conn->uri->path, "/")) {
-        VIR_WARN("Ignoring unexpected path '%s' in URI", conn->uri->path);
+        VIR_WARN(_("Ignoring unexpected path '%s' in URI"), conn->uri->path);
     }

     /* Allocate per-connection private data */
@@ -399,7 +399,7 @@ esxOpen(virConnectPtr conn, virConnectAuthPtr auth, int flags ATTRIBUTE_UNUSED)
             }

             if (dynamicProperty->val->boolean == esxVI_Boolean_True) {
-                VIR_WARN0("The server is in maintenance mode");
+                VIR_WARN0(_("The server is in maintenance mode"));
             }

             break;
@@ -617,7 +617,7 @@ esxSupportsVMotion(esxPrivate *priv)
             priv->supportsVMotion = dynamicProperty->val->boolean;
             break;
         } else {
-            VIR_WARN("Unexpected '%s' property", dynamicProperty->name);
+            VIR_WARN(_("Unexpected '%s' property"), dynamicProperty->name);
         }
     }

@@ -737,7 +737,7 @@ esxGetHostname(virConnectPtr conn)

             domainName = dynamicProperty->val->string;
         } else {
-            VIR_WARN("Unexpected '%s' property", dynamicProperty->name);
+            VIR_WARN(_("Unexpected '%s' property"), dynamicProperty->name);
         }
     }

@@ -899,7 +899,7 @@ esxNodeGetInfo(virConnectPtr conn, virNodeInfoPtr nodeinfo)
                 goto failure;
             }
         } else {
-            VIR_WARN("Unexpected '%s' property", dynamicProperty->name);
+            VIR_WARN(_("Unexpected '%s' property"), dynamicProperty->name);
         }
     }

@@ -1559,7 +1559,7 @@ esxDomainGetMaxMemory(virDomainPtr domain)

             break;
         } else {
-            VIR_WARN("Unexpected '%s' property", dynamicProperty->name);
+            VIR_WARN(_("Unexpected '%s' property"), dynamicProperty->name);
         }
     }

@@ -1765,7 +1765,7 @@ esxDomainGetInfo(virDomainPtr domain, virDomainInfoPtr info)
                 memory_limit *= 1024; /* Scale from megabyte to kilobyte */
             }
         } else {
-            VIR_WARN("Unexpected '%s' property", dynamicProperty->name);
+            VIR_WARN(_("Unexpected '%s' property"), dynamicProperty->name);
         }
     }

@@ -1851,7 +1851,7 @@ esxDomainGetInfo(virDomainPtr domain, virDomainInfoPtr info)
         }

         if (priv->usedCpuTimeCounterId < 0) {
-            VIR_WARN0("Could not find 'used CPU time' performance counter");
+            VIR_WARN0(_("Could not find 'used CPU time' performance counter"));
         }
     }

@@ -2054,7 +2054,7 @@ esxDomainGetMaxVcpus(virDomainPtr domain)
             priv->maxVcpus = dynamicProperty->val->int32;
             break;
         } else {
-            VIR_WARN("Unexpected '%s' property", dynamicProperty->name);
+            VIR_WARN(_("Unexpected '%s' property"), dynamicProperty->name);
         }
     }

@@ -2812,7 +2812,7 @@ esxDomainGetSchedulerParameters(virDomainPtr domain,
             mask |= 1 << 2;
             ++i;
         } else {
-            VIR_WARN("Unexpected '%s' property", dynamicProperty->name);
+            VIR_WARN(_("Unexpected '%s' property"), dynamicProperty->name);
         }
     }

@@ -3188,7 +3188,7 @@ esxNodeGetFreeMemory(virConnectPtr conn)

             break;
         } else {
-            VIR_WARN("Unexpected '%s' property", dynamicProperty->name);
+            VIR_WARN(_("Unexpected '%s' property"), dynamicProperty->name);
         }
     }

diff --git a/src/esx/esx_util.c b/src/esx/esx_util.c
index 51c9afc..8aa8c98 100644
--- a/src/esx/esx_util.c
+++ b/src/esx/esx_util.c
@@ -131,7 +131,7 @@ esxUtil_ParseQuery(xmlURIPtr uri, char **transport, char **vCenter,
                 goto failure;
             }
         } else {
-            VIR_WARN("Ignoring unexpected query parameter '%s'",
+            VIR_WARN(_("Ignoring unexpected query parameter '%s'"),
                      queryParam->name);
         }
     }
diff --git a/src/esx/esx_vi.c b/src/esx/esx_vi.c
index 966ef85..2f41c58 100644
--- a/src/esx/esx_vi.c
+++ b/src/esx/esx_vi.c
@@ -465,7 +465,7 @@ esxVI_Context_Connect(esxVI_Context *ctx, const char *url,
                 goto failure;
             }
         } else {
-            VIR_WARN("Unexpected '%s' property", dynamicProperty->name);
+            VIR_WARN(_("Unexpected '%s' property"), dynamicProperty->name);
         }
     }

@@ -1348,7 +1348,7 @@ esxVI_EnsureSession(esxVI_Context *ctx)

             break;
         } else {
-            VIR_WARN("Unexpected '%s' property", dynamicProperty->name);
+            VIR_WARN(_("Unexpected '%s' property"), dynamicProperty->name);
         }
     }

@@ -1567,7 +1567,7 @@ esxVI_LookupNumberOfDomainsByPowerState(esxVI_Context *ctx,
                     numberOfDomains++;
                 }
             } else {
-                VIR_WARN("Unexpected '%s' property", dynamicProperty->name);
+                VIR_WARN(_("Unexpected '%s' property"), dynamicProperty->name);
             }
         }
     }
@@ -1868,7 +1868,7 @@ esxVI_LookupResourcePoolByHostSystem

             break;
         } else {
-            VIR_WARN("Unexpected '%s' property", dynamicProperty->name);
+            VIR_WARN(_("Unexpected '%s' property"), dynamicProperty->name);
         }
     }

@@ -1902,7 +1902,7 @@ esxVI_LookupResourcePoolByHostSystem

             break;
         } else {
-            VIR_WARN("Unexpected '%s' property", dynamicProperty->name);
+            VIR_WARN(_("Unexpected '%s' property"), dynamicProperty->name);
         }
     }

@@ -2277,7 +2277,7 @@ esxVI_LookupDatastoreByName(esxVI_Context *ctx, const char *name,
                     goto cleanup;
                 }
             } else {
-                VIR_WARN("Unexpected '%s' property", dynamicProperty->name);
+                VIR_WARN(_("Unexpected '%s' property"), dynamicProperty->name);
             }
         }
     }
@@ -2340,7 +2340,7 @@ int esxVI_LookupTaskInfoByTask(esxVI_Context *ctx,

             break;
         } else {
-            VIR_WARN("Unexpected '%s' property", dynamicProperty->name);
+            VIR_WARN(_("Unexpected '%s' property"), dynamicProperty->name);
         }
     }

@@ -2499,7 +2499,7 @@ esxVI_LookupRootSnapshotTreeList

             break;
         } else {
-            VIR_WARN("Unexpected '%s' property", dynamicProperty->name);
+            VIR_WARN(_("Unexpected '%s' property"), dynamicProperty->name);
         }
     }

@@ -2560,7 +2560,7 @@ esxVI_LookupCurrentSnapshotTree
                 goto failure;
             }
         } else {
-            VIR_WARN("Unexpected '%s' property", dynamicProperty->name);
+            VIR_WARN(_("Unexpected '%s' property"), dynamicProperty->name);
         }
     }

diff --git a/src/esx/esx_vi_types.c b/src/esx/esx_vi_types.c
index 7d2c02c..3e41108 100644
--- a/src/esx/esx_vi_types.c
+++ b/src/esx/esx_vi_types.c
@@ -271,7 +271,7 @@
                                                                               \
             _deserialize                                                      \
                                                                               \
-            VIR_WARN("Unexpected '%s' property", childNode->name);            \
+            VIR_WARN(_("Unexpected '%s' property"), childNode->name);            \
         }                                                                     \
                                                                               \
         if (esxVI_##_type##_Validate(*ptrptr) < 0) {                          \
diff --git a/src/esx/esx_vmx.c b/src/esx/esx_vmx.c
index 142f2f7..f1c612d 100644
--- a/src/esx/esx_vmx.c
+++ b/src/esx/esx_vmx.c
@@ -637,7 +637,7 @@ esxVMX_AbsolutePathToDatastoreRelatedPath(esxVI_Context *ctx,
                 } else if (STREQ(dynamicProperty->name, "summary.url")) {
                     /* Ignore it */
                 } else {
-                    VIR_WARN("Unexpected '%s' property", dynamicProperty->name);
+                    VIR_WARN(_("Unexpected '%s' property"), dynamicProperty->name);
                 }
             }
         }
@@ -1221,7 +1221,7 @@ esxVMX_ParseVNC(virConfPtr conf, virDomainGraphicsDefPtr *def)
         (*def)->data.vnc.autoport = 1;
     } else {
         if (port < 5900 || port > 5964) {
-            VIR_WARN("VNC port %lld it out of [5900..5964] range", port);
+            VIR_WARN(_("VNC port %lld it out of [5900..5964] range"), port);
         }

         (*def)->data.vnc.port = port;
@@ -2477,7 +2477,7 @@ esxVMX_FormatVNC(virDomainGraphicsDefPtr def, virBufferPtr buffer)
                   "VNC port cannot be read back");
     } else {
         if (def->data.vnc.port < 5900 || def->data.vnc.port > 5964) {
-            VIR_WARN("VNC port %d it out of [5900..5964] range",
+            VIR_WARN(_("VNC port %d it out of [5900..5964] range"),
                      def->data.vnc.port);
         }

diff --git a/src/lxc/lxc_conf.c b/src/lxc/lxc_conf.c
index 8d7f69e..ad9a814 100644
--- a/src/lxc/lxc_conf.c
+++ b/src/lxc/lxc_conf.c
@@ -56,7 +56,7 @@ virCapsPtr lxcCapsInit(void)
      */
     if (nodeCapsInitNUMA(caps) < 0) {
         virCapabilitiesFreeNUMAInfo(caps);
-        VIR_WARN0("Failed to query host NUMA topology, disabling NUMA capabilities");
+        VIR_WARN0(_("Failed to query host NUMA topology, disabling NUMA capabilities"));
     }

     /* XXX shouldn't 'borrow' KVM's prefix */
@@ -120,7 +120,7 @@ int lxcLoadDriverConfig(lxc_driver_t *driver)
     p = virConfGetValue(conf, "log_with_libvirtd");
     if (p) {
         if (p->type != VIR_CONF_LONG)
-            VIR_WARN0("lxcLoadDriverConfig: invalid setting: log_with_libvirtd");
+            VIR_WARN0(_("lxcLoadDriverConfig: invalid setting: log_with_libvirtd"));
         else
             driver->log_libvirtd = p->l;
     }
diff --git a/src/lxc/lxc_controller.c b/src/lxc/lxc_controller.c
index c120b8e..6c89375 100644
--- a/src/lxc/lxc_controller.c
+++ b/src/lxc/lxc_controller.c
@@ -576,7 +576,7 @@ lxcControllerRun(virDomainDefPtr def,
         }

         if (access(devptmx, R_OK) < 0) {
-            VIR_WARN0("Kernel does not support private devpts, using shared devpts");
+            VIR_WARN0(_("Kernel does not support private devpts, using shared devpts"));
             VIR_FREE(devptmx);
         }
     }
diff --git a/src/lxc/lxc_driver.c b/src/lxc/lxc_driver.c
index 8c3bbd3..840aeda 100644
--- a/src/lxc/lxc_driver.c
+++ b/src/lxc/lxc_driver.c
@@ -1878,7 +1878,7 @@ static int lxcStartup(int privileged)
     rc = virCgroupForDriver("lxc", &lxc_driver->cgroup, privileged, 1);
     if (rc < 0) {
         char buf[1024];
-        VIR_WARN("Unable to create cgroup for driver: %s",
+        VIR_WARN(_("Unable to create cgroup for driver: %s"),
                  virStrerror(-rc, buf, sizeof(buf)));
     }

diff --git a/src/nodeinfo.c b/src/nodeinfo.c
index 5ec1bcf..e6fbee1 100644
--- a/src/nodeinfo.c
+++ b/src/nodeinfo.c
@@ -336,7 +336,7 @@ nodeCapsInitNUMA(virCapsPtr caps)
         int i;
         int ncpus;
         if (numa_node_to_cpus(n, mask, mask_n_bytes) < 0) {
-            VIR_WARN("NUMA topology for cell %d of %d not available, ignoring",
+            VIR_WARN(_("NUMA topology for cell %d of %d not available, ignoring"),
                      n, numa_max_node());
             continue;
         }
diff --git a/src/phyp/phyp_driver.c b/src/phyp/phyp_driver.c
index cec99b1..0e32a18 100644
--- a/src/phyp/phyp_driver.c
+++ b/src/phyp/phyp_driver.c
@@ -1344,15 +1344,15 @@ phypDomainGetInfo(virDomainPtr dom, virDomainInfoPtr info)

     if ((info->maxMem =
          phypGetLparMem(dom->conn, managed_system, dom->id, 0)) == 0)
-        VIR_WARN("%s", "Unable to determine domain's max memory.");
+        VIR_WARN(_("%s"), "Unable to determine domain's max memory.");

     if ((info->memory =
          phypGetLparMem(dom->conn, managed_system, dom->id, 1)) == 0)
-        VIR_WARN("%s", "Unable to determine domain's memory.");
+        VIR_WARN(_("%s"), "Unable to determine domain's memory.");

     if ((info->nrVirtCpu =
          phypGetLparCPU(dom->conn, managed_system, dom->id)) == 0)
-        VIR_WARN("%s", "Unable to determine domain's CPU.");
+        VIR_WARN(_("%s"), "Unable to determine domain's CPU.");

     return 0;
 }
@@ -1416,14 +1416,14 @@ phypDomainCreateAndStart(virConnectPtr conn,

     /* checking if this name already exists on this system */
     if (phypGetLparID(session, managed_system, def->name, conn) == -1) {
-        VIR_WARN("%s", "LPAR name already exists.");
+        VIR_WARN(_("%s"), "LPAR name already exists.");
         goto err;
     }

     /* checking if ID or UUID already exists on this system */
     for (i = 0; i < uuid_table->nlpars; i++) {
         if (lpars[i]->id == def->id || lpars[i]->uuid == def->uuid) {
-            VIR_WARN("%s", "LPAR ID or UUID already exists.");
+            VIR_WARN(_("%s"), "LPAR ID or UUID already exists.");
             goto err;
         }
     }
@@ -1782,7 +1782,7 @@ phypUUIDTable_ReadFile(virConnectPtr conn)
     int id;

     if ((fd = open(local_file, O_RDONLY)) == -1) {
-        VIR_WARN("%s", "Unable to write information to local file.");
+        VIR_WARN(_("%s"), "Unable to write information to local file.");
         goto err;
     }

@@ -1798,14 +1798,14 @@ phypUUIDTable_ReadFile(virConnectPtr conn)
                 }
                 uuid_table->lpars[i]->id = id;
             } else {
-                VIR_WARN("%s",
+                VIR_WARN(_("%s"),
                          "Unable to read from information to local file.");
                 goto err;
             }

             rc = read(fd, uuid_table->lpars[i]->uuid, VIR_UUID_BUFLEN);
             if (rc != VIR_UUID_BUFLEN) {
-                VIR_WARN("%s",
+                VIR_WARN(_("%s"),
                          "Unable to read information to local file.");
                 goto err;
             }
@@ -1909,7 +1909,7 @@ phypUUIDTable_Init(virConnectPtr conn)
                 uuid_table->lpars[i]->id = ids[i];

                 if (virUUIDGenerate(uuid_table->lpars[i]->uuid) < 0)
-                    VIR_WARN("%s %d", "Unable to generate UUID for domain",
+                    VIR_WARN(_("%s %d", "Unable to generate UUID for domain"),
                              ids[i]);
             }
         } else {
@@ -1968,12 +1968,12 @@ phypUUIDTable_Push(virConnectPtr conn)
     char local_file[] = "./uuid_table";

     if (stat(local_file, &local_fileinfo) == -1) {
-        VIR_WARN0("Unable to stat local file.");
+        VIR_WARN0(_("Unable to stat local file."));
         goto err;
     }

     if (!(fd = fopen(local_file, "rb"))) {
-        VIR_WARN0("Unable to open local file.");
+        VIR_WARN0(_("Unable to open local file."));
         goto err;
     }

@@ -2083,7 +2083,7 @@ phypUUIDTable_Pull(virConnectPtr conn)
             rc = libssh2_channel_read(channel, buffer, amount);
             if (rc > 0) {
                 if (safewrite(fd, buffer, rc) != rc)
-                    VIR_WARN("%s",
+                    VIR_WARN(_("%s"),
                              "Unable to write information to local file.");

                 got += rc;
diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c
index 5fa8c0a..4cc49bf 100644
--- a/src/qemu/qemu_conf.c
+++ b/src/qemu/qemu_conf.c
@@ -1069,12 +1069,12 @@ virCapsPtr qemudCapsInit(virCapsPtr old_caps) {
      */
     if (nodeCapsInitNUMA(caps) < 0) {
         virCapabilitiesFreeNUMAInfo(caps);
-        VIR_WARN0("Failed to query host NUMA topology, disabling NUMA capabilities");
+        VIR_WARN0(_("Failed to query host NUMA topology, disabling NUMA capabilities"));
     }

     if (old_caps == NULL || old_caps->host.cpu == NULL) {
         if (qemudCapsInitCPU(caps, utsname.machine) < 0)
-            VIR_WARN0("Failed to get host CPU");
+            VIR_WARN0(_("Failed to get host CPU"));
     }
     else {
         caps->host.cpu = old_caps->host.cpu;
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 9d23191..d830860 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -928,7 +928,7 @@ qemuHandleDomainStop(qemuMonitorPtr mon ATTRIBUTE_UNUSED,
                                          VIR_DOMAIN_EVENT_SUSPENDED_PAUSED);

         if (virDomainSaveStatus(driver->caps, driver->stateDir, vm) < 0)
-            VIR_WARN("Unable to save status on vm %s after IO error", vm->def->name);
+            VIR_WARN(_("Unable to save status on vm %s after IO error"), vm->def->name);
     }
     virDomainObjUnlock(vm);

@@ -958,7 +958,7 @@ qemuHandleDomainRTCChange(qemuMonitorPtr mon ATTRIBUTE_UNUSED,
         vm->def->clock.data.adjustment = offset;

     if (virDomainSaveStatus(driver->caps, driver->stateDir, vm) < 0)
-        VIR_WARN0("unable to save domain status with RTC change");
+        VIR_WARN0(_("unable to save domain status with RTC change"));

     virDomainObjUnlock(vm);

@@ -994,7 +994,7 @@ qemuHandleDomainWatchdog(qemuMonitorPtr mon ATTRIBUTE_UNUSED,
                                                   VIR_DOMAIN_EVENT_SUSPENDED_WATCHDOG);

         if (virDomainSaveStatus(driver->caps, driver->stateDir, vm) < 0)
-            VIR_WARN("Unable to save status on vm %s after IO error", vm->def->name);
+            VIR_WARN(_("Unable to save status on vm %s after IO error"), vm->def->name);
     }
     virDomainObjUnlock(vm);

@@ -1050,7 +1050,7 @@ qemuHandleDomainIOError(qemuMonitorPtr mon ATTRIBUTE_UNUSED,
                                                   VIR_DOMAIN_EVENT_SUSPENDED_IOERROR);

         if (virDomainSaveStatus(driver->caps, driver->stateDir, vm) < 0)
-            VIR_WARN("Unable to save status on vm %s after IO error", vm->def->name);
+            VIR_WARN(_("Unable to save status on vm %s after IO error"), vm->def->name);
     }
     virDomainObjUnlock(vm);

@@ -1580,7 +1580,7 @@ qemudStartup(int privileged) {
     rc = virCgroupForDriver("qemu", &qemu_driver->cgroup, privileged, 1);
     if (rc < 0) {
         char buf[1024];
-        VIR_WARN("Unable to create cgroup for driver: %s",
+        VIR_WARN(_("Unable to create cgroup for driver: %s"),
                  virStrerror(-rc, buf, sizeof(buf)));
     }

@@ -3077,7 +3077,7 @@ static int qemuSetupCgroup(struct qemud_driver *driver,
         rc = virCgroupDenyAllDevices(cgroup);
         if (rc != 0) {
             if (rc == -EPERM) {
-                VIR_WARN0("Group devices ACL is not accessible, disabling whitelisting");
+                VIR_WARN0(_("Group devices ACL is not accessible, disabling whitelisting"));
                 goto done;
             }

@@ -3711,7 +3711,7 @@ retry:
             usleep(200*1000);
             goto retry;
         }
-        VIR_WARN("Failed to remove cgroup for %s",
+        VIR_WARN(_("Failed to remove cgroup for %s"),
                  vm->def->name);
     }

@@ -3944,7 +3944,7 @@ static int qemudGetProcessInfo(unsigned long long *cpuTime, int *lastCpu, int pi
                "%*u %*u %*u %*u %*u %*u %*u %*u %*u %*u %*d %d",
                &usertime, &systime, &cpu) != 3) {
         fclose(pidinfo);
-        VIR_WARN0("cannot parse process status data");
+        VIR_WARN0(_("cannot parse process status data"));
         errno = -EINVAL;
         return -1;
     }
@@ -4662,13 +4662,13 @@ qemuDomainWaitForMigrationComplete(struct qemud_driver *driver, virDomainObjPtr
             rc = qemuMonitorMigrateCancel(priv->mon);
             qemuDomainObjExitMonitorWithDriver(driver, vm);
             if (rc < 0) {
-                VIR_WARN0("Unable to cancel migration");
+                VIR_WARN0(_("Unable to cancel migration"));
             }
         } else if (priv->jobSignals & QEMU_JOB_SIGNAL_SUSPEND) {
             priv->jobSignals ^= QEMU_JOB_SIGNAL_SUSPEND;
             VIR_DEBUG0("Pausing domain for non-live migration");
             if (qemuDomainMigrateOffline(driver, vm) < 0)
-                VIR_WARN0("Unable to pause domain");
+                VIR_WARN0(_("Unable to pause domain"));
         } else if (priv->jobSignals & QEMU_JOB_SIGNAL_MIGRATE_DOWNTIME) {
             unsigned long long ms = priv->jobSignalsData.migrateDowntime;

@@ -4679,7 +4679,7 @@ qemuDomainWaitForMigrationComplete(struct qemud_driver *driver, virDomainObjPtr
             rc = qemuMonitorSetMigrationDowntime(priv->mon, ms);
             qemuDomainObjExitMonitorWithDriver(driver, vm);
             if (rc < 0)
-                VIR_WARN0("Unable to set migration downtime");
+                VIR_WARN0(_("Unable to set migration downtime"));
         }

         qemuDomainObjEnterMonitorWithDriver(driver, vm);
@@ -5102,12 +5102,12 @@ static int qemudDomainSaveFlag(virDomainPtr dom, const char *path,
         driver->securityDriver &&
         driver->securityDriver->domainRestoreSavedStateLabel &&
         driver->securityDriver->domainRestoreSavedStateLabel(vm, path) == -1)
-        VIR_WARN("failed to restore save state label on %s", path);
+        VIR_WARN(_("failed to restore save state label on %s"), path);

     if (cgroup != NULL) {
         rc = virCgroupDenyDevicePath(cgroup, path);
         if (rc != 0)
-            VIR_WARN("Unable to deny device %s for %s %d",
+            VIR_WARN(_("Unable to deny device %s for %s %d"),
                      path, vm->def->name, rc);
     }

@@ -5133,7 +5133,7 @@ endjob:
                 rc = qemuMonitorStartCPUs(priv->mon, dom->conn);
                 qemuDomainObjExitMonitorWithDriver(driver, vm);
                 if (rc < 0)
-                    VIR_WARN0("Unable to resume guest CPUs after save failure");
+                    VIR_WARN0(_("Unable to resume guest CPUs after save failure"));
                 else
                     vm->state = VIR_DOMAIN_RUNNING;
             }
@@ -5141,7 +5141,7 @@ endjob:
             if (cgroup != NULL) {
                 rc = virCgroupDenyDevicePath(cgroup, path);
                 if (rc != 0)
-                    VIR_WARN("Unable to deny device %s for %s: %d",
+                    VIR_WARN(_("Unable to deny device %s for %s: %d"),
                              path, vm->def->name, rc);
             }

@@ -5149,7 +5149,7 @@ endjob:
                 driver->securityDriver &&
                 driver->securityDriver->domainRestoreSavedStateLabel &&
                 driver->securityDriver->domainRestoreSavedStateLabel(vm, path) == -1)
-                VIR_WARN("failed to restore save state label on %s", path);
+                VIR_WARN(_("failed to restore save state label on %s"), path);
         }

         if (qemuDomainObjEndJob(vm) == 0)
@@ -6177,7 +6177,7 @@ static int qemudDomainRestore(virConnectPtr conn,
         qemuDomainObjExitMonitorWithDriver(driver, vm);
         vm->state = VIR_DOMAIN_RUNNING;
         if (virDomainSaveStatus(driver->caps, driver->stateDir, vm) < 0) {
-            VIR_WARN("Failed to save status on vm %s", vm->def->name);
+            VIR_WARN(_("Failed to save status on vm %s"), vm->def->name);
             goto endjob;
         }
     }
@@ -6529,7 +6529,7 @@ static int qemudDomainStart(virDomainPtr dom) {
         ret = qemudDomainRestore(dom->conn, managed_save);

         if (unlink(managed_save) < 0) {
-            VIR_WARN("Failed to remove the managed state %s", managed_save);
+            VIR_WARN(_("Failed to remove the managed state %s"), managed_save);
         }

         if (ret == 0) {
@@ -6847,7 +6847,7 @@ static int qemudDomainChangeEjectableMedia(struct qemud_driver *driver,
     if (driver->securityDriver &&
         driver->securityDriver->domainRestoreSecurityImageLabel &&
         driver->securityDriver->domainRestoreSecurityImageLabel(vm, origdisk) < 0)
-        VIR_WARN("Unable to restore security label on ejected image %s", origdisk->src);
+        VIR_WARN(_("Unable to restore security label on ejected image %s"), origdisk->src);

     VIR_FREE(origdisk->src);
     origdisk->src = disk->src;
@@ -6865,7 +6865,7 @@ error:
     if (driver->securityDriver &&
         driver->securityDriver->domainRestoreSecurityImageLabel &&
         driver->securityDriver->domainRestoreSecurityImageLabel(vm, disk) < 0)
-        VIR_WARN("Unable to restore security label on new media %s", disk->src);
+        VIR_WARN(_("Unable to restore security label on new media %s"), disk->src);
     return -1;
 }

@@ -6954,12 +6954,12 @@ error:
     if ((qemuCmdFlags & QEMUD_CMD_FLAG_DEVICE) &&
         (disk->info.type == VIR_DOMAIN_DEVICE_ADDRESS_TYPE_PCI) &&
         qemuDomainPCIAddressReleaseAddr(priv->pciaddrs, &disk->info) < 0)
-        VIR_WARN("Unable to release PCI address on %s", disk->src);
+        VIR_WARN(_("Unable to release PCI address on %s"), disk->src);

     if (driver->securityDriver &&
         driver->securityDriver->domainRestoreSecurityImageLabel &&
         driver->securityDriver->domainRestoreSecurityImageLabel(vm, disk) < 0)
-        VIR_WARN("Unable to restore security label on %s", disk->src);
+        VIR_WARN(_("Unable to restore security label on %s"), disk->src);

     return -1;
 }
@@ -7023,7 +7023,7 @@ cleanup:
         (qemuCmdFlags & QEMUD_CMD_FLAG_DEVICE) &&
         (controller->info.type == VIR_DOMAIN_DEVICE_ADDRESS_TYPE_PCI) &&
         qemuDomainPCIAddressReleaseAddr(priv->pciaddrs, &controller->info) < 0)
-        VIR_WARN0("Unable to release PCI address on controller");
+        VIR_WARN0(_("Unable to release PCI address on controller"));

     VIR_FREE(devstr);
     return ret;
@@ -7177,7 +7177,7 @@ error:
     if (driver->securityDriver &&
         driver->securityDriver->domainRestoreSecurityImageLabel &&
         driver->securityDriver->domainRestoreSecurityImageLabel(vm, disk) < 0)
-        VIR_WARN("Unable to restore security label on %s", disk->src);
+        VIR_WARN(_("Unable to restore security label on %s"), disk->src);

     return -1;
 }
@@ -7260,7 +7260,7 @@ error:
     if (driver->securityDriver &&
         driver->securityDriver->domainRestoreSecurityImageLabel &&
         driver->securityDriver->domainRestoreSecurityImageLabel(vm, disk) < 0)
-        VIR_WARN("Unable to restore security label on %s", disk->src);
+        VIR_WARN(_("Unable to restore security label on %s"), disk->src);

     return -1;
 }
@@ -7419,7 +7419,7 @@ cleanup:
         (qemuCmdFlags & QEMUD_CMD_FLAG_DEVICE) &&
         (net->info.type == VIR_DOMAIN_DEVICE_ADDRESS_TYPE_PCI) &&
         qemuDomainPCIAddressReleaseAddr(priv->pciaddrs, &net->info) < 0)
-        VIR_WARN0("Unable to release PCI address on NIC");
+        VIR_WARN0(_("Unable to release PCI address on NIC"));

     if (ret != 0)
         virNWFilterTearNWFilter(net);
@@ -7545,7 +7545,7 @@ error:
     if ((qemuCmdFlags & QEMUD_CMD_FLAG_DEVICE) &&
         (hostdev->info.type == VIR_DOMAIN_DEVICE_ADDRESS_TYPE_PCI) &&
         qemuDomainPCIAddressReleaseAddr(priv->pciaddrs, &hostdev->info) < 0)
-        VIR_WARN0("Unable to release PCI address on host device");
+        VIR_WARN0(_("Unable to release PCI address on host device"));

     VIR_FREE(devstr);
     pciDeviceListDel(driver->activePciHostdevs, pci);
@@ -7658,7 +7658,7 @@ error:
     if (driver->securityDriver &&
         driver->securityDriver->domainRestoreSecurityHostdevLabel &&
         driver->securityDriver->domainRestoreSecurityHostdevLabel(vm, hostdev) < 0)
-        VIR_WARN0("Unable to restore host device labelling on hotplug fail");
+        VIR_WARN0(_("Unable to restore host device labelling on hotplug fail"));

     return -1;
 }
@@ -7757,7 +7757,7 @@ static int qemudDomainAttachDevice(virDomainPtr dom,
         }
         if (ret != 0 && cgroup) {
             if (qemuTeardownDiskCgroup(cgroup, vm, dev->data.disk) < 0)
-                VIR_WARN("Failed to teardown cgroup for disk path %s",
+                VIR_WARN(_("Failed to teardown cgroup for disk path %s"),
                          NULLSTR(dev->data.disk->src));
         }
     } else if (dev->type == VIR_DOMAIN_DEVICE_CONTROLLER) {
@@ -7980,7 +7980,7 @@ static int qemuDomainUpdateDeviceFlags(virDomainPtr dom,

         if (ret != 0 && cgroup) {
             if (qemuTeardownDiskCgroup(cgroup, vm, dev->data.disk) < 0)
-                VIR_WARN("Failed to teardown cgroup for disk path %s",
+                VIR_WARN(_("Failed to teardown cgroup for disk path %s"),
                          NULLSTR(dev->data.disk->src));
         }
         break;
@@ -8103,11 +8103,11 @@ static int qemudDomainDetachPciDiskDevice(struct qemud_driver *driver,
     if (driver->securityDriver &&
         driver->securityDriver->domainRestoreSecurityImageLabel &&
         driver->securityDriver->domainRestoreSecurityImageLabel(vm, dev->data.disk) < 0)
-        VIR_WARN("Unable to restore security label on %s", dev->data.disk->src);
+        VIR_WARN(_("Unable to restore security label on %s"), dev->data.disk->src);

     if (cgroup != NULL) {
         if (qemuTeardownDiskCgroup(cgroup, vm, dev->data.disk) < 0)
-            VIR_WARN("Failed to teardown cgroup for disk path %s",
+            VIR_WARN(_("Failed to teardown cgroup for disk path %s"),
                      NULLSTR(dev->data.disk->src));
     }

@@ -8166,11 +8166,11 @@ static int qemudDomainDetachSCSIDiskDevice(struct qemud_driver *driver,
     if (driver->securityDriver &&
         driver->securityDriver->domainRestoreSecurityImageLabel &&
         driver->securityDriver->domainRestoreSecurityImageLabel(vm, dev->data.disk) < 0)
-        VIR_WARN("Unable to restore security label on %s", dev->data.disk->src);
+        VIR_WARN(_("Unable to restore security label on %s"), dev->data.disk->src);

     if (cgroup != NULL) {
         if (qemuTeardownDiskCgroup(cgroup, vm, dev->data.disk) < 0)
-            VIR_WARN("Failed to teardown cgroup for disk path %s",
+            VIR_WARN(_("Failed to teardown cgroup for disk path %s"),
                      NULLSTR(dev->data.disk->src));
     }

@@ -8247,7 +8247,7 @@ static int qemudDomainDetachPciControllerDevice(struct qemud_driver *driver,
     }

     if (qemuDomainPCIAddressReleaseAddr(priv->pciaddrs, &detach->info) < 0) {
-        VIR_WARN0("Unable to release PCI address on controller");
+        VIR_WARN0(_("Unable to release PCI address on controller"));
     }

     virDomainControllerDefFree(detach);
@@ -8585,7 +8585,7 @@ static int qemudDomainDetachHostDevice(struct qemud_driver *driver,
     if (driver->securityDriver &&
         driver->securityDriver->domainRestoreSecurityHostdevLabel &&
         driver->securityDriver->domainRestoreSecurityHostdevLabel(vm, dev->data.hostdev) < 0)
-        VIR_WARN0("Failed to restore host device labelling");
+        VIR_WARN0(_("Failed to restore host device labelling"));

     return ret;
 }
diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c
index 3c0a823..4404ad8 100644
--- a/src/qemu/qemu_monitor_json.c
+++ b/src/qemu/qemu_monitor_json.c
@@ -83,7 +83,7 @@ qemuMonitorJSONIOProcessEvent(qemuMonitorPtr mon,

     type = virJSONValueObjectGetString(obj, "event");
     if (!type) {
-        VIR_WARN0("missing event type in message");
+        VIR_WARN0(_("missing event type in message"));
         errno = EINVAL;
         return -1;
     }
@@ -536,7 +536,7 @@ static void qemuMonitorJSONHandleRTCChange(qemuMonitorPtr mon, virJSONValuePtr d
 {
     long long offset = 0;
     if (virJSONValueObjectGetNumberLong(data, "offset", &offset) < 0) {
-        VIR_WARN0("missing offset in RTC change event");
+        VIR_WARN0(_("missing offset in RTC change event"));
         offset = 0;
     }
     qemuMonitorEmitRTCChange(mon, offset);
@@ -551,11 +551,11 @@ static void qemuMonitorJSONHandleWatchdog(qemuMonitorPtr mon, virJSONValuePtr da
     const char *action;
     int actionID;
     if (!(action = virJSONValueObjectGetString(data, "action"))) {
-        VIR_WARN0("missing action in watchdog event");
+        VIR_WARN0(_("missing action in watchdog event"));
     }
     if (action) {
         if ((actionID = qemuMonitorWatchdogActionTypeFromString(action)) < 0) {
-            VIR_WARN("unknown action %s in watchdog event", action);
+            VIR_WARN(_("unknown action %s in watchdog event"), action);
             actionID = VIR_DOMAIN_EVENT_WATCHDOG_NONE;
         }
     } else {
@@ -581,21 +581,21 @@ static void qemuMonitorJSONHandleIOError(qemuMonitorPtr mon, virJSONValuePtr dat
        to the application */

     if ((action = virJSONValueObjectGetString(data, "action")) == NULL) {
-        VIR_WARN0("Missing action in disk io error event");
+        VIR_WARN0(_("Missing action in disk io error event"));
         action = "ignore";
     }

     if ((device = virJSONValueObjectGetString(data, "device")) == NULL) {
-        VIR_WARN0("missing device in disk io error event");
+        VIR_WARN0(_("missing device in disk io error event"));
     }

     if ((reason = virJSONValueObjectGetString(data, "reason")) == NULL) {
-        VIR_WARN0("missing reason in disk io error event");
+        VIR_WARN0(_("missing reason in disk io error event"));
         reason = "";
     }

     if ((actionID = qemuMonitorIOErrorActionTypeFromString(action)) < 0) {
-        VIR_WARN("unknown disk io error action '%s'", action);
+        VIR_WARN(_("unknown disk io error action '%s'"), action);
         actionID = VIR_DOMAIN_EVENT_IO_ERROR_NONE;
     }

@@ -617,11 +617,11 @@ static void qemuMonitorJSONHandleVNC(qemuMonitorPtr mon, virJSONValuePtr data, i
     virJSONValuePtr server;

     if (!(client = virJSONValueObjectGet(data, "client"))) {
-        VIR_WARN0("missing client info in VNC event");
+        VIR_WARN0(_("missing client info in VNC event"));
         return;
     }
     if (!(server = virJSONValueObjectGet(data, "server"))) {
-        VIR_WARN0("missing server info in VNC event");
+        VIR_WARN0(_("missing server info in VNC event"));
         return;
     }

@@ -639,11 +639,11 @@ static void qemuMonitorJSONHandleVNC(qemuMonitorPtr mon, virJSONValuePtr data, i
     x509dname = virJSONValueObjectGetString(client, "x509_dname");

     if ((localFamilyID = qemuMonitorGraphicsAddressFamilyTypeFromString(localFamily)) < 0) {
-        VIR_WARN("unknown address family '%s'", localFamily);
+        VIR_WARN(_("unknown address family '%s'"), localFamily);
         localFamilyID = VIR_DOMAIN_EVENT_GRAPHICS_ADDRESS_IPV4;
     }
     if ((remoteFamilyID = qemuMonitorGraphicsAddressFamilyTypeFromString(remoteFamily)) < 0) {
-        VIR_WARN("unknown address family '%s'", remoteFamily);
+        VIR_WARN(_("unknown address family '%s'"), remoteFamily);
         remoteFamilyID = VIR_DOMAIN_EVENT_GRAPHICS_ADDRESS_IPV4;
     }

diff --git a/src/remote/remote_driver.c b/src/remote/remote_driver.c
index 990bfce..387a8fd 100644
--- a/src/remote/remote_driver.c
+++ b/src/remote/remote_driver.c
@@ -8009,7 +8009,7 @@ remoteStreamHasError(virStreamPtr st) {
         return 0;
     }

-    VIR_WARN0("Raising async error");
+    VIR_WARN0(_("Raising async error"));
     virRaiseErrorFull(st->conn,
                       __FILE__, __FUNCTION__, __LINE__,
                       privst->err.domain,
@@ -9406,7 +9406,7 @@ processCallDispatchStream(virConnectPtr conn ATTRIBUTE_UNUSED,
         privst = privst->next;

     if (!privst) {
-        VIR_WARN("No registered stream matching serial=%d, proc=%d",
+        VIR_WARN(_("No registered stream matching serial=%d, proc=%d"),
                  hdr->serial, hdr->proc);
         return -1;
     }
@@ -9426,7 +9426,7 @@ processCallDispatchStream(virConnectPtr conn ATTRIBUTE_UNUSED,
     case REMOTE_CONTINUE: {
         int avail = privst->incomingLength - privst->incomingOffset;
         int need = priv->bufferLength - priv->bufferOffset;
-        VIR_WARN0("Got a stream data packet");
+        VIR_WARN0(_("Got a stream data packet"));

         /* XXX flag stream as complete somwhere if need==0 */

@@ -9434,7 +9434,7 @@ processCallDispatchStream(virConnectPtr conn ATTRIBUTE_UNUSED,
             int extra = need - avail;
             if (VIR_REALLOC_N(privst->incoming,
                               privst->incomingLength + extra) < 0) {
-                VIR_WARN0("Out of memory");
+                VIR_WARN0(_("Out of memory"));
                 return -1;
             }
             privst->incomingLength += extra;
@@ -9446,18 +9446,18 @@ processCallDispatchStream(virConnectPtr conn ATTRIBUTE_UNUSED,
         privst->incomingOffset += (priv->bufferLength - priv->bufferOffset);

         if (thecall && thecall->want_reply) {
-            VIR_WARN("Got sync data packet offset=%d", privst->incomingOffset);
+            VIR_WARN(_("Got sync data packet offset=%d"), privst->incomingOffset);
             thecall->mode = REMOTE_MODE_COMPLETE;
         } else {
-            VIR_WARN("Got aysnc data packet offset=%d", privst->incomingOffset);
+            VIR_WARN(_("Got aysnc data packet offset=%d"), privst->incomingOffset);
         }
         return 0;
     }

     case REMOTE_OK:
-        VIR_WARN0("Got a synchronous confirm");
+        VIR_WARN0(_("Got a synchronous confirm"));
         if (!thecall) {
-            VIR_WARN0("Got unexpected stream finish confirmation");
+            VIR_WARN0(_("Got unexpected stream finish confirmation"));
             return -1;
         }
         thecall->mode = REMOTE_MODE_COMPLETE;
@@ -9465,7 +9465,7 @@ processCallDispatchStream(virConnectPtr conn ATTRIBUTE_UNUSED,

     case REMOTE_ERROR:
         if (thecall && thecall->want_reply) {
-            VIR_WARN0("Got a synchronous error");
+            VIR_WARN0(_("Got a synchronous error"));
             /* Give the error straight to this call */
             memset (&thecall->err, 0, sizeof thecall->err);
             if (!xdr_remote_error (xdr, &thecall->err)) {
@@ -9474,23 +9474,23 @@ processCallDispatchStream(virConnectPtr conn ATTRIBUTE_UNUSED,
             }
             thecall->mode = REMOTE_MODE_ERROR;
         } else {
-            VIR_WARN0("Got a asynchronous error");
+            VIR_WARN0(_("Got a asynchronous error"));
             /* No call, so queue the error against the stream */
             if (privst->has_error) {
-                VIR_WARN0("Got unexpected duplicate stream error");
+                VIR_WARN0(_("Got unexpected duplicate stream error"));
                 return -1;
             }
             privst->has_error = 1;
             memset (&privst->err, 0, sizeof privst->err);
             if (!xdr_remote_error (xdr, &privst->err)) {
-                VIR_WARN0("Failed to unmarshall error");
+                VIR_WARN0(_("Failed to unmarshall error"));
                 return -1;
             }
         }
         return 0;

     default:
-        VIR_WARN("Stream with unexpected serial=%d, proc=%d, status=%d",
+        VIR_WARN(_("Stream with unexpected serial=%d, proc=%d, status=%d"),
                  hdr->serial, hdr->proc, hdr->status);
         return -1;
     }
diff --git a/src/security/security_selinux.c b/src/security/security_selinux.c
index 669ef42..e61d235 100644
--- a/src/security/security_selinux.c
+++ b/src/security/security_selinux.c
@@ -768,7 +768,7 @@ SELinuxSetSecurityAllLabel(virDomainObjPtr vm)
     for (i = 0 ; i < vm->def->ndisks ; i++) {
         /* XXX fixme - we need to recursively label the entire tree :-( */
         if (vm->def->disks[i]->type == VIR_DOMAIN_DISK_TYPE_DIR) {
-            VIR_WARN("Unable to relabel directory tree %s for disk %s",
+            VIR_WARN(_("Unable to relabel directory tree %s for disk %s"),
                      vm->def->disks[i]->src, vm->def->disks[i]->dst);
             continue;
         }
diff --git a/src/storage/storage_backend_logical.c b/src/storage/storage_backend_logical.c
index 06238d1..7263487 100644
--- a/src/storage/storage_backend_logical.c
+++ b/src/storage/storage_backend_logical.c
@@ -331,7 +331,7 @@ virStorageBackendLogicalFindPoolSources(virConnectPtr conn ATTRIBUTE_UNUSED,
      * worst that happens is that scanning doesn't pick everything up
      */
     if (virRun(scanprog, &exitstatus) < 0) {
-        VIR_WARN0("Failure when running vgscan to refresh physical volumes");
+        VIR_WARN0(_("Failure when running vgscan to refresh physical volumes"));
     }

     memset(&sourceList, 0, sizeof(sourceList));
diff --git a/src/uml/uml_conf.c b/src/uml/uml_conf.c
index a10bca0..ba55b50 100644
--- a/src/uml/uml_conf.c
+++ b/src/uml/uml_conf.c
@@ -70,7 +70,7 @@ virCapsPtr umlCapsInit(void) {
      */
     if (nodeCapsInitNUMA(caps) < 0) {
         virCapabilitiesFreeNUMAInfo(caps);
-        VIR_WARN0("Failed to query host NUMA topology, disabling NUMA capabilities");
+        VIR_WARN0(_("Failed to query host NUMA topology, disabling NUMA capabilities"));
     }

     if ((guest = virCapabilitiesAddGuest(caps,
diff --git a/src/uml/uml_driver.c b/src/uml/uml_driver.c
index ffb87c8..15dd505 100644
--- a/src/uml/uml_driver.c
+++ b/src/uml/uml_driver.c
@@ -318,10 +318,10 @@ reread:
             dom->state = VIR_DOMAIN_RUNNING;

             if (umlOpenMonitor(driver, dom) < 0) {
-                VIR_WARN0("Could not open monitor for new domain");
+                VIR_WARN0(_("Could not open monitor for new domain"));
                 umlShutdownVMDaemon(NULL, driver, dom);
             } else if (umlIdentifyChrPTY(driver, dom) < 0) {
-                VIR_WARN0("Could not identify charater devices for new domain");
+                VIR_WARN0(_("Could not identify charater devices for new domain"));
                 umlShutdownVMDaemon(NULL, driver, dom);
             }
         }
diff --git a/src/util/hooks.c b/src/util/hooks.c
index dec9223..a163f2c 100644
--- a/src/util/hooks.c
+++ b/src/util/hooks.c
@@ -113,7 +113,7 @@ virHookCheck(int no, const char *driver) {
     } else {
         if ((access(path, X_OK) != 0) || (!S_ISREG(sb.st_mode))) {
             ret = 0;
-            VIR_WARN("Non executable hook script %s", path);
+            VIR_WARN(_("Non executable hook script %s"), path);
         } else {
             ret = 1;
             VIR_DEBUG("Found hook script %s", path);
diff --git a/src/util/json.c b/src/util/json.c
index f90594c..67b1421 100644
--- a/src/util/json.c
+++ b/src/util/json.c
@@ -922,7 +922,7 @@ cleanup:

     if (parser.nstate) {
         int i;
-        VIR_WARN("cleanup state %d", parser.nstate);
+        VIR_WARN(_("cleanup state %d"), parser.nstate);
         for (i = 0 ; i < parser.nstate ; i++) {
             VIR_FREE(parser.state[i].key);
         }
diff --git a/src/util/pci.c b/src/util/pci.c
index a1bd8e3..404a4d0 100644
--- a/src/util/pci.c
+++ b/src/util/pci.c
@@ -277,7 +277,7 @@ pciIterDevices(pciIterPredicate predicate,

     dir = opendir(PCI_SYSFS "devices");
     if (!dir) {
-        VIR_WARN0("Failed to open " PCI_SYSFS "devices");
+        VIR_WARN0(_("Failed to open " PCI_SYSFS "devices"));
         return -1;
     }

@@ -299,7 +299,7 @@ pciIterDevices(pciIterPredicate predicate,
             virStrToLong_ui(tmp + 1, &tmp, 16, &slot) < 0 || *tmp != '.' ||
             /* function */
             virStrToLong_ui(tmp + 1, NULL, 16, &function) < 0) {
-            VIR_WARN("Unusual entry in " PCI_SYSFS "devices: %s", entry->d_name);
+            VIR_WARN(_("Unusual entry in " PCI_SYSFS "devices: %s"), entry->d_name);
             continue;
         }

diff --git a/src/util/util.c b/src/util/util.c
index e937d39..f623234 100644
--- a/src/util/util.c
+++ b/src/util/util.c
@@ -292,7 +292,7 @@ static int virClearCapabilities(void)
 #  else
 static int virClearCapabilities(void)
 {
-//    VIR_WARN0("libcap-ng support not compiled in, unable to clear capabilities");
+//    VIR_WARN0(_("libcap-ng support not compiled in, unable to clear capabilities"));
     return 0;
 }
 #  endif
diff --git a/src/xen/proxy_internal.c b/src/xen/proxy_internal.c
index 1efdb83..96091dc 100644
--- a/src/xen/proxy_internal.c
+++ b/src/xen/proxy_internal.c
@@ -147,7 +147,7 @@ virProxyForkServer(void)
     const char *proxyarg[2];

     if (!proxyPath) {
-        VIR_WARN0("failed to find libvirt_proxy");
+        VIR_WARN0(_("failed to find libvirt_proxy"));
         return(-1);
     }

@@ -271,7 +271,7 @@ retry:
             VIR_DEBUG("read socket %d interrupted", fd);
             goto retry;
         }
-        VIR_WARN("Failed to read socket %d", fd);
+        VIR_WARN(_("Failed to read socket %d"), fd);
         return(-1);
     }

diff --git a/src/xenapi/xenapi_utils.c b/src/xenapi/xenapi_utils.c
index 4eb17fa..1cd24c7 100644
--- a/src/xenapi/xenapi_utils.c
+++ b/src/xenapi/xenapi_utils.c
@@ -312,7 +312,7 @@ getCpuBitMapfromString(char *mask, unsigned char *cpumap, int maplen)
         if (virStrToLong_i(num, NULL, 10, &pos) < 0)
             return;
         if (pos < 0 || pos > max_bits - 1)
-            VIR_WARN ("number in str %d exceeds cpumap's max bits %d", pos, max_bits);
+            VIR_WARN (_("number in str %d exceeds cpumap's max bits %d"), pos, max_bits);
         else
             (cpumap)[pos / 8] |= (1 << (pos % 8));
         num = strtok_r(NULL, ",", &bp);
--
1.7.1.250.g7d1e8


>From 1e2f998851c82487bf915da76de1a652ab6823e6 Mon Sep 17 00:00:00 2001
From: Jim Meyering <meyering redhat com>
Date: Tue, 18 May 2010 16:37:23 +0200
Subject: [PATCH 2/3] maint: mark more translatable strings, now manually

* po/POTFILES.in: Add three file names.
Mark translatable strings in the following, manually fixing
bogus uses of VIR_WARN and VIR_WARN0:
* src/esx/esx_vi.c (esxVI_GetVirtualMachineIdentity): Likewise.
* src/esx/esx_vmx.c (esxVMX_AbsolutePathToDatastoreRelatedPath):
(esxVMX_ParseVNC, esxVMX_ParseDisk, esxVMX_FormatVNC): Likewise.
* src/phyp/phyp_driver.c (phypDomainGetInfo): Likewise.
(phypDomainCreateAndStart, phypUUIDTable_ReadFile) Likewise.
(phypUUIDTable_Init, phypUUIDTable_Pull): Likewise.
* src/util/pci.c (pciIterDevices): Likewise.
---
 po/POTFILES.in         |    7 +++++--
 src/esx/esx_vi.c       |    4 ++--
 src/esx/esx_vmx.c      |   16 ++++++++--------
 src/phyp/phyp_driver.c |   24 ++++++++++--------------
 src/util/pci.c         |    5 +++--
 5 files changed, 28 insertions(+), 28 deletions(-)

diff --git a/po/POTFILES.in b/po/POTFILES.in
index 88218bd..3346654 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -1,4 +1,5 @@
 daemon/dispatch.c
+daemon/event.c
 daemon/libvirtd.c
 daemon/remote.c
 daemon/stream.c
@@ -18,6 +19,7 @@ src/cpu/cpu_generic.c
 src/cpu/cpu_map.c
 src/cpu/cpu_x86.c
 src/datatypes.c
+src/driver.c
 src/esx/esx_driver.c
 src/esx/esx_util.c
 src/esx/esx_vi.c
@@ -27,6 +29,7 @@ src/esx/esx_vmx.c
 src/interface/netcf_driver.c
 src/internal.h
 src/libvirt.c
+src/lxc/lxc_conf.c
 src/lxc/lxc_container.c
 src/lxc/lxc_controller.c
 src/lxc/lxc_driver.c
@@ -53,8 +56,8 @@ src/qemu/qemu_monitor_text.c
 src/qemu/qemu_security_dac.c
 src/remote/remote_driver.c
 src/secret/secret_driver.c
-src/security/security_driver.c
 src/security/security_apparmor.c
+src/security/security_driver.c
 src/security/security_selinux.c
 src/security/virt-aa-helper.c
 src/storage/storage_backend.c
@@ -89,10 +92,10 @@ src/util/xml.c
 src/vbox/vbox_driver.c
 src/vbox/vbox_tmpl.c
 src/xen/proxy_internal.c
-src/xen/xend_internal.c
 src/xen/xen_driver.c
 src/xen/xen_hypervisor.c
 src/xen/xen_inotify.c
+src/xen/xend_internal.c
 src/xen/xm_internal.c
 src/xen/xs_internal.c
 src/xenapi/xenapi_driver.c
diff --git a/src/esx/esx_vi.c b/src/esx/esx_vi.c
index 2f41c58..d005a47 100644
--- a/src/esx/esx_vi.c
+++ b/src/esx/esx_vi.c
@@ -1679,8 +1679,8 @@ esxVI_GetVirtualMachineIdentity(esxVI_ObjectContent *virtualMachine,
         } else {
             memset(uuid, 0, VIR_UUID_BUFLEN);

-            VIR_WARN0("Cannot access UUID, because 'configStatus' property "
-                      "indicates a config problem");
+            VIR_WARN0(_("Cannot access UUID, because 'configStatus' property "
+                        "indicates a config problem"));
         }
     }

diff --git a/src/esx/esx_vmx.c b/src/esx/esx_vmx.c
index f1c612d..fa5fec9 100644
--- a/src/esx/esx_vmx.c
+++ b/src/esx/esx_vmx.c
@@ -643,8 +643,8 @@ esxVMX_AbsolutePathToDatastoreRelatedPath(esxVI_Context *ctx,
         }

         if (datastoreName == NULL) {
-            VIR_WARN("Could not retrieve datastore name for absolute "
-                     "path '%s', falling back to preliminary name '%s'",
+            VIR_WARN(_("Could not retrieve datastore name for absolute "
+                      "path '%s', falling back to preliminary name '%s'"),
                      absolutePath, preliminaryDatastoreName);

             datastoreName = preliminaryDatastoreName;
@@ -1214,8 +1214,8 @@ esxVMX_ParseVNC(virConfPtr conf, virDomainGraphicsDefPtr *def)
     }

     if (port < 0) {
-        VIR_WARN0("VNC is enabled but VMX entry 'RemoteDisplay.vnc.port' "
-                  "is missing, the VNC port is unknown");
+        VIR_WARN0(_("VNC is enabled but VMX entry 'RemoteDisplay.vnc.port' "
+                    "is missing, the VNC port is unknown"));

         (*def)->data.vnc.port = 0;
         (*def)->data.vnc.autoport = 1;
@@ -1558,8 +1558,8 @@ esxVMX_ParseDisk(esxVI_Context *ctx, virConfPtr conf, int device, int bus,
                  *        the default based on the guestOS. The mechanism to
                  *        obtain the default is currently missing
                  */
-                VIR_WARN0("No explicit SCSI driver specified in VMX config, "
-                          "cannot represent explicit specified cachemode");
+                VIR_WARN0(_("No explicit SCSI driver specified in VMX config, "
+                           "cannot represent explicit specified cachemode"));
             }

             (*def)->type = VIR_DOMAIN_DISK_TYPE_FILE;
@@ -2473,8 +2473,8 @@ esxVMX_FormatVNC(virDomainGraphicsDefPtr def, virBufferPtr buffer)
     virBufferVSprintf(buffer, "RemoteDisplay.vnc.enabled = \"true\"\n");

     if (def->data.vnc.autoport) {
-        VIR_WARN0("VNC autoport is enabled, but the automatically assigned "
-                  "VNC port cannot be read back");
+        VIR_WARN0(_("VNC autoport is enabled, but the automatically assigned "
+                   "VNC port cannot be read back"));
     } else {
         if (def->data.vnc.port < 5900 || def->data.vnc.port > 5964) {
             VIR_WARN(_("VNC port %d it out of [5900..5964] range"),
diff --git a/src/phyp/phyp_driver.c b/src/phyp/phyp_driver.c
index 0e32a18..c2fb839 100644
--- a/src/phyp/phyp_driver.c
+++ b/src/phyp/phyp_driver.c
@@ -1344,15 +1344,15 @@ phypDomainGetInfo(virDomainPtr dom, virDomainInfoPtr info)

     if ((info->maxMem =
          phypGetLparMem(dom->conn, managed_system, dom->id, 0)) == 0)
-        VIR_WARN(_("%s"), "Unable to determine domain's max memory.");
+        VIR_WARN0(_("Unable to determine domain's max memory."));

     if ((info->memory =
          phypGetLparMem(dom->conn, managed_system, dom->id, 1)) == 0)
-        VIR_WARN(_("%s"), "Unable to determine domain's memory.");
+        VIR_WARN0(_("Unable to determine domain's memory."));

     if ((info->nrVirtCpu =
          phypGetLparCPU(dom->conn, managed_system, dom->id)) == 0)
-        VIR_WARN(_("%s"), "Unable to determine domain's CPU.");
+        VIR_WARN0(_("Unable to determine domain's CPU."));

     return 0;
 }
@@ -1416,14 +1416,14 @@ phypDomainCreateAndStart(virConnectPtr conn,

     /* checking if this name already exists on this system */
     if (phypGetLparID(session, managed_system, def->name, conn) == -1) {
-        VIR_WARN(_("%s"), "LPAR name already exists.");
+        VIR_WARN0(_("LPAR name already exists."));
         goto err;
     }

     /* checking if ID or UUID already exists on this system */
     for (i = 0; i < uuid_table->nlpars; i++) {
         if (lpars[i]->id == def->id || lpars[i]->uuid == def->uuid) {
-            VIR_WARN(_("%s"), "LPAR ID or UUID already exists.");
+            VIR_WARN0(_("LPAR ID or UUID already exists."));
             goto err;
         }
     }
@@ -1782,7 +1782,7 @@ phypUUIDTable_ReadFile(virConnectPtr conn)
     int id;

     if ((fd = open(local_file, O_RDONLY)) == -1) {
-        VIR_WARN(_("%s"), "Unable to write information to local file.");
+        VIR_WARN0(_("Unable to write information to local file."));
         goto err;
     }

@@ -1798,15 +1798,13 @@ phypUUIDTable_ReadFile(virConnectPtr conn)
                 }
                 uuid_table->lpars[i]->id = id;
             } else {
-                VIR_WARN(_("%s"),
-                         "Unable to read from information to local file.");
+                VIR_WARN0(_("Unable to read from information to local file."));
                 goto err;
             }

             rc = read(fd, uuid_table->lpars[i]->uuid, VIR_UUID_BUFLEN);
             if (rc != VIR_UUID_BUFLEN) {
-                VIR_WARN(_("%s"),
-                         "Unable to read information to local file.");
+                VIR_WARN0(_("Unable to read information to local file."));
                 goto err;
             }
         }
@@ -1909,8 +1907,7 @@ phypUUIDTable_Init(virConnectPtr conn)
                 uuid_table->lpars[i]->id = ids[i];

                 if (virUUIDGenerate(uuid_table->lpars[i]->uuid) < 0)
-                    VIR_WARN(_("%s %d", "Unable to generate UUID for domain"),
-                             ids[i]);
+                    VIR_WARN(_("Unable to generate UUID for domain %d"), ids[i]);
             }
         } else {
             virReportOOMError();
@@ -2083,8 +2080,7 @@ phypUUIDTable_Pull(virConnectPtr conn)
             rc = libssh2_channel_read(channel, buffer, amount);
             if (rc > 0) {
                 if (safewrite(fd, buffer, rc) != rc)
-                    VIR_WARN(_("%s"),
-                             "Unable to write information to local file.");
+                    VIR_WARN0(_("Unable to write information to local file."));

                 got += rc;
                 total += rc;
diff --git a/src/util/pci.c b/src/util/pci.c
index 404a4d0..ab0c4ac 100644
--- a/src/util/pci.c
+++ b/src/util/pci.c
@@ -277,7 +277,7 @@ pciIterDevices(pciIterPredicate predicate,

     dir = opendir(PCI_SYSFS "devices");
     if (!dir) {
-        VIR_WARN0(_("Failed to open " PCI_SYSFS "devices"));
+        VIR_WARN(_("Failed to open %s devices"), PCI_SYSFS);
         return -1;
     }

@@ -299,7 +299,8 @@ pciIterDevices(pciIterPredicate predicate,
             virStrToLong_ui(tmp + 1, &tmp, 16, &slot) < 0 || *tmp != '.' ||
             /* function */
             virStrToLong_ui(tmp + 1, NULL, 16, &function) < 0) {
-            VIR_WARN(_("Unusual entry in " PCI_SYSFS "devices: %s"), entry->d_name);
+            VIR_WARN(_("Unusual entry in %s devices: %s"),
+                     PCI_SYSFS, entry->d_name);
             continue;
         }

--
1.7.1.250.g7d1e8


>From 525e752c3bd078263713aa33355c840777c6485b Mon Sep 17 00:00:00 2001
From: Jim Meyering <meyering redhat com>
Date: Tue, 18 May 2010 16:10:50 +0200
Subject: [PATCH 3/3] maint: add VIR_WARN{,0} to the list of diag-printing functions

* cfg.mk (msg_gen_function): Add VIR_WARN and VIR_WARN0, so
that "make syntax-check" ensures their diagnostics are marked
for translation.
---
 cfg.mk |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/cfg.mk b/cfg.mk
index 96d6953..49300a0 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -358,6 +358,8 @@ msg_gen_function += virXendError
 msg_gen_function += xenapiSessionErrorHandler
 msg_gen_function += xenUnifiedError
 msg_gen_function += xenXMError
+msg_gen_function += VIR_WARN
+msg_gen_function += VIR_WARN0

 # Uncomment the following and run "make syntax-check" to see diagnostics
 # that are not yet marked for translation, but that need to be rewritten
--
1.7.1.250.g7d1e8


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]