Mercurial > pidgin
comparison src/protocols/yahoo/yahoo.c @ 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 | 7e2d2c8e88a8 |
comparison
equal
deleted
inserted
replaced
6629:bdc448cf4cb6 | 6630:889279abb909 |
---|---|
1424 strcat(buf, "</body></html>\n"); | 1424 strcat(buf, "</body></html>\n"); |
1425 g_show_info_text(NULL, NULL, 2, buf, NULL); | 1425 g_show_info_text(NULL, NULL, 2, buf, NULL); |
1426 return; | 1426 return; |
1427 } | 1427 } |
1428 | 1428 |
1429 /* at the moment we don't support profile pages with languages other than | |
1430 * english. the problem is, that every user may choose his/her own profile | |
1431 * language. this language has nothing to do with the preferences of the | |
1432 * user which looks at the profile | |
1433 */ | |
1434 p = strstr(url_text, "Last Updated:"); | |
1435 if (!p) { | |
1436 strcpy(buf, _("<b>Sorry, non-English profiles are not supported at this time.</b><br><br>\n")); | |
1437 info_extract_field(url_text, buf, "<title>", 0, "'s Yahoo! Profile", 0, NULL, | |
1438 _("If you wish to view this profile, you will need to visit this link in your web browser"), | |
1439 1, YAHOO_PROFILE_URL); | |
1440 strcat(buf, "</body></html>\n"); | |
1441 g_show_info_text(NULL, NULL, 2, buf, NULL); | |
1442 return; | |
1443 } | |
1444 | |
1429 /* strip_html() doesn't strip out character entities like and · | 1445 /* strip_html() doesn't strip out character entities like and · |
1430 */ | 1446 */ |
1431 while ((p = strstr(url_text, " ")) != NULL) { | 1447 while ((p = strstr(url_text, " ")) != NULL) { |
1432 memmove(p, p + 6, strlen(p + 6)); | 1448 memmove(p, p + 6, strlen(p + 6)); |
1433 url_text[strlen(url_text) - 6] = '\0'; | 1449 url_text[strlen(url_text) - 6] = '\0'; |