]> git.ipfire.org Git - thirdparty/libvirt.git/commit
build: detect all improper uses of _("%s")
authorEric Blake <eblake@redhat.com>
Tue, 10 Jul 2012 21:43:08 +0000 (15:43 -0600)
committerEric Blake <eblake@redhat.com>
Tue, 10 Jul 2012 21:49:41 +0000 (15:49 -0600)
commit0867a87721cc2a6be1ddb90363703f842b687bb3
tree76576b3e7732f0da1d94091308537cdd6e374e17
parent4036aa91bff6482cf4c136c93277619fa8ec6f94
build: detect all improper uses of _("%s")

The only useful translation of "%s" as a format string is "%s" (I
suppose you could claim "%1$s" is also valid, but why bother).  So
it is not worth translating; fixing this exposes some instances
where we were failing to translate real error messages.  This makes
the fix of commit 097da1ab more generic, as well as ensuring no
future regressions.

* cfg.mk (sc_prohibit_useless_translation): New rule.
* src/lxc/lxc_driver.c (lxcSetVcpuBWLive): Fix offender.
* src/openvz/openvz_conf.c (openvzReadFSConf): Likewise.
* src/qemu/qemu_cgroup.c (qemuSetupCgroupForVcpu): Likewise.
* src/qemu/qemu_driver.c (qemuSetVcpusBWLive): Likewise.
* src/xenapi/xenapi_utils.c (xenapiSessionErrorHandle): Likewise.
cfg.mk
src/lxc/lxc_driver.c
src/openvz/openvz_conf.c
src/qemu/qemu_cgroup.c
src/qemu/qemu_driver.c
src/xenapi/xenapi_utils.c