comparison src/protocols/irc/irc.c @ 5236:0d4b8ca97c17

[gaim-migrate @ 5606] Bjoern Voigt writes: "I made some i18n fixes and updates for the German translation. The i18n fixes include: - new i18n files in po/POTFILES.in - i18n fixes for the Jabber plugin - i18n fixes for IRC plugin" committer: Tailor Script <tailor@pidgin.im>
author Luke Schierer <lschiere@pidgin.im>
date Sat, 26 Apr 2003 20:42:30 +0000
parents 890b29f00b68
children 0e2cc6379618
comparison
equal deleted inserted replaced
5235:1dc233cc3349 5236:0d4b8ca97c17
929 id->in_whois = TRUE; 929 id->in_whois = TRUE;
930 } 930 }
931 931
932 switch (num) { 932 switch (num) {
933 case 311: 933 case 311:
934 id->liststr = g_string_append(id->liststr, "<b>User: </b>"); 934 g_snprintf(tmp, sizeof(tmp), "<b>%s: </b>", _("User"));
935 id->liststr = g_string_append(id->liststr, tmp);
935 break; 936 break;
936 case 312: 937 case 312:
937 id->liststr = g_string_append(id->liststr, "<b>Server: </b>"); 938 g_snprintf(tmp, sizeof(tmp), "<b>%s: </b>", _("Server"));
939 id->liststr = g_string_append(id->liststr, tmp);
938 break; 940 break;
939 case 313: 941 case 313:
940 g_snprintf(tmp, sizeof(tmp), "<b>IRC Operator:</b> %s ", word[4]); 942 g_snprintf(tmp, sizeof(tmp), "<b>%s:</b> %s ", _("IRC Operator"), word[4]);
941 id->liststr = g_string_append(id->liststr, tmp); 943 id->liststr = g_string_append(id->liststr, tmp);
942 break; 944 break;
943 case 314: 945 case 314:
944 id->liststr = g_string_append(id->liststr, "<b>User: </b>"); 946 g_snprintf(tmp, sizeof(tmp), "<b>%s: </b><b>%s</b> (%s@%s) %s",
945 g_snprintf(tmp, sizeof(tmp), "<b>%s</b> (%s@%s) %s", 947 _("User"), word[4], word[5], word[6], word_eol[8]);
946 word[4], word[5], word[6], word_eol[8]);
947 id->liststr = g_string_append(id->liststr, tmp); 948 id->liststr = g_string_append(id->liststr, tmp);
948 return; 949 return;
949 case 317: 950 case 317:
950 id->liststr = g_string_append(id->liststr, "<b>Idle Time: </b>"); 951 g_snprintf(tmp, sizeof(tmp), "<b>%s: </b>", _("Idle Time"));
952 id->liststr = g_string_append(id->liststr, tmp);
951 break; 953 break;
952 case 319: 954 case 319:
953 id->liststr = g_string_append(id->liststr, "<b>Channels: </b>"); 955 g_snprintf(tmp, sizeof(tmp), "<b>%s: </b>", _("Channels"));
956 id->liststr = g_string_append(id->liststr, tmp);
954 break; 957 break;
955 /* Numeric 320 is used by the freenode irc network for showing 958 /* Numeric 320 is used by the freenode irc network for showing
956 * that a user is identified to services (Jason Straw <misato@wopn.org>)*/ 959 * that a user is identified to services (Jason Straw <misato@wopn.org>)*/
957 case 320: 960 case 320:
958 g_snprintf(tmp, sizeof(tmp), "%s is an Identified User", word[4]); 961 g_snprintf(tmp, sizeof(tmp), _("%s is an Identified User"), word[4]);
959 id->liststr = g_string_append(id->liststr, tmp); 962 id->liststr = g_string_append(id->liststr, tmp);
960 return; 963 return;
961 default: 964 default:
962 break; 965 break;
963 } 966 }
968 else if (isdigit(word_eol[5][0])) { 971 else if (isdigit(word_eol[5][0])) {
969 time_t idle = atol(word_eol[5]); 972 time_t idle = atol(word_eol[5]);
970 time_t signon = atol(strchr(word_eol[5], ' ')); 973 time_t signon = atol(strchr(word_eol[5], ' '));
971 974
972 g_snprintf(tmp, sizeof(tmp), 975 g_snprintf(tmp, sizeof(tmp),
973 "%ld seconds [signon: %s]", (idle / 1000), ctime(&signon)); 976 _("%ld seconds [signon: %s]"), (idle / 1000), ctime(&signon));
974 id->liststr = g_string_append(id->liststr, tmp); 977 id->liststr = g_string_append(id->liststr, tmp);
975 } 978 }
976 else 979 else
977 id->liststr = g_string_append(id->liststr, word_eol[5]); 980 id->liststr = g_string_append(id->liststr, word_eol[5]);
978 } 981 }
1007 process_numeric(struct gaim_connection *gc, char *word[], char *word_eol[]) 1010 process_numeric(struct gaim_connection *gc, char *word[], char *word_eol[])
1008 { 1011 {
1009 struct irc_data *id = gc->proto_data; 1012 struct irc_data *id = gc->proto_data;
1010 char *text = word_eol[3]; 1013 char *text = word_eol[3];
1011 int n = atoi(word[2]); 1014 int n = atoi(word[2]);
1015 char tmp[1024];
1012 1016
1013 if (!g_ascii_strncasecmp(gc->displayname, text, strlen(gc->displayname))) 1017 if (!g_ascii_strncasecmp(gc->displayname, text, strlen(gc->displayname)))
1014 text += strlen(gc->displayname) + 1; 1018 text += strlen(gc->displayname) + 1;
1015 if (*text == ':') 1019 if (*text == ':')
1016 text++; 1020 text++;
1026 case 5: 1030 case 5:
1027 handle_005(gc, word, word_eol); 1031 handle_005(gc, word, word_eol);
1028 break; 1032 break;
1029 case 301: /* RPL_AWAY */ 1033 case 301: /* RPL_AWAY */
1030 if (id->in_whois) { 1034 if (id->in_whois) {
1031 id->liststr = g_string_append(id->liststr, "<BR><b>Away: </b>"); 1035 g_snprintf(tmp, sizeof(tmp), "<BR><b>%s: </b>", _("Away"));
1036 id->liststr = g_string_append(id->liststr, tmp);
1032 1037
1033 if (word_eol[5][0] == ':') 1038 if (word_eol[5][0] == ':')
1034 id->liststr = g_string_append(id->liststr, word_eol[5] + 1); 1039 id->liststr = g_string_append(id->liststr, word_eol[5] + 1);
1035 else 1040 else
1036 id->liststr = g_string_append(id->liststr, word_eol[5]); 1041 id->liststr = g_string_append(id->liststr, word_eol[5]);