From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42348) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yzm7E-0008Tz-15 for qemu-devel@nongnu.org; Tue, 02 Jun 2015 09:20:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yzm7B-00086E-Va for qemu-devel@nongnu.org; Tue, 02 Jun 2015 09:20:23 -0400 Received: from mx1.redhat.com ([209.132.183.28]:46244) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yzm7B-00085j-RY for qemu-devel@nongnu.org; Tue, 02 Jun 2015 09:20:21 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (Postfix) with ESMTPS id 8AF77B6A5E for ; Tue, 2 Jun 2015 13:20:21 +0000 (UTC) Received: from redhat.com (vpn1-4-233.ams2.redhat.com [10.36.4.233]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t52DKIm8016426 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Tue, 2 Jun 2015 09:20:20 -0400 Date: Tue, 2 Jun 2015 14:20:18 +0100 From: "Daniel P. Berrange" Message-ID: <20150602132018.GE19508@redhat.com> References: <20150602125634.GD19508@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20150602125634.GD19508@redhat.com> Subject: Re: [Qemu-devel] Translation of strings in QEMU w/ gettext ? Reply-To: "Daniel P. Berrange" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org On Tue, Jun 02, 2015 at 01:56:34PM +0100, Daniel P. Berrange wrote: > In my work on TLS encryption, I've been blindly adding gettext markers > around all error messages I raise. eg error_setg(errp, _("foo bar")); > I've done this out of habit, since most apps I work on translate all > strings that could end up visible by a user. > > Looking again at existing QEMU codebase though, I notice that adding > gettext _("...") markers is the exception, not the rule. > > $ git grep -l '_("' > disas/alpha.c > disas/arm.c > disas/i386.c > disas/m68k.c > disas/mips.c > disas/ppc.c > disas/sparc.c > scripts/dump-guest-memory.py > tcg/s390/tcg-target.c > tcg/sparc/tcg-target.h > ui/gtk.c > > Also, there are no .po file translations in QEMU source. I'm being blind. There is a po/ directory of course :-) The questions still stand though - should we be translating the rest of the source beyond those files listed above. > So I'm wondering if there is a long term vision / desire for translation > in QEMU or not ? > > In a number of cases libvirt includes the error message from QMP in the > message we pass back up to the user. Any errors from libvirt are always > translated, so if running libvirt in a non-en_US locale currently you > will get a translated message from libvirt which includes a bit english > text from QEMU. > > Also, with the GTK ui frontend of QEMU now, you'll get some translation > of the user interface menu options thanks to GTK built-in translations, > but the rest are still english, which is not very satisfactory either. > > Should we accept and/or encourage new patches to include translation > markers, or should we explicitly say we're never going to translate any > of QEMU and remove existing _("...") usage in the code ? > > I've got a bunch of patches which add _("...") and want to know whether > to remove them from my new code.... Regards, Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|