libpurple/protocols/yahoo/yahoo_profile.c

changeset 15666
0496c3ffe602
parent 15435
4b933b06d75e
child 15884
4de1981757fc
equal deleted inserted replaced
15641:b63d9320d178 15666:0496c3ffe602
1004 if (profile_state == PROFILE_STATE_DEFAULT) { 1004 if (profile_state == PROFILE_STATE_DEFAULT) {
1005 #if 0 1005 #if 0
1006 /* extract their Yahoo! ID and put it in. Don't bother marking has_info as 1006 /* extract their Yahoo! ID and put it in. Don't bother marking has_info as
1007 * true, since the Yahoo! ID will always be there */ 1007 * true, since the Yahoo! ID will always be there */
1008 if (!gaim_markup_extract_info_field(stripped, stripped_len, user_info, 1008 if (!gaim_markup_extract_info_field(stripped, stripped_len, user_info,
1009 strings->yahoo_id_string, 10, "\n", 0, 1009 strings->yahoo_id_string, (yd->jp ? 2 : 10), "\n", 0,
1010 NULL, _("Yahoo! ID"), 0, NULL, NULL)) 1010 NULL, _("Yahoo! ID"), 0, NULL, NULL))
1011 ; 1011 ;
1012 #endif 1012 #endif
1013 1013
1014 #if PHOTO_SUPPORT 1014 #if PHOTO_SUPPORT
1031 } 1031 }
1032 #endif /* PHOTO_SUPPORT */ 1032 #endif /* PHOTO_SUPPORT */
1033 1033
1034 /* extract their Email address and put it in */ 1034 /* extract their Email address and put it in */
1035 found |= gaim_markup_extract_info_field(stripped, stripped_len, user_info, 1035 found |= gaim_markup_extract_info_field(stripped, stripped_len, user_info,
1036 strings->my_email_string, 1, " ", 0, 1036 strings->my_email_string, (yd->jp ? 4 : 1), " ", 0,
1037 strings->private_string, _("E-Mail"), 0, NULL, NULL); 1037 strings->private_string, _("E-Mail"), 0, NULL, NULL);
1038 1038
1039 /* extract the Nickname if it exists */ 1039 /* extract the Nickname if it exists */
1040 found |= gaim_markup_extract_info_field(stripped, stripped_len, user_info, 1040 found |= gaim_markup_extract_info_field(stripped, stripped_len, user_info,
1041 "Nickname:", 1, "\n", '\n', 1041 "Nickname:", 1, "\n", '\n',
1042 NULL, _("Nickname"), 0, NULL, NULL); 1042 NULL, _("Nickname"), 0, NULL, NULL);
1043 1043
1044 /* extract their RealName and put it in */ 1044 /* extract their RealName and put it in */
1045 found |= gaim_markup_extract_info_field(stripped, stripped_len, user_info, 1045 found |= gaim_markup_extract_info_field(stripped, stripped_len, user_info,
1046 strings->realname_string, 1, "\n", '\n', 1046 strings->realname_string, (yd->jp ? 3 : 1), "\n", '\n',
1047 NULL, _("Real Name"), 0, NULL, NULL); 1047 NULL, _("Real Name"), 0, NULL, NULL);
1048 1048
1049 /* extract their Location and put it in */ 1049 /* extract their Location and put it in */
1050 found |= gaim_markup_extract_info_field(stripped, stripped_len, user_info, 1050 found |= gaim_markup_extract_info_field(stripped, stripped_len, user_info,
1051 strings->location_string, 2, "\n", '\n', 1051 strings->location_string, (yd->jp ? 4 : 2), "\n", '\n',
1052 NULL, _("Location"), 0, NULL, NULL); 1052 NULL, _("Location"), 0, NULL, NULL);
1053 1053
1054 /* extract their Age and put it in */ 1054 /* extract their Age and put it in */
1055 found |= gaim_markup_extract_info_field(stripped, stripped_len, user_info, 1055 found |= gaim_markup_extract_info_field(stripped, stripped_len, user_info,
1056 strings->age_string, 3, "\n", '\n', 1056 strings->age_string, (yd->jp ? 2 : 3), "\n", '\n',
1057 NULL, _("Age"), 0, NULL, NULL); 1057 NULL, _("Age"), 0, NULL, NULL);
1058 1058
1059 /* extract their MaritalStatus and put it in */ 1059 /* extract their MaritalStatus and put it in */
1060 found |= gaim_markup_extract_info_field(stripped, stripped_len, user_info, 1060 found |= gaim_markup_extract_info_field(stripped, stripped_len, user_info,
1061 strings->maritalstatus_string, 3, "\n", '\n', 1061 strings->maritalstatus_string, (yd->jp ? 2 : 3), "\n", '\n',
1062 strings->no_answer_string, _("Marital Status"), 0, NULL, NULL); 1062 strings->no_answer_string, _("Marital Status"), 0, NULL, NULL);
1063 1063
1064 /* extract their Gender and put it in */ 1064 /* extract their Gender and put it in */
1065 found |= gaim_markup_extract_info_field(stripped, stripped_len, user_info, 1065 found |= gaim_markup_extract_info_field(stripped, stripped_len, user_info,
1066 strings->gender_string, 3, "\n", '\n', 1066 strings->gender_string, (yd->jp ? 2 : 3), "\n", '\n',
1067 strings->no_answer_string, _("Gender"), 0, NULL, NULL); 1067 strings->no_answer_string, _("Gender"), 0, NULL, NULL);
1068 1068
1069 /* extract their Occupation and put it in */ 1069 /* extract their Occupation and put it in */
1070 found |= gaim_markup_extract_info_field(stripped, stripped_len, user_info, 1070 found |= gaim_markup_extract_info_field(stripped, stripped_len, user_info,
1071 strings->occupation_string, 2, "\n", '\n', 1071 strings->occupation_string, 2, "\n", '\n',
1079 * next thing to follow this bunch. (For Yahoo Japan, we check for 1079 * next thing to follow this bunch. (For Yahoo Japan, we check for
1080 * the "Description" ("Self PR") heading instead of "Links".) 1080 * the "Description" ("Self PR") heading instead of "Links".)
1081 */ 1081 */
1082 1082
1083 if (!gaim_markup_extract_info_field(stripped, stripped_len, user_info, 1083 if (!gaim_markup_extract_info_field(stripped, stripped_len, user_info,
1084 strings->hobbies_string, 1, strings->latest_news_string, 1084 strings->hobbies_string, (yd->jp ? 3 : 1), strings->latest_news_string,
1085 '\n', "\n", _("Hobbies"), 0, NULL, NULL)) 1085 '\n', "\n", _("Hobbies"), 0, NULL, NULL))
1086 { 1086 {
1087 if (!gaim_markup_extract_info_field(stripped, stripped_len, user_info, 1087 if (!gaim_markup_extract_info_field(stripped, stripped_len, user_info,
1088 strings->hobbies_string, 1, strings->favorite_quote_string, 1088 strings->hobbies_string, 1, strings->favorite_quote_string,
1089 '\n', "\n", _("Hobbies"), 0, NULL, NULL)) 1089 '\n', "\n", _("Hobbies"), 0, NULL, NULL))
1101 if (!gaim_markup_extract_info_field(stripped, stripped_len, user_info, 1101 if (!gaim_markup_extract_info_field(stripped, stripped_len, user_info,
1102 strings->latest_news_string, 1, strings->favorite_quote_string, 1102 strings->latest_news_string, 1, strings->favorite_quote_string,
1103 '\n', "\n", _("Latest News"), 0, NULL, NULL)) 1103 '\n', "\n", _("Latest News"), 0, NULL, NULL))
1104 { 1104 {
1105 found |= gaim_markup_extract_info_field(stripped, stripped_len, user_info, 1105 found |= gaim_markup_extract_info_field(stripped, stripped_len, user_info,
1106 strings->latest_news_string, 1, strings->links_string, 1106 strings->latest_news_string, (yd->jp ? 2 : 1), strings->links_string,
1107 '\n', "\n", _("Latest News"), 0, NULL, NULL); 1107 '\n', "\n", _("Latest News"), 0, NULL, NULL);
1108 } 1108 }
1109 else 1109 else
1110 found = TRUE; 1110 found = TRUE;
1111 1111
1160 "Member Since:", 1, last_updated_utf8_string, 1160 "Member Since:", 1, last_updated_utf8_string,
1161 '\n', NULL, _("Member Since"), 0, NULL, yahoo_info_date_reformat); 1161 '\n', NULL, _("Member Since"), 0, NULL, yahoo_info_date_reformat);
1162 1162
1163 /* extract the Last Updated date and put it in */ 1163 /* extract the Last Updated date and put it in */
1164 found |= gaim_markup_extract_info_field(stripped, stripped_len, user_info, 1164 found |= gaim_markup_extract_info_field(stripped, stripped_len, user_info,
1165 last_updated_utf8_string, 1, " ", '\n', NULL, 1165 last_updated_utf8_string, (yd->jp ? 2 : 1), (yd->jp ? "\n" : " "), (yd->jp ? 0 : '\n'), NULL,
1166 _("Last Update"), 0, NULL, yahoo_info_date_reformat); 1166 _("Last Update"), 0, NULL, (yd->jp ? NULL : yahoo_info_date_reformat));
1167 } 1167 }
1168 } /* if (profile_state == PROFILE_STATE_DEFAULT) */ 1168 } /* if (profile_state == PROFILE_STATE_DEFAULT) */
1169 1169
1170 if(!found) 1170 if(!found)
1171 { 1171 {

mercurial