[gtk+] Fix extraction of some translatable strings



commit ac7c6b25bd543309abbae64dd2705bb44ff5fcda
Author: Matthias Clasen <mclasen redhat com>
Date:   Tue Dec 17 07:35:10 2013 -0500

    Fix extraction of some translatable strings
    
    The reason why some of the strings in gtkprintunixdialog.ui
    were missing is that we did not extract translatable string
    from <item> elements. Fix that.

 gtk/extract-strings.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/gtk/extract-strings.c b/gtk/extract-strings.c
index 0fec66f..df20d21 100644
--- a/gtk/extract-strings.c
+++ b/gtk/extract-strings.c
@@ -35,7 +35,8 @@ start_element_handler (GMarkupParseContext  *contexts,
 {
   ParserData *data = user_data;
 
-  if (g_str_equal (element_name, "property"))
+  if (g_str_equal (element_name, "property") ||
+      g_str_equal (element_name, "item"))
     {
       gboolean translatable;
       gchar *context;
@@ -45,7 +46,7 @@ start_element_handler (GMarkupParseContext  *contexts,
                                    attribute_names,
                                    attribute_values,
                                    error,
-                                   G_MARKUP_COLLECT_STRING, "name", NULL,
+                                   G_MARKUP_COLLECT_STRING|G_MARKUP_COLLECT_OPTIONAL, "name", NULL,
                                    G_MARKUP_COLLECT_TRISTATE, "translatable", &translatable,
                                    G_MARKUP_COLLECT_STRDUP|G_MARKUP_COLLECT_OPTIONAL, "context", &context,
                                    G_MARKUP_COLLECT_STRDUP|G_MARKUP_COLLECT_OPTIONAL, "comments", &comments,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]