Bug 559962 - libguestfs C programs don't set locale, therefore localization doesn't work
Summary: libguestfs C programs don't set locale, therefore localization doesn't work
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Virtualization Tools
Classification: Community
Component: libguestfs
Version: unspecified
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Richard W.M. Jones
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-01-29 13:43 UTC by Richard W.M. Jones
Modified: 2010-03-16 17:26 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2010-01-29 17:15:53 UTC
Embargoed:


Attachments (Terms of Use)

Description Richard W.M. Jones 2010-01-29 13:43:21 UTC
Steps to Reproduce:
1. Install libguestfs 1.0.82 from Fedora.
2. LANG=pa strace -o /tmp/log -s 1500 guestfish --cmd-help
  
Actual results:

Output of guestfish is not localized.
strace log file /tmp/log contains no references to 'locale',
'/usr/share/locale', 'pa.mo' etc.

Expected results:

Output of guestfish should be localized.

Additional info:

We need to modify all C libguestfs programs to call
something like this:

setlocale(LC_ALL, "");
bindtextdomain(GETTEXT_PACKAGE, LOCALEBASEDIR);
textdomain(GETTEXT_PACKAGE);

(virsh q.v.:
http://libvirt.org/git/?p=libvirt.git;a=blob;f=tools/virsh.c;h=1fae5e6169f20480b0ccc9e22b0a33a7eeb67e0a;hb=HEAD#l8976 )

Comment 1 Richard W.M. Jones 2010-01-29 14:54:59 UTC
(In reply to comment #0)
> 2. LANG=pa strace -o /tmp/log -s 1500 guestfish --cmd-help

This isn't quite accurate.  The actual test command is:

LANG=pa_IN.UTF-8 strace -o /tmp/log -s 1500 guestfish --cmd-help

However this still doesn't work.


Note You need to log in before you can comment on or make changes to this bug.