[libvirt] [PATCH] virsh: Honour user locale in cmdList

Michal Privoznik posted 1 patch 5 years, 7 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/feb01bd5683390e6b39d6a45266667c62118b244.1537345584.git.mprivozn@redhat.com
tools/virsh-domain-monitor.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
[libvirt] [PATCH] virsh: Honour user locale in cmdList
Posted by Michal Privoznik 5 years, 7 months ago
In 2e97450425e we've mistakenly removed gettext macro for
translating static strings. This results in table header being
printed in English regardless of user locale.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
---
 tools/virsh-domain-monitor.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/virsh-domain-monitor.c b/tools/virsh-domain-monitor.c
index adc5bb1a7a..8962586d76 100644
--- a/tools/virsh-domain-monitor.c
+++ b/tools/virsh-domain-monitor.c
@@ -1942,9 +1942,9 @@ cmdList(vshControl *ctl, const vshCmd *cmd)
     /* print table header in legacy mode */
     if (optTable) {
         if (optTitle)
-            table = vshTableNew("Id", "Name", "State", "Title", NULL);
+            table = vshTableNew(_("Id"), _("Name"), _("State"), _("Title"), NULL);
         else
-            table = vshTableNew("Id", "Name", "State", NULL);
+            table = vshTableNew(_("Id"), _("Name"), _("State"), NULL);
 
         if (!table)
             goto cleanup;
-- 
2.16.4

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH] virsh: Honour user locale in cmdList
Posted by Erik Skultety 5 years, 7 months ago
On Wed, Sep 19, 2018 at 10:26:41AM +0200, Michal Privoznik wrote:
> In 2e97450425e we've mistakenly removed gettext macro for
> translating static strings. This results in table header being
> printed in English regardless of user locale.
>
> Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
> ---

Reviewed-by: Erik Skultety <eskultet@redhat.com>

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list