RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 682121 - virsh help iface-name bug on Japanese Environment
Summary: virsh help iface-name bug on Japanese Environment
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt
Version: 6.0
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: rc
: ---
Assignee: Eric Blake
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-03-04 08:25 UTC by Tatsuo Kawasaki
Modified: 2011-12-06 10:55 UTC (History)
10 users (show)

Fixed In Version: libvirt-0.9.3-1.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-12-06 10:55:09 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:1513 0 normal SHIPPED_LIVE libvirt bug fix and enhancement update 2011-12-06 01:23:30 UTC

Description Tatsuo Kawasaki 2011-03-04 08:25:08 UTC
Description of problem:

Translation Bug (Typo)


Steps to Reproduce:
1.LANG=ja_JP virsh help iface-name
or
1.virsh
2.virsh # help iface-name
3.
  
Actual results:

  名前
    iface-name - convert an interface MAC address to interface name

  形式
    iface-name <interface>

  詳細
    Project-Id-Version: ja
Report-Msgid-Bugs-To: libvir-list
POT-Creation-Date: 2010-04-30 18:31+0200
PO-Revision-Date: 2009-09-24 10:12+0900
Last-Translator: Kiyoto Hashida <khashida>
Language-Team: Japanese <jp>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Generator: KBabel 1.11.4
Plural-Forms: Plural-Forms: nplurals=1; plural=0;





  オプション
    [--interface] <string>  interface mac



Expected results:


  名前
    iface-name - convert an interface MAC address to interface name

  形式
    iface-name <interface>

  オプション
    [--interface] <string>  interface mac




Additional info:

Comment 2 RHEL Program Management 2011-04-04 02:06:43 UTC
Since RHEL 6.1 External Beta has begun, and this bug remains
unresolved, it has been rejected as it is not proposed as
exception or blocker.

Red Hat invites you to ask your support representative to
propose this request, if appropriate and relevant, in the
next release of Red Hat Enterprise Linux.

Comment 3 Ankit Patel 2011-06-17 05:48:18 UTC
Hi,

I have noticed that reported problem occurs for any non-English language. Also verified translation files (Po files), they all look clean.

Digging through the problem, I have tried to compare results between English(US) and Other languages like Japanese(ja_JP), found that there's issue with following lines of code in libvirt/tools/virsh.c file

  11393         if (desc[0]) {
  11394             /* Print the description only if it's not empty.  */
  11395             fputs(_("\n  DESCRIPTION\n"), stdout);
  11396             fprintf(stdout, "    %s\n", desc);
  11397         }

Please check these lines.

Thanks!
Ankit

Comment 5 Eric Blake 2011-06-20 20:13:48 UTC
(In reply to comment #3)

> Digging through the problem, I have tried to compare results between
> English(US) and Other languages like Japanese(ja_JP), found that there's issue
> with following lines of code in libvirt/tools/virsh.c file
> 
>   11393         if (desc[0]) {
>   11394             /* Print the description only if it's not empty.  */
>   11395             fputs(_("\n  DESCRIPTION\n"), stdout);
>   11396             fprintf(stdout, "    %s\n", desc);

No direct problem in those lines.  The first line should be translated in-place; the second (the fprintf of desc) should have been translated back where desc is declared several lines earlier:

        const char *desc = _(vshCmddefGetInfo(def, "desc"));

and that should happen correctly in the po file if all of the description strings are marked with N_() (I didn't spot any that were missing).

However, it DOES point out a flaw - the use of N_("") is a bug.  Gettext reserves the translation of the empty string for its own use, and therefore, it is a bug if we ever mark or translate an empty string.  And since we do have several instances of code such as:

static const vshCmdInfo info_pool_name[] = {
    {"help", N_("convert a pool UUID to pool name")},
    {"desc", ""},

that means that our initialization of desc must account for an unmarked empty string rather than blindly using _() on the description text.

I'll propose a patch upstream.

Comment 6 Eric Blake 2011-06-21 17:55:20 UTC
Will be picked up by the next rebase.

commit 491858bf3cd7b91029744287f6173f795b3108f9
Author: Eric Blake <eblake>
Date:   Mon Jun 20 14:25:08 2011 -0600

    virsh: avoid bogus description
    
    https://bugzilla.redhat.com/show_bug.cgi?id=682121
    
    Gettext reserves the empty string for internal use, and it must
    not be passed through _().  We were violating this for commands
    that (for whatever reason) used "" for their description.
    
    * tools/virsh.c (vshCmddefHelp): Don't translate empty string.
    Reported by Tatsuo Kawasaki.

Comment 8 yuping zhang 2011-07-06 07:32:12 UTC
Reproduced this issue on libvirt-0.9.2-1.el6.x86_64
#LANG=ja_JP virsh help iface-name

  名前
    iface-name - convert an interface MAC address to interface name

  形式
    iface-name <interface>

  詳細
    Project-Id-Version: ja
Report-Msgid-Bugs-To: libvir-list
POT-Creation-Date: 2010-04-30 18:31+0200
PO-Revision-Date: 2009-09-24 10:12+0900
Last-Translator: Kiyoto Hashida <khashida>
Language-Team: Japanese <jp>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Generator: KBabel 1.11.4
Plural-Forms: Plural-Forms: nplurals=1; plural=0;





  オプション
    [--interface] <string>  interface mac

Tested this issue with:

libvirt-0.9.3-1.el6
qemu-kvm-0.12.1.2-2.167.el6
kernel-2.6.32-164.el6

  名前
    iface-name - convert an interface MAC address to interface name

  形式
    iface-name <interface>

  オプション
    [--interface] <string>  interface mac

So change the status to VERIFIED.

Comment 9 errata-xmlrpc 2011-12-06 10:55:09 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2011-1513.html


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