diff src/protocols/msn/msn.c @ 6573:cc41123c684a

[gaim-migrate @ 7095] Bjoern Voigt writes: "As far as I can see, you commited a patch, which adds support for "Get User Info" on Yahoo and MSN. It's not my small Yahoo Get Info patch, it's the bigger one, which parses Yahoo and MSN profile pages. I prepared a patch for it, which adds i18n macros to this patch. Please commit the attached patch i18n21.patch. The patch works fine for Yahoo contacts with English language preference. Unfortunately the patch doesn't work with contacts with other language preferences. The problem is, that in Yahoo every user can set up a language for his/her profile. So http://profiles.yahoo.com/CONTACT can deliver English, German, French, ... pages, depending on CONTACT's preference. The yahoo_get_info() functions doesn't handle this and it's not easy to handle this. I have some ideas, how to fix this issue. I like to discuss this with the author of the patch or in gaim-devel." committer: Tailor Script <tailor@pidgin.im>
author Luke Schierer <lschiere@pidgin.im>
date Fri, 22 Aug 2003 20:06:18 +0000
parents e34907332e46
children a4622f1fb5a1
line wrap: on
line diff
--- a/src/protocols/msn/msn.c	Fri Aug 22 12:09:46 2003 +0000
+++ b/src/protocols/msn/msn.c	Fri Aug 22 20:06:18 2003 +0000
@@ -1167,7 +1167,7 @@
 
 	if (!url_text || !strcmp(url_text,"")) {
 		g_show_info_text(NULL, NULL, 2,
-				"<html><body><b>Error retrieving profile</b></body></html>", NULL);
+				_("<html><body><b>Error retrieving profile</b></body></html>"), NULL);
 		return;
 	}
 
@@ -1211,27 +1211,27 @@
 
 	/* extract their Name and put it in */
 	info_extract_field(stripped, url_text, "\tName", 0, "\t", '\n',
-			"Undisclosed", "Name", 0, NULL);
+			_("Undisclosed"), _("Name"), 0, NULL);
 
 	/* extract their Age and put it in */
 	info_extract_field(stripped, url_text, "\tAge", 0, "\t", '\n',
-			"Undisclosed", "Age", 0, NULL);
+			_("Undisclosed"), _("Age"), 0, NULL);
 
 	/* extract their Gender and put it in */
 	info_extract_field(stripped, url_text, "\tGender", 6, "\t", '\n',
-			"Undisclosed", "Gender", 0, NULL);
+			_("Undisclosed"), _("Gender"), 0, NULL);
 
 	/* extract their MaritalStatus and put it in */
 	info_extract_field(stripped, url_text, "\tMaritalStatus", 0, "\t", '\n',
-			"Undisclosed", "Marital Status", 0, NULL);
+			_("Undisclosed"), _("Marital Status"), 0, NULL);
 
 	/* extract their Location and put it in */
 	info_extract_field(stripped, url_text, "\tLocation", 0, "\t", '\n',
-			"Undisclosed", "Location", 0, NULL);
+			_("Undisclosed"), _("Location"), 0, NULL);
 
 	/* extract their Occupation and put it in */
 	info_extract_field(stripped, url_text, "\t Occupation", 6, "\t", '\n',
-			"Undisclosed", "Occupation", 0, NULL);
+			_("Undisclosed"), _("Occupation"), 0, NULL);
 
 	/* the fields, 'A Little About Me', 'Favorite Things', 'Hobbies and Interests',
 	 * 'Favorite Quote', and 'My Homepage' may or may not appear, in any combination.
@@ -1241,48 +1241,48 @@
 
 	/* check if they have A Little About Me */
 	if(!info_extract_field(stripped, url_text, "\tA Little About Me", 1, "Favorite Things", '\n',
-				NULL, "A Little About Me", 0, NULL))
+				NULL, _("A Little About Me"), 0, NULL))
 		if(!info_extract_field(stripped, url_text, "\tA Little About Me", 1, "Hobbies and Interests", '\n',
-					NULL, "A Little About Me", 0, NULL))
+					NULL, _("A Little About Me"), 0, NULL))
 			if(!info_extract_field(stripped, url_text, "\tA Little About Me", 1, "Favorite Quote", '\n',
-						NULL, "A Little About Me", 0, NULL))
+						NULL, _("A Little About Me"), 0, NULL))
 				if(!info_extract_field(stripped, url_text, "\tA Little About Me", 1, "My Homepage\tTake a look", '\n',
-							NULL, "A Little About Me", 0, NULL))
+							NULL, _("A Little About Me"), 0, NULL))
 					info_extract_field(stripped, url_text, "\tA Little About Me", 1, "last updated", '\n',
-							NULL, "A Little About Me", 0, NULL);
+							NULL, _("A Little About Me"), 0, NULL);
 
 	/* check if they have Favorite Things */
 	if(!info_extract_field(stripped, url_text, "Favorite Things", 1, "Hobbies and Interests", '\n',
-				NULL, "Favorite Things", 0, NULL))
+				NULL, _("Favorite Things"), 0, NULL))
 		if(!info_extract_field(stripped, url_text, "Favorite Things", 1, "Favorite Quote", '\n',
 					NULL, "Favorite Things", 0, NULL))
 			if(info_extract_field(stripped, url_text, "Favorite Things", 1, "My Homepage\tTake a look", '\n',
-						NULL, "Favorite Things", 0, NULL))
+						NULL, _("Favorite Things"), 0, NULL))
 				info_extract_field(stripped, url_text, "Favorite Things", 1, "last updated", '\n',
-						NULL, "Favorite Things", 0, NULL);
+						NULL, _("Favorite Things"), 0, NULL);
 
 	/* check if they have Hobbies and Interests */
 	if(!info_extract_field(stripped, url_text, "Hobbies and Interests", 1, "Favorite Quote", '\n',
-				NULL, "Hobbies and Interests", 0, NULL))
+				NULL, _("Hobbies and Interests"), 0, NULL))
 		if(info_extract_field(stripped, url_text, "Hobbies and Interests", 1, "My Homepage\tTake a look", '\n',
-					NULL, "Hobbies and Interests", 0, NULL))
+					NULL, _("Hobbies and Interests"), 0, NULL))
 			info_extract_field(stripped, url_text, "Hobbies and Interests", 1, "last updated", '\n',
-					NULL, "Hobbies and Interests", 0, NULL);
+					NULL, _("Hobbies and Interests"), 0, NULL);
 
 	/* check if they have Favorite Quote */
 	if(!info_extract_field(stripped, url_text, "Favorite Quote", 1, "My Homepage\tTake a look", '\n',
-				NULL, "Favorite Quote", 0, NULL))
+				NULL, _("Favorite Quote"), 0, NULL))
 		info_extract_field(stripped, url_text, "Favorite Quote", 1, "last updated", '\n',
-				NULL, "Favorite Quote", 0, NULL);
+				NULL, _("Favorite Quote"), 0, NULL);
 
 	/* extract the last updated date and put it in */
 	info_extract_field(stripped, url_text, "\tlast updated:", 1, "\n", '\n',
-			NULL, "Last Updated", 0, NULL);
+			NULL, _("Last Updated"), 0, NULL);
 
 	/* if we were able to fetch a homepage url earlier, stick it in there */
 	if(user_url)
 	{
-		g_snprintf(buf,sizeof(buf),"<b>Home Page:</b><br><a href=\"%s\">%s</a><br>\n",user_url,user_url);
+		g_snprintf(buf,sizeof(buf),"<b>%s:</b><br><a href=\"%s\">%s</a><br>\n",_("Home Page"),user_url,user_url);
 		strcat(url_text,buf);
 	}