GNOME Bugzilla – Bug 696043
Show PO heaer entry with --help options
Last modified: 2013-03-19 13:08:44 UTC
Gnome-mahjongg shows a PO header entry with the --help option. This problem is the same as the Bug 695997. Please see it for more details. Problem ======= $ LANG=es_ES.utf8 gnome-mahjongg --help Uso: gnome-mahjongg [OPCIÓN…] Project-Id-Version: gnome-games.master Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?product=gnome-mahjongg&keywords=I18N+L10N&component=general POT-Creation-Date: 2013-01-28 23:17+0000 PO-Revision-Date: 2013-01-30 14:17+0100 Last-Translator: Daniel Mustieles <daniel.mustieles@gmail.com> Language-Team: Español <gnome-es-list@gnome.org> Language: es MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Plural-Forms: nplurals=2; plural=(n!=1); X-Generator: Gtranslator 2.91.5 X-Project-Style: gnome Opciones de ayuda: -h, --help Mostrar opciones de ayuda --help-all Muestra todas las opciones de ayuda --help-gtk Mostrar opciones GTK+ Opciones de la aplicación: --display=VISOR Visor [display] X que usar
Created attachment 239108 [details] [review] Patch for the bug I've attached a patch for the bug. Please see the Bug 695997#c1 for more details about the patch. https://bugzilla.gnome.org/show_bug.cgi?id=695997#c1
var context = new OptionContext (""); - context.set_translation_domain (GETTEXT_PACKAGE); The patch is wrong. Turning off the translations isn't the anwer; rather the problem is passing "" instead of NULL when creating the option context.
Thank you for the review. First, I don't disable any translation. Users can get the translated help and GUI. Do you mean that we need to pass null to OptionContext()? But the GLib documents don't say that null is permitted [1]. In fact, I got the following warning. If I make any mistakes, I'm sorry about that. $ jhbuild make (snip) Making all in src make[1]: Entering directory `/opt/gnome/checkout/gnome-mahjongg/src' VALAC gnome_mahjongg_vala.stamp game-view.vala:197.27-197.30: warning: Rsvg has been deprecated since 2.36.2. Use bindings distributed with librsvg-2.0 game-view.vala:140.20-140.23: warning: Rsvg has been deprecated since 2.36.2. Use bindings distributed with librsvg-2.0 gnome-mahjongg.vala:735.42-735.45: warning: Argument 1: Cannot pass null to non-null parameter type var context = new OptionContext (null); ^^^^ Compilation succeeded - 3 warning(s) (snip) $ jhbuild run valac --version Vala 0.19.0.4-1540d [1] https://developer.gnome.org/glib/unstable/glib-Commandline-option-parser.html#g-option-context-new
That's just some missing gobject-introspection annotations. Fixed on glib master and gtk+ master and 3-8, and going on g-o-i soon. Not sure how the vala bindings are updated, you may need to file a separate bug for them?
Filed as vala bug 696055.
Created attachment 239144 [details] [review] Pass null to OptionContext() Thank you! I reworked the patch to pass null. (But, as you know, the vala warning remains)
Review of attachment 239144 [details] [review]: Commited: 4658709ba0347c12285e102284cfe21c8f3966e2 Thank you.