[epiphany] Prefer common_name to name when reading ISO 3166 data



commit 6d5f146240f35c5f678f32101872c243cd636d55
Author: Ting-Wei Lan <lantw src gnome org>
Date:   Tue Nov 15 19:07:01 2016 +0800

    Prefer common_name to name when reading ISO 3166 data
    
    https://bugzilla.gnome.org/show_bug.cgi?id=774466

 lib/ephy-langs.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/lib/ephy-langs.c b/lib/ephy-langs.c
index cbeb70b..4b2ce5f 100644
--- a/lib/ephy-langs.c
+++ b/lib/ephy-langs.c
@@ -182,7 +182,9 @@ read_iso_3166_entry (xmlTextReaderPtr reader,
   xmlChar *code, *name;
 
   code = xmlTextReaderGetAttribute (reader, (const xmlChar *)"alpha_2_code");
-  name = xmlTextReaderGetAttribute (reader, (const xmlChar *)"name");
+  name = xmlTextReaderGetAttribute (reader, (const xmlChar *)"common_name");
+  if (name == NULL)
+    name = xmlTextReaderGetAttribute (reader, (const xmlChar *)"name");
 
   if (code != NULL && code[0] != '\0' && name != NULL && name[0] != '\0') {
     char *lcode;


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