changeset 6630:889279abb909

[gaim-migrate @ 7154] I thought about the problem with the yahoo profile languages. I haven't yet a solution, which solves the whole problem. But I think, I have a good idea, how to deal with non-English profiles in the meantime before this solution comes. non-English profiles are empty white pages in the moment (without my patch). The original patch already shows a link and a message for adult profiles. My patch makes the same for non-English languages. How it works: - at first it checks, if the page is in English (it looks for the words "Last Updated:", I think this is good, because every English profile has these words) - if the page is not in English, it finds the profile name in the title (which is always English) - it prints a message and a link which points to the profile page of the user Luke, can you please look at the patch and especially to my comments and messages. Please correct my English, if something doesn't sound good. I think, the patch can be included in gaim-0.68. It should not have any side effects." at very least it has fewwer side effects. committer: Tailor Script <tailor@pidgin.im>
author Luke Schierer <lschiere@pidgin.im>
date Tue, 26 Aug 2003 01:44:22 +0000
parents bdc448cf4cb6
children f80e23e66de0
files src/protocols/yahoo/yahoo.c
diffstat 1 files changed, 16 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/protocols/yahoo/yahoo.c	Tue Aug 26 01:34:51 2003 +0000
+++ b/src/protocols/yahoo/yahoo.c	Tue Aug 26 01:44:22 2003 +0000
@@ -1426,6 +1426,22 @@
 		return;
 	}
 
+	/* at the moment we don't support profile pages with languages other than
+	 * english. the problem is, that every user may choose his/her own profile
+	 * language. this language has nothing to do with the preferences of the
+	 * user which looks at the profile 
+	 */
+	p = strstr(url_text, "Last Updated:");
+	if (!p) {
+		strcpy(buf, _("<b>Sorry, non-English profiles are not supported at this time.</b><br><br>\n"));
+		info_extract_field(url_text, buf, "<title>", 0, "'s Yahoo! Profile", 0, NULL,
+				_("If you wish to view this profile, you will need to visit this link in your web browser"),
+				1, YAHOO_PROFILE_URL);
+		strcat(buf, "</body></html>\n");
+		g_show_info_text(NULL, NULL, 2, buf, NULL);
+		return;
+	}
+
 	/* strip_html() doesn't strip out character entities like &nbsp; and &#183;
 	*/
 	while ((p = strstr(url_text, "&nbsp;")) != NULL) {