tools: Update format strings in translated messages (part 1)

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
Jiri Denemark
2023-03-09 15:54:42 +01:00
parent 90d8652438
commit 9ec91376cd
8 changed files with 310 additions and 322 deletions

View File

@@ -328,7 +328,7 @@ cmdDomMemStat(vshControl *ctl, const vshCmd *cmd)
return false;
if (rv > 0) {
if (period < 0) {
vshError(ctl, _("Invalid collection period value '%d'"), period);
vshError(ctl, _("Invalid collection period value '%1$d'"), period);
return false;
}
@@ -342,7 +342,7 @@ cmdDomMemStat(vshControl *ctl, const vshCmd *cmd)
nr_stats = virDomainMemoryStats(dom, stats, VIR_DOMAIN_MEMORY_STAT_NR, 0);
if (nr_stats == -1) {
vshError(ctl, _("Failed to get memory statistics for domain %s"), name);
vshError(ctl, _("Failed to get memory statistics for domain %1$s"), name);
return false;
}
@@ -812,9 +812,9 @@ cmdDomIfGetLink(vshControl *ctl, const vshCmd *cmd)
if (ninterfaces < 1) {
if (macstr[0])
vshError(ctl, _("Interface (mac: %s) not found."), macstr);
vshError(ctl, _("Interface (mac: %1$s) not found."), macstr);
else
vshError(ctl, _("Interface (dev: %s) not found."), iface);
vshError(ctl, _("Interface (dev: %1$s) not found."), iface);
return false;
} else if (ninterfaces > 1) {
@@ -987,14 +987,14 @@ cmdDomblkstat(vshControl *ctl, const vshCmd *cmd)
if (virDomainBlockStats(dom, device, &stats,
sizeof(stats)) == -1) {
vshError(ctl, _("Failed to get block stats %s %s"),
vshError(ctl, _("Failed to get block stats %1$s %2$s"),
name, device);
return false;
}
/* human friendly output */
if (human) {
vshPrint(ctl, N_("Device: %s\n"), device);
vshPrint(ctl, N_("Device: %1$s\n"), device);
device = "";
}
@@ -1006,13 +1006,13 @@ cmdDomblkstat(vshControl *ctl, const vshCmd *cmd)
} else {
params = g_new0(virTypedParameter, nparams);
if (virDomainBlockStatsFlags(dom, device, params, &nparams, 0) < 0) {
vshError(ctl, _("Failed to get block stats for domain '%s' device '%s'"), name, device);
vshError(ctl, _("Failed to get block stats for domain '%1$s' device '%2$s'"), name, device);
return false;
}
/* set for prettier output */
if (human) {
vshPrint(ctl, N_("Device: %s\n"), device);
vshPrint(ctl, N_("Device: %1$s\n"), device);
device = "";
}
@@ -1098,7 +1098,7 @@ cmdDomIfstat(vshControl *ctl, const vshCmd *cmd)
return false;
if (virDomainInterfaceStats(dom, device, &stats, sizeof(stats)) == -1) {
vshError(ctl, _("Failed to get interface stats %s %s"), name, device);
vshError(ctl, _("Failed to get interface stats %1$s %2$s"), name, device);
return false;
}
@@ -1463,9 +1463,9 @@ cmdDomTime(vshControl *ctl, const vshCmd *cmd)
then = g_date_time_new_from_unix_utc(seconds);
thenstr = g_date_time_format(then, "%Y-%m-%d %H:%M:%S");
vshPrint(ctl, _("Time: %s"), thenstr);
vshPrint(ctl, _("Time: %1$s"), thenstr);
} else {
vshPrint(ctl, _("Time: %lld"), seconds);
vshPrint(ctl, _("Time: %1$lld"), seconds);
}
}
@@ -2321,7 +2321,7 @@ cmdDomIfAddr(vshControl *ctl, const vshCmd *cmd)
if (sourcestr &&
(source = virshDomainInterfaceAddressesSourceTypeFromString(sourcestr)) < 0) {
vshError(ctl, _("Unknown data source '%s'"), sourcestr);
vshError(ctl, _("Unknown data source '%1$s'"), sourcestr);
return false;
}