All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Daniel P. Berrange" <berrange@redhat.com>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] Translation of strings in QEMU w/ gettext ?
Date: Tue, 2 Jun 2015 14:20:18 +0100	[thread overview]
Message-ID: <20150602132018.GE19508@redhat.com> (raw)
In-Reply-To: <20150602125634.GD19508@redhat.com>

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 :|

  reply	other threads:[~2015-06-02 13:20 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-02 12:56 [Qemu-devel] Translation of strings in QEMU w/ gettext ? Daniel P. Berrange
2015-06-02 13:20 ` Daniel P. Berrange [this message]
2015-06-02 14:34 ` Kevin Wolf
2015-06-02 14:40   ` Daniel P. Berrange
2015-06-03  7:28     ` Markus Armbruster
2015-06-02 14:53 ` Paolo Bonzini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150602132018.GE19508@redhat.com \
    --to=berrange@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.