[gtranslator] Fix loading PO when Project-Id-Version isn't the first field; checking msgid should be more stable



commit 5564c4912bf41e18aaa522c4f6544fb9847c9e1d
Author: SeÃn de BÃrca <leftmostcat gmail com>
Date:   Sun Apr 22 15:18:27 2012 -0600

    Fix loading PO when Project-Id-Version isn't the first field; checking msgid should be more stable

 src/gtr-po.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/gtr-po.c b/src/gtr-po.c
index d8ab9eb..572cf1e 100644
--- a/src/gtr-po.c
+++ b/src/gtr-po.c
@@ -397,7 +397,7 @@ _gtr_po_load (GtrPo * po, GFile * location, GError ** error)
   struct po_xerror_handler handler;
   po_message_iterator_t iter;
   po_message_t message;
-  const gchar *msgstr;
+  const gchar *msgid;
   gchar *filename;
 
   /*
@@ -453,9 +453,9 @@ _gtr_po_load (GtrPo * po, GFile * location, GError ** error)
 
   iter = po_message_iterator (priv->gettext_po_file, NULL);
   message = po_next_message (iter);
-  msgstr = po_message_msgstr (message);
+  msgid = po_message_msgid (message);
 
-  if (!strncmp (msgstr, "Project-Id-Version: ", 20))
+  if (!strcmp (msgid, ""))
     priv->header = gtr_header_new (iter, message);
   else
     {



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