[libvirt PATCH 12/51] esx: Update format strings in translated messages

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

 



Signed-off-by: Jiri Denemark <jdenemar@xxxxxxxxxx>
---
 src/esx/esx_driver.c                | 106 ++++++++--------
 src/esx/esx_network_driver.c        |  21 ++--
 src/esx/esx_storage_backend_iscsi.c |   6 +-
 src/esx/esx_storage_backend_vmfs.c  |  32 ++---
 src/esx/esx_storage_driver.c        |   8 +-
 src/esx/esx_stream.c                |   4 +-
 src/esx/esx_util.c                  |  29 ++---
 src/esx/esx_vi.c                    | 189 ++++++++++++++--------------
 src/esx/esx_vi_types.c              |  48 ++++---
 9 files changed, 211 insertions(+), 232 deletions(-)

diff --git a/src/esx/esx_driver.c b/src/esx/esx_driver.c
index 9dc5489411..c86e1e7470 100644
--- a/src/esx/esx_driver.c
+++ b/src/esx/esx_driver.c
@@ -208,8 +208,8 @@ esxParseVMXFileName(const char *fileName,
             !(datastoreName = strtok_r(tmp, "/", &saveptr))    ||
             !(directoryAndFileName = strtok_r(NULL, "", &saveptr))) {
             virReportError(VIR_ERR_INTERNAL_ERROR,
-                           _("File name '%s' doesn't have expected format "
-                             "'/vmfs/volumes/<datastore>/<path>'"), fileName);
+                           _("File name '%1$s' doesn't have expected format '/vmfs/volumes/<datastore>/<path>'"),
+                           fileName);
             goto cleanup;
         }
 
@@ -226,7 +226,7 @@ esxParseVMXFileName(const char *fileName,
                 ret = 0;
             } else {
                 virReportError(VIR_ERR_INTERNAL_ERROR,
-                               _("File name '%s' refers to non-existing datastore '%s'"),
+                               _("File name '%1$s' refers to non-existing datastore '%2$s'"),
                                fileName, datastoreName);
             }
             goto cleanup;
@@ -243,7 +243,7 @@ esxParseVMXFileName(const char *fileName,
 
     if (!*out) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("Could not handle file name '%s'"), fileName);
+                       _("Could not handle file name '%1$s'"), fileName);
         goto cleanup;
     }
 
@@ -334,7 +334,7 @@ esxFormatVMXFileName(const char *fileName, void *opaque)
         tmpResult = g_strdup(fileName);
     } else {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("Could not handle file name '%s'"), fileName);
+                       _("Could not handle file name '%1$s'"), fileName);
         goto cleanup;
     }
 
@@ -381,7 +381,7 @@ esxAutodetectSCSIControllerModel(virDomainDiskDef *def, int *model,
 
     if (!vmDiskFileInfo || !vmDiskFileInfo->controllerType) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("Could not lookup controller model for '%s'"), src);
+                       _("Could not lookup controller model for '%1$s'"), src);
         goto cleanup;
     }
 
@@ -399,7 +399,7 @@ esxAutodetectSCSIControllerModel(virDomainDiskDef *def, int *model,
         *model = VIR_DOMAIN_CONTROLLER_MODEL_SCSI_VMPVSCSI;
     } else {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("Found unexpected controller model '%s' for disk '%s'"),
+                       _("Found unexpected controller model '%1$s' for disk '%2$s'"),
                        vmDiskFileInfo->controllerType, src);
         goto cleanup;
     }
@@ -462,10 +462,8 @@ esxSupportsLongMode(esxPrivate *priv)
                         priv->supportsLongMode = esxVI_Boolean_False;
                     } else {
                         virReportError(VIR_ERR_INTERNAL_ERROR,
-                                       _("Bit 29 (Long Mode) of HostSystem property "
-                                         "'hardware.cpuFeature[].edx' with value '%s' "
-                                         "has unexpected value '%c', expecting '0' "
-                                         "or '1'"), hostCpuIdInfo->edx, edxLongModeBit);
+                                       _("Bit 29 (Long Mode) of HostSystem property 'hardware.cpuFeature[].edx' with value '%1$s' has unexpected value '%2$c', expecting '0' or '1'"),
+                                       hostCpuIdInfo->edx, edxLongModeBit);
                         goto cleanup;
                     }
 
@@ -637,7 +635,7 @@ esxConnectToHost(esxPrivate *priv,
 
     if (priv->host->productLine != expectedProductLine) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("Expecting '%s' to be a %s host but found a %s host"),
+                       _("Expecting '%1$s' to be a %2$s host but found a %3$s host"),
                        conn->uri->server,
                        esxVI_ProductLineToDisplayName(expectedProductLine),
                        esxVI_ProductLineToDisplayName(priv->host->productLine));
@@ -720,7 +718,7 @@ esxConnectToVCenter(esxPrivate *priv,
 
     if (priv->vCenter->productLine != esxVI_ProductLine_VPX) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("Expecting '%s' to be a %s host but found a %s host"),
+                       _("Expecting '%1$s' to be a %2$s host but found a %3$s host"),
                        hostname,
                        esxVI_ProductLineToDisplayName(esxVI_ProductLine_VPX),
                        esxVI_ProductLineToDisplayName(priv->vCenter->productLine));
@@ -867,9 +865,7 @@ esxConnectOpen(virConnectPtr conn, virConnectAuthPtr auth,
                 if (potentialVCenterIPAddress &&
                     STRNEQ(vCenterIPAddress, potentialVCenterIPAddress)) {
                     virReportError(VIR_ERR_INTERNAL_ERROR,
-                                   _("This host is managed by a vCenter with IP "
-                                     "address %s, but a mismatching vCenter '%s' "
-                                     "(%s) has been specified"),
+                                   _("This host is managed by a vCenter with IP address %1$s, but a mismatching vCenter '%2$s' (%3$s) has been specified"),
                                    potentialVCenterIPAddress, priv->parsedUri->vCenter,
                                    vCenterIPAddress);
                     goto cleanup;
@@ -1031,7 +1027,7 @@ esxConnectSupportsFeature(virConnectPtr conn, int feature)
     case VIR_DRV_FEATURE_NETWORK_UPDATE_HAS_CORRECT_ORDER:
     case VIR_DRV_FEATURE_FD_PASSING:
         virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
-                       _("Global feature %d should have already been handled"),
+                       _("Global feature %1$d should have already been handled"),
                        feature);
         return -1;
 
@@ -1258,7 +1254,7 @@ esxNodeGetInfo(virConnectPtr conn, virNodeInfoPtr nodeinfo)
             dynamicProperty->val->string[sizeof(nodeinfo->model) - 1] = '\0';
             if (virStrcpyStatic(nodeinfo->model, dynamicProperty->val->string) < 0) {
                 virReportError(VIR_ERR_INTERNAL_ERROR,
-                               _("CPU Model %s too long for destination"),
+                               _("CPU Model %1$s too long for destination"),
                                dynamicProperty->val->string);
                 goto cleanup;
             }
@@ -1338,7 +1334,7 @@ esxConnectListDomains(virConnectPtr conn, int *ids, int maxids)
                                                 &ids[count]) < 0 ||
             ids[count] <= 0) {
             virReportError(VIR_ERR_INTERNAL_ERROR,
-                           _("Failed to parse positive integer from '%s'"),
+                           _("Failed to parse positive integer from '%1$s'"),
                            virtualMachine->obj->value);
             goto cleanup;
         }
@@ -1430,7 +1426,7 @@ esxDomainLookupByID(virConnectPtr conn, int id)
     }
 
     if (!domain)
-        virReportError(VIR_ERR_NO_DOMAIN, _("No domain with ID %d"), id);
+        virReportError(VIR_ERR_NO_DOMAIN, _("No domain with ID %1$d"), id);
 
  cleanup:
     esxVI_String_Free(&propertyNameList);
@@ -1562,7 +1558,7 @@ esxDomainSuspend(virDomainPtr domain)
     }
 
     if (taskInfoState != esxVI_TaskInfoState_Success) {
-        virReportError(VIR_ERR_INTERNAL_ERROR, _("Could not suspend domain: %s"),
+        virReportError(VIR_ERR_INTERNAL_ERROR, _("Could not suspend domain: %1$s"),
                        taskInfoErrorMessage);
         goto cleanup;
     }
@@ -1617,7 +1613,7 @@ esxDomainResume(virDomainPtr domain)
     }
 
     if (taskInfoState != esxVI_TaskInfoState_Success) {
-        virReportError(VIR_ERR_INTERNAL_ERROR, _("Could not resume domain: %s"),
+        virReportError(VIR_ERR_INTERNAL_ERROR, _("Could not resume domain: %1$s"),
                        taskInfoErrorMessage);
         goto cleanup;
     }
@@ -1774,7 +1770,7 @@ esxDomainDestroyFlags(virDomainPtr domain,
     }
 
     if (taskInfoState != esxVI_TaskInfoState_Success) {
-        virReportError(VIR_ERR_INTERNAL_ERROR, _("Could not destroy domain: %s"),
+        virReportError(VIR_ERR_INTERNAL_ERROR, _("Could not destroy domain: %1$s"),
                        taskInfoErrorMessage);
         goto cleanup;
     }
@@ -1835,7 +1831,7 @@ esxDomainGetMaxMemory(virDomainPtr domain)
 
             if (dynamicProperty->val->int32 < 0) {
                 virReportError(VIR_ERR_INTERNAL_ERROR,
-                               _("Got invalid memory size %d"),
+                               _("Got invalid memory size %1$d"),
                                dynamicProperty->val->int32);
             } else {
                 memoryMB = dynamicProperty->val->int32;
@@ -1907,7 +1903,7 @@ esxDomainSetMaxMemory(virDomainPtr domain, unsigned long memory)
 
     if (taskInfoState != esxVI_TaskInfoState_Success) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("Could not set max-memory to %lu kilobytes: %s"), memory,
+                       _("Could not set max-memory to %1$lu kilobytes: %2$s"), memory,
                        taskInfoErrorMessage);
         goto cleanup;
     }
@@ -1965,7 +1961,7 @@ esxDomainSetMemoryFlags(virDomainPtr domain,
 
     if (taskInfoState != esxVI_TaskInfoState_Success) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("Could not set memory to %lu kilobytes: %s"), memory,
+                       _("Could not set memory to %1$lu kilobytes: %2$s"), memory,
                        taskInfoErrorMessage);
         goto cleanup;
     }
@@ -2200,7 +2196,7 @@ esxDomainGetInfo(virDomainPtr domain, virDomainInfoPtr info)
 
                 if (!perfEntityMetric) {
                     virReportError(VIR_ERR_INTERNAL_ERROR,
-                                   _("QueryPerf returned object with unexpected type '%s'"),
+                                   _("QueryPerf returned object with unexpected type '%1$s'"),
                                    esxVI_Type_ToString(perfEntityMetricBase->_type));
                     goto cleanup;
                 }
@@ -2210,7 +2206,7 @@ esxDomainGetInfo(virDomainPtr domain, virDomainInfoPtr info)
 
                 if (!perfMetricIntSeries) {
                     virReportError(VIR_ERR_INTERNAL_ERROR,
-                                   _("QueryPerf returned object with unexpected type '%s'"),
+                                   _("QueryPerf returned object with unexpected type '%1$s'"),
                                    esxVI_Type_ToString(perfEntityMetric->value->_type));
                     goto cleanup;
                 }
@@ -2413,8 +2409,7 @@ esxDomainSetVcpusFlags(virDomainPtr domain, unsigned int nvcpus,
 
     if (nvcpus > maxVcpus) {
         virReportError(VIR_ERR_INVALID_ARG,
-                       _("Requested number of virtual CPUs is greater than max "
-                         "allowable number of virtual CPUs for the domain: %d > %d"),
+                       _("Requested number of virtual CPUs is greater than max allowable number of virtual CPUs for the domain: %1$d > %2$d"),
                        nvcpus, maxVcpus);
         return -1;
     }
@@ -2440,7 +2435,7 @@ esxDomainSetVcpusFlags(virDomainPtr domain, unsigned int nvcpus,
 
     if (taskInfoState != esxVI_TaskInfoState_Success) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("Could not set number of virtual CPUs to %d: %s"), nvcpus,
+                       _("Could not set number of virtual CPUs to %1$d: %2$s"), nvcpus,
                        taskInfoErrorMessage);
         goto cleanup;
     }
@@ -2636,7 +2631,7 @@ esxConnectDomainXMLFromNative(virConnectPtr conn, const char *nativeFormat,
 
     if (STRNEQ(nativeFormat, VMX_CONFIG_FORMAT_ARGV)) {
         virReportError(VIR_ERR_INVALID_ARG,
-                       _("Unsupported config format '%s'"), nativeFormat);
+                       _("Unsupported config format '%1$s'"), nativeFormat);
         return NULL;
     }
 
@@ -2679,7 +2674,7 @@ esxConnectDomainXMLToNative(virConnectPtr conn, const char *nativeFormat,
 
     if (STRNEQ(nativeFormat, VMX_CONFIG_FORMAT_ARGV)) {
         virReportError(VIR_ERR_INVALID_ARG,
-                       _("Unsupported config format '%s'"), nativeFormat);
+                       _("Unsupported config format '%1$s'"), nativeFormat);
         return NULL;
     }
 
@@ -2837,7 +2832,7 @@ esxDomainCreateWithFlags(virDomainPtr domain, unsigned int flags)
     }
 
     if (taskInfoState != esxVI_TaskInfoState_Success) {
-        virReportError(VIR_ERR_INTERNAL_ERROR, _("Could not start domain: %s"),
+        virReportError(VIR_ERR_INTERNAL_ERROR, _("Could not start domain: %1$s"),
                        taskInfoErrorMessage);
         goto cleanup;
     }
@@ -2999,8 +2994,8 @@ esxDomainDefineXMLFlags(virConnectPtr conn, const char *xml, unsigned int flags)
 
     if (!virStringHasCaseSuffix(src, ".vmdk")) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("Expecting source '%s' of first file-based harddisk to "
-                         "be a VMDK image"), src);
+                       _("Expecting source '%1$s' of first file-based harddisk to be a VMDK image"),
+                       src);
         goto cleanup;
     }
 
@@ -3056,7 +3051,7 @@ esxDomainDefineXMLFlags(virConnectPtr conn, const char *xml, unsigned int flags)
     }
 
     if (taskInfoState != esxVI_TaskInfoState_Success) {
-        virReportError(VIR_ERR_INTERNAL_ERROR, _("Could not define domain: %s"),
+        virReportError(VIR_ERR_INTERNAL_ERROR, _("Could not define domain: %1$s"),
                        taskInfoErrorMessage);
         goto cleanup;
     }
@@ -3522,8 +3517,8 @@ esxDomainSetSchedulerParametersFlags(virDomainPtr domain,
 
             if (params[i].value.l < 0) {
                 virReportError(VIR_ERR_INVALID_ARG,
-                               _("Could not set reservation to %lld MHz, expecting "
-                                 "positive value"), params[i].value.l);
+                               _("Could not set reservation to %1$lld MHz, expecting positive value"),
+                               params[i].value.l);
                 goto cleanup;
             }
 
@@ -3534,8 +3529,7 @@ esxDomainSetSchedulerParametersFlags(virDomainPtr domain,
 
             if (params[i].value.l < -1) {
                 virReportError(VIR_ERR_INVALID_ARG,
-                               _("Could not set limit to %lld MHz, expecting "
-                                 "positive value or -1 (unlimited)"),
+                               _("Could not set limit to %1$lld MHz, expecting positive value or -1 (unlimited)"),
                                params[i].value.l);
                 goto cleanup;
             }
@@ -3573,8 +3567,7 @@ esxDomainSetSchedulerParametersFlags(virDomainPtr domain,
 
                   default:
                     virReportError(VIR_ERR_INVALID_ARG,
-                                   _("Could not set shares to %d, expecting positive "
-                                     "value or -1 (low), -2 (normal) or -3 (high)"),
+                                   _("Could not set shares to %1$d, expecting positive value or -1 (low), -2 (normal) or -3 (high)"),
                                    params[i].value.i);
                     goto cleanup;
                 }
@@ -3593,7 +3586,7 @@ esxDomainSetSchedulerParametersFlags(virDomainPtr domain,
 
     if (taskInfoState != esxVI_TaskInfoState_Success) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("Could not change scheduler parameters: %s"),
+                       _("Could not change scheduler parameters: %1$s"),
                        taskInfoErrorMessage);
         goto cleanup;
     }
@@ -3744,8 +3737,8 @@ esxDomainMigratePerform(virDomainPtr domain,
          */
         if (eventList->fullFormattedMessage) {
             virReportError(VIR_ERR_INTERNAL_ERROR,
-                           _("Could not migrate domain, validation reported a "
-                             "problem: %s"), eventList->fullFormattedMessage);
+                           _("Could not migrate domain, validation reported a problem: %1$s"),
+                           eventList->fullFormattedMessage);
         } else {
             virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
                            _("Could not migrate domain, validation reported a "
@@ -3770,8 +3763,7 @@ esxDomainMigratePerform(virDomainPtr domain,
 
     if (taskInfoState != esxVI_TaskInfoState_Success) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("Could not migrate domain, migration task finished with "
-                         "an error: %s"),
+                       _("Could not migrate domain, migration task finished with an error: %1$s"),
                        taskInfoErrorMessage);
         goto cleanup;
     }
@@ -4024,7 +4016,7 @@ esxDomainSnapshotCreateXML(virDomainPtr domain, const char *xmlDesc,
 
     if (snapshotTree) {
         virReportError(VIR_ERR_OPERATION_INVALID,
-                       _("Snapshot '%s' already exists"), def->parent.name);
+                       _("Snapshot '%1$s' already exists"), def->parent.name);
         goto cleanup;
     }
 
@@ -4041,7 +4033,7 @@ esxDomainSnapshotCreateXML(virDomainPtr domain, const char *xmlDesc,
     }
 
     if (taskInfoState != esxVI_TaskInfoState_Success) {
-        virReportError(VIR_ERR_INTERNAL_ERROR, _("Could not create snapshot: %s"),
+        virReportError(VIR_ERR_INTERNAL_ERROR, _("Could not create snapshot: %1$s"),
                        taskInfoErrorMessage);
         goto cleanup;
     }
@@ -4373,7 +4365,7 @@ esxDomainSnapshotGetParent(virDomainSnapshotPtr snapshot, unsigned int flags)
 
     if (!snapshotTreeParent) {
         virReportError(VIR_ERR_NO_DOMAIN_SNAPSHOT,
-                       _("snapshot '%s' does not have a parent"),
+                       _("snapshot '%1$s' does not have a parent"),
                        snapshotTree->name);
         goto cleanup;
     }
@@ -4517,7 +4509,7 @@ esxDomainRevertToSnapshot(virDomainSnapshotPtr snapshot, unsigned int flags)
 
     if (taskInfoState != esxVI_TaskInfoState_Success) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("Could not revert to snapshot '%s': %s"), snapshot->name,
+                       _("Could not revert to snapshot '%1$s': %2$s"), snapshot->name,
                        taskInfoErrorMessage);
         goto cleanup;
     }
@@ -4579,7 +4571,7 @@ esxDomainSnapshotDelete(virDomainSnapshotPtr snapshot, unsigned int flags)
 
     if (taskInfoState != esxVI_TaskInfoState_Success) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("Could not delete snapshot '%s': %s"), snapshot->name,
+                       _("Could not delete snapshot '%1$s': %2$s"), snapshot->name,
                        taskInfoErrorMessage);
         goto cleanup;
     }
@@ -4646,7 +4638,7 @@ esxDomainSetMemoryParameters(virDomainPtr domain, virTypedParameterPtr params,
 
     if (taskInfoState != esxVI_TaskInfoState_Success) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("Could not change memory parameters: %s"),
+                       _("Could not change memory parameters: %1$s"),
                        taskInfoErrorMessage);
         goto cleanup;
     }
@@ -4967,7 +4959,7 @@ esxDomainHasManagedSaveImage(virDomainPtr domain, unsigned int flags)
 
     if (!managedObjectReference) {
         virReportError(VIR_ERR_NO_DOMAIN,
-                       _("Could not find domain with UUID '%s'"),
+                       _("Could not find domain with UUID '%1$s'"),
                        uuid_string);
         goto cleanup;
     }
@@ -5084,7 +5076,7 @@ esxDomainInterfaceAddresses(virDomainPtr domain,
     virCheckFlags(0, -1);
     if (source != VIR_DOMAIN_INTERFACE_ADDRESSES_SRC_AGENT) {
         virReportError(VIR_ERR_ARGUMENT_UNSUPPORTED,
-                       _("Unknown IP address data source %d"),
+                       _("Unknown IP address data source %1$d"),
                        source);
         return -1;
     }
@@ -5120,7 +5112,7 @@ esxDomainInterfaceAddresses(virDomainPtr domain,
 
     if (!guestNicInfoList) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("Missing property '%s' in answer"),
+                       _("Missing property '%1$s' in answer"),
                        "guest.net");
         goto cleanup;
     }
diff --git a/src/esx/esx_network_driver.c b/src/esx/esx_network_driver.c
index 1261b3f1fa..273147af40 100644
--- a/src/esx/esx_network_driver.c
+++ b/src/esx/esx_network_driver.c
@@ -148,7 +148,7 @@ esxNetworkLookupByUUID(virConnectPtr conn, const unsigned char *uuid)
         virUUIDFormat(uuid, uuid_string);
 
         virReportError(VIR_ERR_NO_NETWORK,
-                       _("Could not find HostVirtualSwitch with UUID '%s'"),
+                       _("Could not find HostVirtualSwitch with UUID '%1$s'"),
                        uuid_string);
 
         goto cleanup;
@@ -337,7 +337,7 @@ esxNetworkDefineXMLFlags(virConnectPtr conn, const char *xml,
     case VIR_NETWORK_FORWARD_PASSTHROUGH:
     case VIR_NETWORK_FORWARD_HOSTDEV:
         virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
-                       _("Unsupported forward mode '%s'"),
+                       _("Unsupported forward mode '%1$s'"),
                        virNetworkForwardTypeToString(def->forward.type));
         goto cleanup;
 
@@ -357,7 +357,7 @@ esxNetworkDefineXMLFlags(virConnectPtr conn, const char *xml,
                  hostPortGroup = hostPortGroup->_next) {
                 if (STREQ(def->portGroups[i].name, hostPortGroup->spec->name)) {
                     virReportError(VIR_ERR_NETWORK_EXIST,
-                                   _("HostPortGroup with name '%s' exists already"),
+                                   _("HostPortGroup with name '%1$s' exists already"),
                                    def->portGroups[i].name);
                     goto cleanup;
                 }
@@ -390,8 +390,7 @@ esxNetworkDefineXMLFlags(virConnectPtr conn, const char *xml,
             if (def->forward.ifs[i].type !=
                 VIR_NETWORK_FORWARD_HOSTDEV_DEVICE_NETDEV) {
                 virReportError(VIR_ERR_NO_SUPPORT,
-                               _("unsupported device type in network %s "
-                                 "interface pool"),
+                               _("unsupported device type in network %1$s interface pool"),
                                def->name);
                 goto cleanup;
             }
@@ -412,7 +411,7 @@ esxNetworkDefineXMLFlags(virConnectPtr conn, const char *xml,
 
             if (! found) {
                 virReportError(VIR_ERR_INTERNAL_ERROR,
-                               _("Could not find PhysicalNic with name '%s'"),
+                               _("Could not find PhysicalNic with name '%1$s'"),
                                def->forward.ifs[i].device.dev);
                 goto cleanup;
             }
@@ -537,7 +536,7 @@ esxNetworkUndefine(virNetworkPtr network)
                      hostPortGroupPort = hostPortGroupPort->_next) {
                     if (STRNEQ(hostPortGroupPort->type, "virtualMachine")) {
                         virReportError(VIR_ERR_OPERATION_INVALID,
-                                       _("Cannot undefine HostVirtualSwitch that has a '%s' port"),
+                                       _("Cannot undefine HostVirtualSwitch that has a '%1$s' port"),
                                        hostPortGroupPort->type);
                         goto cleanup;
                     }
@@ -550,7 +549,7 @@ esxNetworkUndefine(virNetworkPtr network)
 
         if (! found) {
             virReportError(VIR_ERR_INTERNAL_ERROR,
-                           _("Could not find HostPortGroup for key '%s'"),
+                           _("Could not find HostPortGroup for key '%1$s'"),
                            hostPortGroupKey->value);
             goto cleanup;
         }
@@ -578,7 +577,7 @@ esxNetworkUndefine(virNetworkPtr network)
 
         if (! found) {
             virReportError(VIR_ERR_INTERNAL_ERROR,
-                           _("Could not find HostPortGroup for key '%s'"),
+                           _("Could not find HostPortGroup for key '%1$s'"),
                            hostPortGroupKey->value);
             goto cleanup;
         }
@@ -714,7 +713,7 @@ esxNetworkGetXMLDesc(virNetworkPtr network_, unsigned int flags)
 
             if (! found) {
                 virReportError(VIR_ERR_INTERNAL_ERROR,
-                               _("Could not find PhysicalNic with key '%s'"),
+                               _("Could not find PhysicalNic with key '%1$s'"),
                                physicalNicKey->value);
                 goto cleanup;
             }
@@ -787,7 +786,7 @@ esxNetworkGetXMLDesc(virNetworkPtr network_, unsigned int flags)
 
             if (! found) {
                 virReportError(VIR_ERR_INTERNAL_ERROR,
-                               _("Could not find HostPortGroup with key '%s'"),
+                               _("Could not find HostPortGroup with key '%1$s'"),
                                hostPortGroupKey->value);
                 goto cleanup;
             }
diff --git a/src/esx/esx_storage_backend_iscsi.c b/src/esx/esx_storage_backend_iscsi.c
index 7be0444f1b..087365392b 100644
--- a/src/esx/esx_storage_backend_iscsi.c
+++ b/src/esx/esx_storage_backend_iscsi.c
@@ -320,7 +320,7 @@ esxStoragePoolGetXMLDesc(virStoragePoolPtr pool, unsigned int flags)
     if (!target) {
         /* pool not found */
         virReportError(VIR_ERR_NO_STORAGE_POOL,
-                       _("Could not find storage pool with name '%s'"),
+                       _("Could not find storage pool with name '%1$s'"),
                        pool->name);
         goto cleanup;
     }
@@ -638,7 +638,7 @@ esxStorageVolGetInfo(virStorageVolPtr volume,
 
     if (!hostScsiDisk) {
         virReportError(VIR_ERR_NO_STORAGE_VOL,
-                       _("Could not find volume with name: %s"),
+                       _("Could not find volume with name: %1$s"),
                        volume->name);
         goto cleanup;
     }
@@ -693,7 +693,7 @@ esxStorageVolGetXMLDesc(virStorageVolPtr volume,
 
     if (!scsiLun) {
         virReportError(VIR_ERR_NO_STORAGE_VOL,
-                       _("Could find volume with name: %s"), volume->name);
+                       _("Could find volume with name: %1$s"), volume->name);
         goto cleanup;
     }
 
diff --git a/src/esx/esx_storage_backend_vmfs.c b/src/esx/esx_storage_backend_vmfs.c
index 4efcc2fc75..f00c7eec4e 100644
--- a/src/esx/esx_storage_backend_vmfs.c
+++ b/src/esx/esx_storage_backend_vmfs.c
@@ -522,7 +522,7 @@ esxStoragePoolGetXMLDesc(virStoragePoolPtr pool, unsigned int flags)
             def.source.format = VIR_STORAGE_POOL_NETFS_CIFS;
         } else {
             virReportError(VIR_ERR_INTERNAL_ERROR,
-                           _("Datastore has unexpected type '%s'"),
+                           _("Datastore has unexpected type '%1$s'"),
                            nasInfo->nas->type);
             goto cleanup;
         }
@@ -877,15 +877,15 @@ esxStorageVolCreateXML(virStoragePoolPtr pool,
 
     if (!tmp || *def->name == '/' || tmp[1] == '\0') {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("Volume name '%s' doesn't have expected format "
-                         "'<directory>/<file>'"), def->name);
+                       _("Volume name '%1$s' doesn't have expected format '<directory>/<file>'"),
+                       def->name);
         goto cleanup;
     }
 
     if (!virStringHasCaseSuffix(def->name, ".vmdk")) {
         virReportError(VIR_ERR_NO_SUPPORT,
-                       _("Volume name '%s' has unsupported suffix, "
-                         "expecting '.vmdk'"), def->name);
+                       _("Volume name '%1$s' has unsupported suffix, expecting '.vmdk'"),
+                       def->name);
         goto cleanup;
     }
 
@@ -980,7 +980,7 @@ esxStorageVolCreateXML(virStoragePoolPtr pool,
 
         if (taskInfoState != esxVI_TaskInfoState_Success) {
             virReportError(VIR_ERR_INTERNAL_ERROR,
-                           _("Could not create volume: %s"),
+                           _("Could not create volume: %1$s"),
                            taskInfoErrorMessage);
             goto cleanup;
         }
@@ -1002,7 +1002,7 @@ esxStorageVolCreateXML(virStoragePoolPtr pool,
         }
     } else {
         virReportError(VIR_ERR_NO_SUPPORT,
-                       _("Creation of %s volumes is not supported"),
+                       _("Creation of %1$s volumes is not supported"),
                        virStorageFileFormatTypeToString(def->target.format));
         goto cleanup;
     }
@@ -1079,15 +1079,15 @@ esxStorageVolCreateXMLFrom(virStoragePoolPtr pool,
 
     if (!tmp || *def->name == '/' || tmp[1] == '\0') {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("Volume name '%s' doesn't have expected format "
-                         "'<directory>/<file>'"), def->name);
+                       _("Volume name '%1$s' doesn't have expected format '<directory>/<file>'"),
+                       def->name);
         goto cleanup;
     }
 
     if (!virStringHasCaseSuffix(def->name, ".vmdk")) {
         virReportError(VIR_ERR_NO_SUPPORT,
-                       _("Volume name '%s' has unsupported suffix, "
-                         "expecting '.vmdk'"), def->name);
+                       _("Volume name '%1$s' has unsupported suffix, expecting '.vmdk'"),
+                       def->name);
         goto cleanup;
     }
 
@@ -1148,7 +1148,7 @@ esxStorageVolCreateXMLFrom(virStoragePoolPtr pool,
         }
 
         if (taskInfoState != esxVI_TaskInfoState_Success) {
-            virReportError(VIR_ERR_INTERNAL_ERROR, _("Could not copy volume: %s"),
+            virReportError(VIR_ERR_INTERNAL_ERROR, _("Could not copy volume: %1$s"),
                            taskInfoErrorMessage);
             goto cleanup;
         }
@@ -1170,7 +1170,7 @@ esxStorageVolCreateXMLFrom(virStoragePoolPtr pool,
         }
     } else {
         virReportError(VIR_ERR_NO_SUPPORT,
-                       _("Creation of %s volumes is not supported"),
+                       _("Creation of %1$s volumes is not supported"),
                        virStorageFileFormatTypeToString(def->target.format));
         goto cleanup;
     }
@@ -1211,7 +1211,7 @@ esxStorageVolDelete(virStorageVolPtr volume, unsigned int flags)
     }
 
     if (taskInfoState != esxVI_TaskInfoState_Success) {
-        virReportError(VIR_ERR_INTERNAL_ERROR, _("Could not delete volume: %s"),
+        virReportError(VIR_ERR_INTERNAL_ERROR, _("Could not delete volume: %1$s"),
                        taskInfoErrorMessage);
         goto cleanup;
     }
@@ -1250,7 +1250,7 @@ esxStorageVolWipe(virStorageVolPtr volume, unsigned int flags)
     }
 
     if (taskInfoState != esxVI_TaskInfoState_Success) {
-        virReportError(VIR_ERR_INTERNAL_ERROR, _("Could not wipe volume: %s"),
+        virReportError(VIR_ERR_INTERNAL_ERROR, _("Could not wipe volume: %1$s"),
                        taskInfoErrorMessage);
         goto cleanup;
     }
@@ -1372,7 +1372,7 @@ esxStorageVolGetXMLDesc(virStorageVolPtr volume,
         def.target.format = VIR_STORAGE_FILE_RAW;
     } else {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("File '%s' has unknown type"), datastorePath);
+                       _("File '%1$s' has unknown type"), datastorePath);
         goto cleanup;
     }
 
diff --git a/src/esx/esx_storage_driver.c b/src/esx/esx_storage_driver.c
index 7ce2efe855..085650f0fb 100644
--- a/src/esx/esx_storage_driver.c
+++ b/src/esx/esx_storage_driver.c
@@ -154,7 +154,7 @@ esxStoragePoolLookupByName(virConnectPtr conn, const char *name)
     }
 
     virReportError(VIR_ERR_NO_STORAGE_POOL,
-                   _("Could not find storage pool with name '%s'"), name);
+                   _("Could not find storage pool with name '%1$s'"), name);
 
     return NULL;
 }
@@ -182,7 +182,7 @@ esxStoragePoolLookupByUUID(virConnectPtr conn, const unsigned char *uuid)
 
     virUUIDFormat(uuid, uuid_string);
     virReportError(VIR_ERR_NO_STORAGE_POOL,
-                   _("Could not find storage pool with uuid '%s'"),
+                   _("Could not find storage pool with uuid '%1$s'"),
                    uuid_string);
 
     return NULL;
@@ -349,7 +349,7 @@ esxStorageVolLookupByPath(virConnectPtr conn, const char *path)
         return backends[ISCSI]->storageVolLookupByPath(conn, path);
     } else {
         virReportError(VIR_ERR_INVALID_ARG,
-                       _("Unexpected volume path format: %s"), path);
+                       _("Unexpected volume path format: %1$s"), path);
 
         return NULL;
     }
@@ -375,7 +375,7 @@ esxStorageVolLookupByKey(virConnectPtr conn, const char *key)
     }
 
     virReportError(VIR_ERR_NO_STORAGE_VOL,
-                   _("Could not find storage volume with key '%s'"),
+                   _("Could not find storage volume with key '%1$s'"),
                    key);
 
     return NULL;
diff --git a/src/esx/esx_stream.c b/src/esx/esx_stream.c
index 85fef53339..1439940330 100644
--- a/src/esx/esx_stream.c
+++ b/src/esx/esx_stream.c
@@ -176,14 +176,14 @@ esxStreamTransfer(esxStreamPrivate *priv, bool blocking)
 
         if (status < 0) {
             virReportError(VIR_ERR_INTERNAL_ERROR,
-                           _("Could not complete transfer: %s (%d)"),
+                           _("Could not complete transfer: %1$s (%2$d)"),
                            curl_easy_strerror(errorCode), errorCode);
             return -1;
         }
 
         if (responseCode != 200 && responseCode != 206) {
             virReportError(VIR_ERR_INTERNAL_ERROR,
-                           _("Unexpected HTTP response code %lu"),
+                           _("Unexpected HTTP response code %1$lu"),
                            responseCode);
             return -1;
         }
diff --git a/src/esx/esx_util.c b/src/esx/esx_util.c
index 89d5517262..fbbf226555 100644
--- a/src/esx/esx_util.c
+++ b/src/esx/esx_util.c
@@ -59,8 +59,7 @@ esxUtil_ParseUri(esxUtil_ParsedUri **parsedUri, virURI *uri)
             if (STRNEQ((*parsedUri)->transport, "http") &&
                 STRNEQ((*parsedUri)->transport, "https")) {
                 virReportError(VIR_ERR_INVALID_ARG,
-                               _("Query parameter 'transport' has unexpected value "
-                                 "'%s' (should be http|https)"),
+                               _("Query parameter 'transport' has unexpected value '%1$s' (should be http|https)"),
                                (*parsedUri)->transport);
                 goto cleanup;
             }
@@ -72,8 +71,8 @@ esxUtil_ParseUri(esxUtil_ParsedUri **parsedUri, virURI *uri)
             if (virStrToLong_i(queryParam->value, NULL, 10, &noVerify) < 0 ||
                 (noVerify != 0 && noVerify != 1)) {
                 virReportError(VIR_ERR_INVALID_ARG,
-                               _("Query parameter 'no_verify' has unexpected value "
-                                 "'%s' (should be 0 or 1)"), queryParam->value);
+                               _("Query parameter 'no_verify' has unexpected value '%1$s' (should be 0 or 1)"),
+                               queryParam->value);
                 goto cleanup;
             }
 
@@ -82,8 +81,8 @@ esxUtil_ParseUri(esxUtil_ParsedUri **parsedUri, virURI *uri)
             if (virStrToLong_i(queryParam->value, NULL, 10, &autoAnswer) < 0 ||
                 (autoAnswer != 0 && autoAnswer != 1)) {
                 virReportError(VIR_ERR_INVALID_ARG,
-                               _("Query parameter 'auto_answer' has unexpected "
-                                 "value '%s' (should be 0 or 1)"), queryParam->value);
+                               _("Query parameter 'auto_answer' has unexpected value '%1$s' (should be 0 or 1)"),
+                               queryParam->value);
                 goto cleanup;
             }
 
@@ -108,8 +107,7 @@ esxUtil_ParseUri(esxUtil_ParsedUri **parsedUri, virURI *uri)
                 *tmp = '\0';
 
                 virReportError(VIR_ERR_INVALID_ARG,
-                               _("Query parameter 'proxy' contains unexpected "
-                                 "type '%s' (should be (http|socks(|4|4a|5))"),
+                               _("Query parameter 'proxy' contains unexpected type '%1$s' (should be (http|socks(|4|4a|5))"),
                                queryParam->value);
                 goto cleanup;
             } else {
@@ -133,8 +131,7 @@ esxUtil_ParseUri(esxUtil_ParsedUri **parsedUri, virURI *uri)
                     (*parsedUri)->proxy_port < 1 ||
                     (*parsedUri)->proxy_port > 65535) {
                     virReportError(VIR_ERR_INVALID_ARG,
-                                   _("Query parameter 'proxy' has unexpected "
-                                     "port value '%s' (should be [1..65535])"),
+                                   _("Query parameter 'proxy' has unexpected port value '%1$s' (should be [1..65535])"),
                                    tmp);
                     goto cleanup;
                 }
@@ -223,8 +220,8 @@ esxUtil_ParseDatastorePath(const char *datastorePath, char **datastoreName,
     if (!(tmp = STRSKIP(copyOfDatastorePath, "[")) || *tmp == ']' ||
         !(preliminaryDatastoreName = strtok_r(tmp, "]", &saveptr))) {
         virReportError(VIR_ERR_INVALID_ARG,
-                       _("Datastore path '%s' doesn't have expected format "
-                         "'[<datastore>] <path>'"), datastorePath);
+                       _("Datastore path '%1$s' doesn't have expected format '[<datastore>] <path>'"),
+                       datastorePath);
         goto cleanup;
     }
 
@@ -291,14 +288,14 @@ esxUtil_ResolveHostname(const char *hostname, char **ipAddress)
 
     if (errcode != 0) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("IP address lookup for host '%s' failed: %s"), hostname,
+                       _("IP address lookup for host '%1$s' failed: %2$s"), hostname,
                        gai_strerror(errcode));
         return -1;
     }
 
     if (!result) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("No IP address for host '%s' found: %s"), hostname,
+                       _("No IP address for host '%1$s' found: %2$s"), hostname,
                        gai_strerror(errcode));
         return -1;
     }
@@ -310,7 +307,7 @@ esxUtil_ResolveHostname(const char *hostname, char **ipAddress)
 
     if (errcode != 0) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("Formatting IP address for host '%s' failed: %s"), hostname,
+                       _("Formatting IP address for host '%1$s' failed: %2$s"), hostname,
                        gai_strerror(errcode));
         return -1;
     }
@@ -329,7 +326,7 @@ esxUtil_ReformatUuid(const char *input, char *output)
 
     if (virUUIDParse(input, uuid) < 0) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("Could not parse UUID from string '%s'"),
+                       _("Could not parse UUID from string '%1$s'"),
                        input);
         return -1;
     }
diff --git a/src/esx/esx_vi.c b/src/esx/esx_vi.c
index b56d84fc43..122e5bed2e 100644
--- a/src/esx/esx_vi.c
+++ b/src/esx/esx_vi.c
@@ -235,7 +235,7 @@ esxVI_CURL_Perform(esxVI_CURL *curl, const char *url)
 
     if (errorCode != CURLE_OK) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("curl_easy_perform() returned an error: %s (%d) : %s"),
+                       _("curl_easy_perform() returned an error: %1$s (%2$d) : %3$s"),
                        curl_easy_strerror(errorCode), errorCode, curl->error);
         return -1;
     }
@@ -245,8 +245,8 @@ esxVI_CURL_Perform(esxVI_CURL *curl, const char *url)
 
     if (errorCode != CURLE_OK) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("curl_easy_getinfo(CURLINFO_RESPONSE_CODE) returned an "
-                         "error: %s (%d) : %s"), curl_easy_strerror(errorCode),
+                       _("curl_easy_getinfo(CURLINFO_RESPONSE_CODE) returned an error: %1$s (%2$d) : %3$s"),
+                       curl_easy_strerror(errorCode),
                        errorCode, curl->error);
         return -1;
     }
@@ -264,13 +264,13 @@ esxVI_CURL_Perform(esxVI_CURL *curl, const char *url)
 
         if (errorCode != CURLE_OK) {
             virReportError(VIR_ERR_INTERNAL_ERROR,
-                           _("curl_easy_getinfo(CURLINFO_REDIRECT_URL) returned "
-                             "an error: %s (%d) : %s"),
+                           _("curl_easy_getinfo(CURLINFO_REDIRECT_URL) returned an error: %1$s (%2$d) : %3$s"),
                            curl_easy_strerror(errorCode),
                            errorCode, curl->error);
         } else {
             virReportError(VIR_ERR_INTERNAL_ERROR,
-                           _("The server redirects from '%s' to '%s'"), url,
+                           _("The server redirects from '%1$s' to '%2$s'"),
+                           url,
                            redirectUrl);
         }
 
@@ -394,7 +394,7 @@ esxVI_CURL_Download(esxVI_CURL *curl, const char *url, char **content,
         return -1;
     } else if (responseCode != 200 && responseCode != 206) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("HTTP response code %d for download from '%s'"),
+                       _("HTTP response code %1$d for download from '%2$s'"),
                        responseCode, url);
         return -1;
     }
@@ -434,7 +434,7 @@ esxVI_CURL_Upload(esxVI_CURL *curl, const char *url, const char *content)
         return -1;
     } else if (responseCode != 200 && responseCode != 201) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("HTTP response code %d for upload to '%s'"),
+                       _("HTTP response code %1$d for upload to '%2$s'"),
                        responseCode, url);
         return -1;
     }
@@ -469,7 +469,7 @@ esxVI_SharedCURL_Lock(CURL *handle G_GNUC_UNUSED, curl_lock_data data,
         break;
 
       default:
-        VIR_ERROR(_("Trying to lock unknown SharedCURL lock %d"), (int)data);
+        VIR_ERROR(_("Trying to lock unknown SharedCURL lock %1$d"), (int)data);
         return;
     }
 
@@ -497,7 +497,7 @@ esxVI_SharedCURL_Unlock(CURL *handle G_GNUC_UNUSED, curl_lock_data data,
         break;
 
       default:
-        VIR_ERROR(_("Trying to unlock unknown SharedCURL lock %d"), (int)data);
+        VIR_ERROR(_("Trying to unlock unknown SharedCURL lock %1$d"), (int)data);
         return;
     }
 
@@ -717,7 +717,7 @@ esxVI_MultiCURL_Wait(esxVI_MultiCURL *multi, int *runningHandles)
 
     if (errorCode != CURLM_OK) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("Could not wait for transfer: %s (%d)"),
+                       _("Could not wait for transfer: %1$s (%2$d)"),
                        curl_multi_strerror(errorCode), errorCode);
         return -1;
     }
@@ -736,7 +736,7 @@ esxVI_MultiCURL_Perform(esxVI_MultiCURL *multi, int *runningHandles)
 
     if (errorCode != CURLM_OK) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("Could not transfer data: %s (%d)"),
+                       _("Could not transfer data: %1$s (%2$d)"),
                        curl_multi_strerror(errorCode), errorCode);
         return -1;
     }
@@ -851,22 +851,22 @@ esxVI_Context_Connect(esxVI_Context *ctx, const char *url,
     if (STRNEQ(ctx->service->about->apiType, "HostAgent") &&
         STRNEQ(ctx->service->about->apiType, "VirtualCenter")) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("Expecting VI API type 'HostAgent' or 'VirtualCenter' "
-                         "but found '%s'"), ctx->service->about->apiType);
+                       _("Expecting VI API type 'HostAgent' or 'VirtualCenter' but found '%1$s'"),
+                       ctx->service->about->apiType);
         return -1;
     }
 
     if (virStringParseVersion(&ctx->apiVersion,
                               ctx->service->about->apiVersion, true) < 0) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("Could not parse VI API version '%s'"),
+                       _("Could not parse VI API version '%1$s'"),
                        ctx->service->about->apiVersion);
         return -1;
     }
 
     if (ctx->apiVersion < 1000000 * 2 + 1000 * 5 /* 2.5 */) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("Minimum supported %s version is %s but found version '%s'"),
+                       _("Minimum supported %1$s version is %2$s but found version '%3$s'"),
                        "VI API", "2.5", ctx->service->about->apiVersion);
         return -1;
     }
@@ -874,7 +874,7 @@ esxVI_Context_Connect(esxVI_Context *ctx, const char *url,
     if (virStringParseVersion(&ctx->productVersion,
                               ctx->service->about->version, true) < 0) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("Could not parse product version '%s'"),
+                       _("Could not parse product version '%1$s'"),
                        ctx->service->about->version);
         return -1;
     }
@@ -882,7 +882,7 @@ esxVI_Context_Connect(esxVI_Context *ctx, const char *url,
     if (STREQ(ctx->service->about->productLineId, "gsx")) {
         if (ctx->productVersion < 1000000 * 2 + 1000 * 0 /* 2.0 */) {
             virReportError(VIR_ERR_INTERNAL_ERROR,
-                           _("Minimum supported %s version is %s but found version '%s'"),
+                           _("Minimum supported %1$s version is %2$s but found version '%3$s'"),
                            esxVI_ProductLineToDisplayName(esxVI_ProductLine_GSX),
                            "2.0", ctx->service->about->version);
             return -1;
@@ -893,7 +893,7 @@ esxVI_Context_Connect(esxVI_Context *ctx, const char *url,
                STREQ(ctx->service->about->productLineId, "embeddedEsx")) {
         if (ctx->productVersion < 1000000 * 3 + 1000 * 5 /* 3.5 */) {
             virReportError(VIR_ERR_INTERNAL_ERROR,
-                           _("Minimum supported %s version is %s but found version '%s'"),
+                           _("Minimum supported %1$s version is %2$s but found version '%3$s'"),
                            esxVI_ProductLineToDisplayName(esxVI_ProductLine_ESX),
                            "3.5", ctx->service->about->version);
             return -1;
@@ -903,7 +903,7 @@ esxVI_Context_Connect(esxVI_Context *ctx, const char *url,
     } else if (STREQ(ctx->service->about->productLineId, "vpx")) {
         if (ctx->productVersion < 1000000 * 2 + 1000 * 5 /* 2.5 */) {
             virReportError(VIR_ERR_INTERNAL_ERROR,
-                           _("Minimum supported %s version is %s but found version '%s'"),
+                           _("Minimum supported %1$s version is %2$s but found version '%3$s'"),
                            esxVI_ProductLineToDisplayName(esxVI_ProductLine_VPX),
                            "2.5", ctx->service->about->version);
             return -1;
@@ -912,8 +912,7 @@ esxVI_Context_Connect(esxVI_Context *ctx, const char *url,
         ctx->productLine = esxVI_ProductLine_VPX;
     } else {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("Expecting product 'gsx' or 'esx' or 'embeddedEsx' "
-                         "or 'vpx' but found '%s'"),
+                       _("Expecting product 'gsx' or 'esx' or 'embeddedEsx' or 'vpx' but found '%1$s'"),
                        ctx->service->about->productLineId);
         return -1;
     }
@@ -1000,7 +999,7 @@ esxVI_Context_LookupManagedObjectsByPath(esxVI_Context *ctx, const char *path)
 
     if (!item) {
         virReportError(VIR_ERR_INVALID_ARG,
-                       _("Path '%s' does not specify a datacenter"), path);
+                       _("Path '%1$s' does not specify a datacenter"), path);
         goto cleanup;
     }
 
@@ -1041,7 +1040,7 @@ esxVI_Context_LookupManagedObjectsByPath(esxVI_Context *ctx, const char *path)
 
     if (!ctx->datacenter) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("Could not find datacenter specified in '%s'"), path);
+                       _("Could not find datacenter specified in '%1$s'"), path);
         goto cleanup;
     }
 
@@ -1050,7 +1049,7 @@ esxVI_Context_LookupManagedObjectsByPath(esxVI_Context *ctx, const char *path)
     /* Lookup (Cluster)ComputeResource */
     if (!item) {
         virReportError(VIR_ERR_INVALID_ARG,
-                       _("Path '%s' does not specify a compute resource"), path);
+                       _("Path '%1$s' does not specify a compute resource"), path);
         goto cleanup;
     }
 
@@ -1095,7 +1094,7 @@ esxVI_Context_LookupManagedObjectsByPath(esxVI_Context *ctx, const char *path)
 
     if (!ctx->computeResource) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("Could not find compute resource specified in '%s'"),
+                       _("Could not find compute resource specified in '%1$s'"),
                        path);
         goto cleanup;
     }
@@ -1113,7 +1112,7 @@ esxVI_Context_LookupManagedObjectsByPath(esxVI_Context *ctx, const char *path)
               "ClusterComputeResource")) {
         if (!item) {
             virReportError(VIR_ERR_INVALID_ARG,
-                           _("Path '%s' does not specify a host system"), path);
+                           _("Path '%1$s' does not specify a host system"), path);
             goto cleanup;
         }
 
@@ -1124,7 +1123,7 @@ esxVI_Context_LookupManagedObjectsByPath(esxVI_Context *ctx, const char *path)
 
     if (item) {
         virReportError(VIR_ERR_INVALID_ARG,
-                       _("Path '%s' ends with an excess item"), path);
+                       _("Path '%1$s' ends with an excess item"), path);
         goto cleanup;
     }
 
@@ -1139,7 +1138,7 @@ esxVI_Context_LookupManagedObjectsByPath(esxVI_Context *ctx, const char *path)
 
     if (!ctx->hostSystem) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("Could not find host system specified in '%s'"), path);
+                       _("Could not find host system specified in '%1$s'"), path);
         goto cleanup;
     }
 
@@ -1255,23 +1254,21 @@ esxVI_Context_Execute(esxVI_Context *ctx, const char *methodName,
 
             if (!(*response)->node) {
                 virReportError(VIR_ERR_INTERNAL_ERROR,
-                               _("HTTP response code %d for call to '%s'. "
-                                 "Fault is unknown, XPath evaluation failed"),
+                               _("HTTP response code %1$d for call to '%2$s'. Fault is unknown, XPath evaluation failed"),
                                (*response)->responseCode, methodName);
                 goto cleanup;
             }
 
             if (esxVI_Fault_Deserialize((*response)->node, &fault) < 0) {
                 virReportError(VIR_ERR_INTERNAL_ERROR,
-                               _("HTTP response code %d for call to '%s'. "
-                                 "Fault is unknown, deserialization failed"),
+                               _("HTTP response code %1$d for call to '%2$s'. Fault is unknown, deserialization failed"),
                                (*response)->responseCode, methodName);
                 goto cleanup;
             }
 
             virReportError(VIR_ERR_INTERNAL_ERROR,
-                           _("HTTP response code %d for call to '%s'. "
-                             "Fault: %s - %s"), (*response)->responseCode,
+                           _("HTTP response code %1$d for call to '%2$s'. Fault: %3$s - %4$s"),
+                           (*response)->responseCode,
                            methodName, fault->faultcode, fault->faultstring);
 
             /* FIXME: Dump raw response until detail part gets deserialized */
@@ -1288,8 +1285,8 @@ esxVI_Context_Execute(esxVI_Context *ctx, const char *methodName,
 
             if (!responseNode) {
                 virReportError(VIR_ERR_INTERNAL_ERROR,
-                               _("XPath evaluation of response for call to '%s' "
-                                 "failed"), methodName);
+                               _("XPath evaluation of response for call to '%1$s' failed"),
+                               methodName);
                 goto cleanup;
             }
 
@@ -1300,13 +1297,13 @@ esxVI_Context_Execute(esxVI_Context *ctx, const char *methodName,
               case esxVI_Occurrence_RequiredItem:
                 if (!(*response)->node) {
                     virReportError(VIR_ERR_INTERNAL_ERROR,
-                                   _("Call to '%s' returned an empty result, "
-                                     "expecting a non-empty result"), methodName);
+                                   _("Call to '%1$s' returned an empty result, expecting a non-empty result"),
+                                   methodName);
                     goto cleanup;
                 } else if ((*response)->node->next) {
                     virReportError(VIR_ERR_INTERNAL_ERROR,
-                                   _("Call to '%s' returned a list, expecting "
-                                     "exactly one item"), methodName);
+                                   _("Call to '%1$s' returned a list, expecting exactly one item"),
+                                   methodName);
                     goto cleanup;
                 }
 
@@ -1315,8 +1312,8 @@ esxVI_Context_Execute(esxVI_Context *ctx, const char *methodName,
               case esxVI_Occurrence_RequiredList:
                 if (!(*response)->node) {
                     virReportError(VIR_ERR_INTERNAL_ERROR,
-                                   _("Call to '%s' returned an empty result, "
-                                     "expecting a non-empty result"), methodName);
+                                   _("Call to '%1$s' returned an empty result, expecting a non-empty result"),
+                                   methodName);
                     goto cleanup;
                 }
 
@@ -1326,8 +1323,8 @@ esxVI_Context_Execute(esxVI_Context *ctx, const char *methodName,
                 if ((*response)->node &&
                     (*response)->node->next) {
                     virReportError(VIR_ERR_INTERNAL_ERROR,
-                                   _("Call to '%s' returned a list, expecting "
-                                     "exactly one item"), methodName);
+                                   _("Call to '%1$s' returned a list, expecting exactly one item"),
+                                   methodName);
                     goto cleanup;
                 }
 
@@ -1340,8 +1337,8 @@ esxVI_Context_Execute(esxVI_Context *ctx, const char *methodName,
               case esxVI_Occurrence_None:
                 if ((*response)->node) {
                     virReportError(VIR_ERR_INTERNAL_ERROR,
-                                   _("Call to '%s' returned something, expecting "
-                                     "an empty result"), methodName);
+                                   _("Call to '%1$s' returned something, expecting an empty result"),
+                                   methodName);
                     goto cleanup;
                 }
 
@@ -1355,7 +1352,7 @@ esxVI_Context_Execute(esxVI_Context *ctx, const char *methodName,
         }
     } else {
         virReportError(VIR_ERR_HTTP_ERROR,
-                       _("HTTP response code %d for call to '%s'"),
+                       _("HTTP response code %1$d for call to '%2$s'"),
                        (*response)->responseCode, methodName);
         goto cleanup;
     }
@@ -1409,7 +1406,7 @@ esxVI_Enumeration_CastFromAnyType(const esxVI_Enumeration *enumeration,
 
     if (anyType->type != enumeration->type) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("Expecting type '%s' but found '%s'"),
+                       _("Expecting type '%1$s' but found '%2$s'"),
                        esxVI_Type_ToString(enumeration->type),
                        esxVI_AnyType_TypeToString(anyType));
         return -1;
@@ -1423,7 +1420,7 @@ esxVI_Enumeration_CastFromAnyType(const esxVI_Enumeration *enumeration,
     }
 
     virReportError(VIR_ERR_INTERNAL_ERROR,
-                   _("Unknown value '%s' for %s"), anyType->value,
+                   _("Unknown value '%1$s' for %2$s"), anyType->value,
                    esxVI_Type_ToString(enumeration->type));
 
     return -1;
@@ -1494,7 +1491,7 @@ esxVI_Enumeration_Deserialize(const esxVI_Enumeration *enumeration,
     }
 
     if (result < 0) {
-        virReportError(VIR_ERR_INTERNAL_ERROR, _("Unknown value '%s' for %s"),
+        virReportError(VIR_ERR_INTERNAL_ERROR, _("Unknown value '%1$s' for %2$s"),
                        name, esxVI_Type_ToString(enumeration->type));
     }
 
@@ -1580,7 +1577,7 @@ esxVI_List_CastFromAnyType(esxVI_AnyType *anyType, esxVI_List **list,
 
     if (! STRPREFIX(anyType->other, "ArrayOf")) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("Expecting type to begin with 'ArrayOf' but found '%s'"),
+                       _("Expecting type to begin with 'ArrayOf' but found '%1$s'"),
                        anyType->other);
         return -1;
     }
@@ -1589,7 +1586,7 @@ esxVI_List_CastFromAnyType(esxVI_AnyType *anyType, esxVI_List **list,
          childNode = childNode->next) {
         if (childNode->type != XML_ELEMENT_NODE) {
             virReportError(VIR_ERR_INTERNAL_ERROR,
-                           _("Wrong XML element type %d"), childNode->type);
+                           _("Wrong XML element type %1$d"), childNode->type);
             goto cleanup;
         }
 
@@ -1658,7 +1655,7 @@ esxVI_List_Deserialize(xmlNodePtr node, esxVI_List **list,
     for (; node; node = node->next) {
         if (node->type != XML_ELEMENT_NODE) {
             virReportError(VIR_ERR_INTERNAL_ERROR,
-                           _("Wrong XML element type %d"), node->type);
+                           _("Wrong XML element type %1$d"), node->type);
             goto failure;
         }
 
@@ -1960,7 +1957,7 @@ esxVI_LookupObjectContentByType(esxVI_Context *ctx,
                 objectSpec->selectSet = ctx->selectSet_folderToChildEntity;
             } else {
                 virReportError(VIR_ERR_INTERNAL_ERROR,
-                               _("Invalid lookup of '%s' from '%s'"),
+                               _("Invalid lookup of '%1$s' from '%2$s'"),
                                type, root->type);
                 goto cleanup;
             }
@@ -1972,7 +1969,7 @@ esxVI_LookupObjectContentByType(esxVI_Context *ctx,
                 objectSpec->selectSet = ctx->selectSet_computeResourceToParentToParent;
             } else {
                 virReportError(VIR_ERR_INTERNAL_ERROR,
-                               _("Invalid lookup of '%s' from '%s'"),
+                               _("Invalid lookup of '%1$s' from '%2$s'"),
                                type, root->type);
                 goto cleanup;
             }
@@ -1986,7 +1983,7 @@ esxVI_LookupObjectContentByType(esxVI_Context *ctx,
                 objectSpec->selectSet = ctx->selectSet_hostSystemToDatastore;
             } else {
                 virReportError(VIR_ERR_INTERNAL_ERROR,
-                               _("Invalid lookup of '%s' from '%s'"),
+                               _("Invalid lookup of '%1$s' from '%2$s'"),
                                type, root->type);
                 goto cleanup;
             }
@@ -1995,13 +1992,13 @@ esxVI_LookupObjectContentByType(esxVI_Context *ctx,
                 objectSpec->selectSet = ctx->selectSet_datacenterToNetwork;
             } else {
                 virReportError(VIR_ERR_INTERNAL_ERROR,
-                               _("Invalid lookup of '%s' from '%s'"),
+                               _("Invalid lookup of '%1$s' from '%2$s'"),
                                type, root->type);
                 goto cleanup;
             }
         } else {
             virReportError(VIR_ERR_INTERNAL_ERROR,
-                           _("Invalid lookup from '%s'"), root->type);
+                           _("Invalid lookup from '%1$s'"), root->type);
             goto cleanup;
         }
     }
@@ -2041,13 +2038,13 @@ esxVI_LookupObjectContentByType(esxVI_Context *ctx,
 
           case esxVI_Occurrence_RequiredItem:
             virReportError(VIR_ERR_INTERNAL_ERROR,
-                           _("Could not lookup '%s' from '%s'"),
+                           _("Could not lookup '%1$s' from '%2$s'"),
                            type, root->type);
             break;
 
           case esxVI_Occurrence_RequiredList:
             virReportError(VIR_ERR_INTERNAL_ERROR,
-                           _("Could not lookup '%s' list from '%s'"),
+                           _("Could not lookup '%1$s' list from '%2$s'"),
                            type, root->type);
             break;
 
@@ -2106,8 +2103,8 @@ esxVI_GetManagedEntityStatus(esxVI_ObjectContent *objectContent,
     }
 
     virReportError(VIR_ERR_INTERNAL_ERROR,
-                   _("Missing '%s' property while looking for "
-                     "ManagedEntityStatus"), propertyName);
+                   _("Missing '%1$s' property while looking for ManagedEntityStatus"),
+                   propertyName);
 
     return -1;
 }
@@ -2201,7 +2198,7 @@ esxVI_GetBoolean(esxVI_ObjectContent *objectContent, const char *propertyName,
     if (*value == esxVI_Boolean_Undefined &&
         occurrence == esxVI_Occurrence_RequiredItem) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("Missing '%s' property"), propertyName);
+                       _("Missing '%1$s' property"), propertyName);
         return -1;
     }
 
@@ -2230,7 +2227,7 @@ esxVI_GetInt(esxVI_ObjectContent *objectContent, const char *propertyName,
 
     if (!(*value) && occurrence == esxVI_Occurrence_RequiredItem) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("Missing '%s' property"), propertyName);
+                       _("Missing '%1$s' property"), propertyName);
         return -1;
     }
 
@@ -2259,7 +2256,7 @@ esxVI_GetLong(esxVI_ObjectContent *objectContent, const char *propertyName,
 
     if (!(*value) && occurrence == esxVI_Occurrence_RequiredItem) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("Missing '%s' property"), propertyName);
+                       _("Missing '%1$s' property"), propertyName);
         return -1;
     }
 
@@ -2292,7 +2289,7 @@ esxVI_GetStringValue(esxVI_ObjectContent *objectContent,
 
     if (!(*value) && occurrence == esxVI_Occurrence_RequiredItem) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("Missing '%s' property"), propertyName);
+                       _("Missing '%1$s' property"), propertyName);
         return -1;
     }
 
@@ -2325,7 +2322,7 @@ esxVI_GetManagedObjectReference(esxVI_ObjectContent *objectContent,
 
     if (!(*value) && occurrence == esxVI_Occurrence_RequiredItem) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("Missing '%s' property"), propertyName);
+                       _("Missing '%1$s' property"), propertyName);
         return -1;
     }
 
@@ -2404,7 +2401,7 @@ esxVI_GetVirtualMachineIdentity(esxVI_ObjectContent *virtualMachine,
         if (esxUtil_ParseVirtualMachineIDString
               (virtualMachine->obj->value, id) < 0 || *id <= 0) {
             virReportError(VIR_ERR_INTERNAL_ERROR,
-                           _("Could not parse positive integer from '%s'"),
+                           _("Could not parse positive integer from '%1$s'"),
                            virtualMachine->obj->value);
             goto failure;
         }
@@ -2473,7 +2470,7 @@ esxVI_GetVirtualMachineIdentity(esxVI_ObjectContent *virtualMachine,
 
             if (virUUIDParse(uuid_string, uuid) < 0) {
                 virReportError(VIR_ERR_INTERNAL_ERROR,
-                               _("Could not parse UUID from string '%s'"),
+                               _("Could not parse UUID from string '%1$s'"),
                                uuid_string);
                 goto failure;
             }
@@ -2602,7 +2599,7 @@ esxVI_GetSnapshotTreeByName
         return 0;
     } else {
         virReportError(VIR_ERR_NO_DOMAIN_SNAPSHOT,
-                       _("Could not find snapshot with name '%s'"), name);
+                       _("Could not find snapshot with name '%1$s'"), name);
 
         return -1;
     }
@@ -2634,7 +2631,7 @@ esxVI_GetSnapshotTreeBySnapshot
     }
 
     virReportError(VIR_ERR_NO_DOMAIN_SNAPSHOT,
-                   _("Could not find domain snapshot with internal name '%s'"),
+                   _("Could not find domain snapshot with internal name '%1$s'"),
                    snapshot->value);
 
     return -1;
@@ -2697,7 +2694,7 @@ esxVI_LookupVirtualMachineByUuid(esxVI_Context *ctx, const unsigned char *uuid,
             goto cleanup;
         } else {
             virReportError(VIR_ERR_NO_DOMAIN,
-                           _("Could not find domain with UUID '%s'"),
+                           _("Could not find domain with UUID '%1$s'"),
                            uuid_string);
             goto cleanup;
         }
@@ -2761,7 +2758,7 @@ esxVI_LookupVirtualMachineByName(esxVI_Context *ctx, const char *name,
 
     if (!(*virtualMachine) && occurrence != esxVI_Occurrence_OptionalItem) {
         virReportError(VIR_ERR_NO_DOMAIN,
-                       _("Could not find domain with name '%s'"), name);
+                       _("Could not find domain with name '%1$s'"), name);
         goto cleanup;
     }
 
@@ -2888,7 +2885,7 @@ esxVI_LookupDatastoreByName(esxVI_Context *ctx, const char *name,
 
     if (!(*datastore) && occurrence != esxVI_Occurrence_OptionalItem) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("Could not find datastore with name '%s'"), name);
+                       _("Could not find datastore with name '%1$s'"), name);
         goto cleanup;
     }
 
@@ -2970,7 +2967,7 @@ esxVI_LookupDatastoreByAbsolutePath(esxVI_Context *ctx,
 
     if (!(*datastore) && occurrence != esxVI_Occurrence_OptionalItem) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("Could not find datastore containing absolute path '%s'"),
+                       _("Could not find datastore containing absolute path '%1$s'"),
                        absolutePath);
         goto cleanup;
     }
@@ -3379,7 +3376,7 @@ esxVI_LookupFileInfoByDatastorePath(esxVI_Context *ctx,
         if (directoryAndFileName[length] != '/' ||
             directoryAndFileName[length + 1] == '\0') {
             virReportError(VIR_ERR_INTERNAL_ERROR,
-                           _("Datastore path '%s' doesn't reference a file"),
+                           _("Datastore path '%1$s' doesn't reference a file"),
                            datastorePath);
             goto cleanup;
         }
@@ -3466,7 +3463,7 @@ esxVI_LookupFileInfoByDatastorePath(esxVI_Context *ctx,
 
     if (taskInfoState != esxVI_TaskInfoState_Success) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("Could not search in datastore '%s': %s"),
+                       _("Could not search in datastore '%1$s': %2$s"),
                        datastoreName, taskInfoErrorMessage);
         goto cleanup;
     }
@@ -3485,7 +3482,7 @@ esxVI_LookupFileInfoByDatastorePath(esxVI_Context *ctx,
             goto cleanup;
         } else {
             virReportError(VIR_ERR_NO_STORAGE_VOL,
-                           _("No storage volume with key or path '%s'"),
+                           _("No storage volume with key or path '%1$s'"),
                            datastorePath);
             goto cleanup;
         }
@@ -3604,7 +3601,7 @@ esxVI_LookupDatastoreContentByDatastoreName
 
     if (taskInfoState != esxVI_TaskInfoState_Success) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("Could not search in datastore '%s': %s"),
+                       _("Could not search in datastore '%1$s': %2$s"),
                        datastoreName, taskInfoErrorMessage);
         goto cleanup;
     }
@@ -3853,7 +3850,7 @@ esxVI_LookupPhysicalNicByName(esxVI_Context *ctx, const char *name,
 
     if (!(*physicalNic) && occurrence != esxVI_Occurrence_OptionalItem) {
         virReportError(VIR_ERR_NO_INTERFACE,
-                       _("Could not find physical NIC with name '%s'"), name);
+                       _("Could not find physical NIC with name '%1$s'"), name);
         goto cleanup;
     }
 
@@ -3897,7 +3894,7 @@ esxVI_LookupPhysicalNicByMACAddress(esxVI_Context *ctx, const char *mac,
 
     if (!(*physicalNic) && occurrence != esxVI_Occurrence_OptionalItem) {
         virReportError(VIR_ERR_NO_INTERFACE,
-                       _("Could not find physical NIC with MAC address '%s'"), mac);
+                       _("Could not find physical NIC with MAC address '%1$s'"), mac);
         goto cleanup;
     }
 
@@ -3985,7 +3982,7 @@ esxVI_LookupHostVirtualSwitchByName(esxVI_Context *ctx, const char *name,
     if (!(*hostVirtualSwitch) &&
         occurrence != esxVI_Occurrence_OptionalItem) {
         virReportError(VIR_ERR_NO_NETWORK,
-                       _("Could not find HostVirtualSwitch with name '%s'"),
+                       _("Could not find HostVirtualSwitch with name '%1$s'"),
                        name);
         goto cleanup;
     }
@@ -4098,17 +4095,15 @@ esxVI_HandleVirtualMachineQuestion
     if (autoAnswer) {
         if (!possibleAnswers) {
             virReportError(VIR_ERR_INTERNAL_ERROR,
-                           _("Pending question blocks virtual machine execution, "
-                             "question is '%s', no possible answers"),
+                           _("Pending question blocks virtual machine execution, question is '%1$s', no possible answers"),
                            questionInfo->text);
 
             *blocked = true;
             return -1;
         } else if (!answerChoice) {
             virReportError(VIR_ERR_INTERNAL_ERROR,
-                           _("Pending question blocks virtual machine execution, "
-                             "question is '%s', possible answers are %s, but no "
-                             "default answer is specified"), questionInfo->text,
+                           _("Pending question blocks virtual machine execution, question is '%1$s', possible answers are %2$s, but no default answer is specified"),
+                           questionInfo->text,
                            possibleAnswers);
 
             *blocked = true;
@@ -4127,13 +4122,11 @@ esxVI_HandleVirtualMachineQuestion
     } else {
         if (possibleAnswers) {
             virReportError(VIR_ERR_INTERNAL_ERROR,
-                           _("Pending question blocks virtual machine execution, "
-                             "question is '%s', possible answers are %s"),
+                           _("Pending question blocks virtual machine execution, question is '%1$s', possible answers are %2$s"),
                            questionInfo->text, possibleAnswers);
         } else {
             virReportError(VIR_ERR_INTERNAL_ERROR,
-                           _("Pending question blocks virtual machine execution, "
-                             "question is '%s', no possible answers"),
+                           _("Pending question blocks virtual machine execution, question is '%1$s', no possible answers"),
                            questionInfo->text);
         }
 
@@ -4348,7 +4341,7 @@ esxVI_ParseHostCpuIdInfo(esxVI_ParsedHostCpuIdInfo *parsedHostCpuIdInfo,
     for (r = 0; r < 4; ++r) {
         if (strlen(input[r]) != expectedLength) {
             virReportError(VIR_ERR_INTERNAL_ERROR,
-                           _("HostCpuIdInfo register '%s' has an unexpected length"),
+                           _("HostCpuIdInfo register '%1$s' has an unexpected length"),
                            name[r]);
             return -1;
         }
@@ -4362,7 +4355,7 @@ esxVI_ParseHostCpuIdInfo(esxVI_ParsedHostCpuIdInfo *parsedHostCpuIdInfo,
 
             if (i + 4 < expectedLength && input[r][i + 4] != ':') {
                 virReportError(VIR_ERR_INTERNAL_ERROR,
-                               _("HostCpuIdInfo register '%s' has an unexpected format"),
+                               _("HostCpuIdInfo register '%1$s' has an unexpected format"),
                                name[r]);
                 return -1;
             }
@@ -4499,7 +4492,7 @@ esxVI_LookupHostInternetScsiHbaStaticTargetByName
     if (!candidate) {
         if (occurrence == esxVI_Occurrence_RequiredItem) {
             virReportError(VIR_ERR_NO_STORAGE_POOL,
-                           _("Could not find storage pool with name: %s"), name);
+                           _("Could not find storage pool with name: %1$s"), name);
         }
 
         goto cleanup;
@@ -4939,7 +4932,7 @@ esxVI_LookupManagedObjectHelper(esxVI_Context *ctx,
 
     if (!esxVI_String_ListContainsValue(propertyNameList, "name")) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("Missing 'name' property in %s lookup"), type);
+                       _("Missing 'name' property in %1$s lookup"), type);
         goto cleanup;
     }
 
@@ -4978,10 +4971,10 @@ esxVI_LookupManagedObjectHelper(esxVI_Context *ctx,
         if (occurrence != esxVI_Occurrence_OptionalItem) {
             if (name) {
                 virReportError(VIR_ERR_INTERNAL_ERROR,
-                               _("Could not find %s with name '%s'"), type, name);
+                               _("Could not find %1$s with name '%2$s'"), type, name);
             } else {
                 virReportError(VIR_ERR_INTERNAL_ERROR,
-                               _("Could not find %s"), type);
+                               _("Could not find %1$s"), type);
             }
 
             goto cleanup;
diff --git a/src/esx/esx_vi_types.c b/src/esx/esx_vi_types.c
index 15f8f957e2..96c131f618 100644
--- a/src/esx/esx_vi_types.c
+++ b/src/esx/esx_vi_types.c
@@ -80,7 +80,7 @@ VIR_LOG_INIT("esx.esx_vi_types");
         if (item->_type <= esxVI_Type_Undefined || \
             item->_type >= esxVI_Type_Other) { \
             virReportError(VIR_ERR_INTERNAL_ERROR, \
-                           _("%s object has invalid dynamic type"), typeName);\
+                           _("%1$s object has invalid dynamic type"), typeName);\
             return -1; \
         } \
  \
@@ -206,8 +206,7 @@ VIR_LOG_INIT("esx.esx_vi_types");
     { \
         if (anyType->type != esxVI_Type_##_type) { \
             virReportError(VIR_ERR_INTERNAL_ERROR, \
-                           _("Call to %s for unexpected type '%s', " \
-                             "expected '%s'"), \
+                           _("Call to %1$s for unexpected type '%2$s', expected '%3$s'"), \
                            __FUNCTION__, anyType->other, \
                            esxVI_Type_ToString(esxVI_Type_##_type)); \
             return -1; \
@@ -221,8 +220,7 @@ VIR_LOG_INIT("esx.esx_vi_types");
     { \
         if (anyType->type != esxVI_Type_##_type) { \
             virReportError(VIR_ERR_INTERNAL_ERROR, \
-                           _("Call to %s for unexpected type '%s', " \
-                             "expected '%s'"), \
+                           _("Call to %1$s for unexpected type '%2$s', expected '%3$s'"), \
                            __FUNCTION__, anyType->other, \
                            esxVI_Type_ToString(esxVI_Type_##_type)); \
             return -1; \
@@ -294,7 +292,7 @@ VIR_LOG_INIT("esx.esx_vi_types");
              childNode = childNode->next) { \
             if (childNode->type != XML_ELEMENT_NODE) { \
                 virReportError(VIR_ERR_INTERNAL_ERROR, \
-                               _("Wrong XML element type %d"), \
+                               _("Wrong XML element type %1$d"), \
                                childNode->type); \
                 goto failure; \
             } \
@@ -346,21 +344,21 @@ VIR_LOG_INIT("esx.esx_vi_types");
  \
         if (!string) { \
             virReportError(VIR_ERR_INTERNAL_ERROR, \
-                           _("XML node doesn't contain text, expecting an %s "\
-                             "value"), _xsdType); \
+                           _("XML node doesn't contain text, expecting an %1$s value"), \
+                           _xsdType); \
             goto cleanup; \
         } \
  \
         if (virStrToLong_ll(string, NULL, 10, &value) < 0) { \
             virReportError(VIR_ERR_INTERNAL_ERROR, \
-                           _("Unknown value '%s' for %s"), string, _xsdType); \
+                           _("Unknown value '%1$s' for %2$s"), string, _xsdType); \
             goto cleanup; \
         } \
  \
         if (((_min) != INT64_MIN && value < (_min)) \
             || ((_max) != INT64_MAX && value > (_max))) { \
             virReportError(VIR_ERR_INTERNAL_ERROR, \
-                           _("Value '%s' is not representable as %s"), \
+                           _("Value '%1$s' is not representable as %2$s"), \
                            string, _xsdType); \
             goto cleanup; \
         } \
@@ -483,7 +481,7 @@ VIR_LOG_INIT("esx.esx_vi_types");
 #define ESX_VI__TEMPLATE__PROPERTY__REQUIRE(_name) \
     if (item->_name == 0) { \
         virReportError(VIR_ERR_INTERNAL_ERROR, \
-                       _("%s object is missing the required '%s' property"), \
+                       _("%1$s object is missing the required '%2$s' property"), \
                        typeName, #_name); \
         return -1; \
     }
@@ -540,7 +538,7 @@ VIR_LOG_INIT("esx.esx_vi_types");
  \
       default: \
         virReportError(VIR_ERR_INTERNAL_ERROR, \
-                       _("Call to %s for unexpected type '%s'"), \
+                       _("Call to %1$s for unexpected type '%2$s'"), \
                        __FUNCTION__, _actual_type_name); \
         return _error_return; \
     }
@@ -686,7 +684,7 @@ VIR_LOG_INIT("esx.esx_vi_types");
  \
         default: \
           virReportError(VIR_ERR_INTERNAL_ERROR, \
-                         _("Call to %s for unexpected type '%s'"), \
+                         _("Call to %1$s for unexpected type '%2$s'"), \
                          __FUNCTION__, esxVI_Type_ToString(type)); \
           return -1; \
       }, \
@@ -720,7 +718,7 @@ esxVI_GetActualObjectType(xmlNodePtr node, esxVI_Type baseType,
 
     if (*actualType == esxVI_Type_Undefined || *actualType == esxVI_Type_Other) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("Unknown value '%s' for %s 'type' property"),
+                       _("Unknown value '%1$s' for %2$s 'type' property"),
                        type, esxVI_Type_ToString(baseType));
         return -1;
     }
@@ -740,7 +738,7 @@ esxVI_GetActualObjectType(xmlNodePtr node, esxVI_Type baseType,
     if (item->_name == 0 && \
         esxVI_String_ListContainsValue(selectedPropertyNameList, #_name)) { \
         virReportError(VIR_ERR_INTERNAL_ERROR, \
-                       _("%s object is missing the required '%s' property"), \
+                       _("%1$s object is missing the required '%2$s' property"), \
                        typeName, #_name); \
         return -1; \
     }
@@ -757,7 +755,7 @@ esxVI_GetActualObjectType(xmlNodePtr node, esxVI_Type baseType,
         if (item->_type <= esxVI_Type_Undefined || \
             item->_type >= esxVI_Type_Other) { \
             virReportError(VIR_ERR_INTERNAL_ERROR, \
-                           _("%s object has invalid dynamic type"), typeName);\
+                           _("%1$s object has invalid dynamic type"), typeName);\
             return -1; \
         } \
  \
@@ -910,7 +908,7 @@ esxVI_AnyType_ExpectType(esxVI_AnyType *anyType, esxVI_Type type)
 {
     if (anyType->type != type) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("Expecting type '%s' but found '%s'"),
+                       _("Expecting type '%1$s' but found '%2$s'"),
                        esxVI_Type_ToString(type),
                        esxVI_AnyType_TypeToString(anyType));
         return -1;
@@ -1014,7 +1012,7 @@ esxVI_AnyType_Deserialize(xmlNodePtr node, esxVI_AnyType **anyType)
 
     if ((*anyType)->type == esxVI_Type_Undefined) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("Unknown value '%s' for AnyType 'type' property"),
+                       _("Unknown value '%1$s' for AnyType 'type' property"),
                        (*anyType)->other);
         goto failure;
     }
@@ -1029,7 +1027,7 @@ esxVI_AnyType_Deserialize(xmlNodePtr node, esxVI_AnyType **anyType)
         do { \
             if (virStrToLong_ll((*anyType)->value, NULL, 10, &number) < 0) { \
                 virReportError(VIR_ERR_INTERNAL_ERROR, \
-                               _("Unknown value '%s' for %s"), \
+                               _("Unknown value '%1$s' for %2$s"), \
                                (*anyType)->value, _xsdType); \
                 goto failure; \
             } \
@@ -1037,7 +1035,7 @@ esxVI_AnyType_Deserialize(xmlNodePtr node, esxVI_AnyType **anyType)
             if (((_min) != INT64_MIN && number < (_min)) \
                 || ((_max) != INT64_MAX && number > (_max))) { \
                 virReportError(VIR_ERR_INTERNAL_ERROR, \
-                               _("Value '%s' is out of %s range"), \
+                               _("Value '%1$s' is out of %2$s range"), \
                                (*anyType)->value, _xsdType); \
                 goto failure; \
             } \
@@ -1053,7 +1051,7 @@ esxVI_AnyType_Deserialize(xmlNodePtr node, esxVI_AnyType **anyType)
             (*anyType)->boolean = esxVI_Boolean_False;
         } else {
             virReportError(VIR_ERR_INTERNAL_ERROR,
-                           _("Unknown value '%s' for xsd:boolean"),
+                           _("Unknown value '%1$s' for xsd:boolean"),
                            (*anyType)->value);
             goto failure;
         }
@@ -1499,7 +1497,7 @@ esxVI_DateTime_ConvertToCalendarTime(esxVI_DateTime *dateTime,
         /* second */
         virStrToLong_i(tmp+1, &tmp, 10, &sec) < 0) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("xsd:dateTime value '%s' has unexpected format"),
+                       _("xsd:dateTime value '%1$s' has unexpected format"),
                        dateTime->value);
         return -1;
     }
@@ -1509,7 +1507,7 @@ esxVI_DateTime_ConvertToCalendarTime(esxVI_DateTime *dateTime,
         if (*tmp == '.' &&
             virStrToLong_i(tmp + 1, &tmp, 10, &milliseconds) < 0) {
             virReportError(VIR_ERR_INTERNAL_ERROR,
-                           _("xsd:dateTime value '%s' has unexpected format"),
+                           _("xsd:dateTime value '%1$s' has unexpected format"),
                            dateTime->value);
             return -1;
         }
@@ -1521,7 +1519,7 @@ esxVI_DateTime_ConvertToCalendarTime(esxVI_DateTime *dateTime,
             tz = g_time_zone_new_utc();
         } else {
             virReportError(VIR_ERR_INTERNAL_ERROR,
-                           _("xsd:dateTime value '%s' has unexpected format"),
+                           _("xsd:dateTime value '%1$s' has unexpected format"),
                            dateTime->value);
             return -1;
         }
@@ -1771,7 +1769,7 @@ ESX_VI__TEMPLATE__DESERIALIZE_EXTRA(Event, /* nothing */,
 
     if (!(*ptrptr)->_actualType) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("%s is missing 'type' property"),
+                       _("%1$s is missing 'type' property"),
                        esxVI_Type_ToString((*ptrptr)->_type));
         goto failure;
     }
-- 
2.39.2




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux