Mercurial > pidgin
comparison src/protocols/silc/silc.c @ 12885:b704e60fe5de
[gaim-migrate @ 15237]
Mark some strings for translation
committer: Tailor Script <tailor@pidgin.im>
author | Stu Tomlinson <stu@nosnilmot.com> |
---|---|
date | Sun, 15 Jan 2006 16:34:06 +0000 |
parents | 95a73ce6e285 |
children | 263c2db78f77 |
comparison
equal
deleted
inserted
replaced
12884:3e9802ef84f9 | 12885:b704e60fe5de |
---|---|
319 } | 319 } |
320 | 320 |
321 /* Init SILC client */ | 321 /* Init SILC client */ |
322 if (!silc_client_init(client)) { | 322 if (!silc_client_init(client)) { |
323 gc->wants_to_die = TRUE; | 323 gc->wants_to_die = TRUE; |
324 gaim_connection_error(gc, ("Cannot initialize SILC protocol")); | 324 gaim_connection_error(gc, _("Cannot initialize SILC protocol")); |
325 return; | 325 return; |
326 } | 326 } |
327 | 327 |
328 /* Check the ~/.silc dir and create it, and new key pair if necessary. */ | 328 /* Check the ~/.silc dir and create it, and new key pair if necessary. */ |
329 if (!silcgaim_check_silc_dir(gc)) { | 329 if (!silcgaim_check_silc_dir(gc)) { |
330 gc->wants_to_die = TRUE; | 330 gc->wants_to_die = TRUE; |
331 gaim_connection_error(gc, ("Cannot find/access ~/.silc directory")); | 331 gaim_connection_error(gc, _("Cannot find/access ~/.silc directory")); |
332 return; | 332 return; |
333 } | 333 } |
334 | 334 |
335 /* Progress */ | 335 /* Progress */ |
336 gaim_connection_update_progress(gc, _("Connecting to SILC Server"), 1, 5); | 336 gaim_connection_update_progress(gc, _("Connecting to SILC Server"), 1, 5); |
340 g_snprintf(prd, sizeof(prd), "%s" G_DIR_SEPARATOR_S "private_key.prv", silcgaim_silcdir()); | 340 g_snprintf(prd, sizeof(prd), "%s" G_DIR_SEPARATOR_S "private_key.prv", silcgaim_silcdir()); |
341 if (!silc_load_key_pair((char *)gaim_account_get_string(account, "public-key", pkd), | 341 if (!silc_load_key_pair((char *)gaim_account_get_string(account, "public-key", pkd), |
342 (char *)gaim_account_get_string(account, "private-key", prd), | 342 (char *)gaim_account_get_string(account, "private-key", prd), |
343 (gc->password == NULL) ? "" : gc->password, &client->pkcs, | 343 (gc->password == NULL) ? "" : gc->password, &client->pkcs, |
344 &client->public_key, &client->private_key)) { | 344 &client->public_key, &client->private_key)) { |
345 g_snprintf(pkd, sizeof(pkd), ("Could not load SILC key pair: %s"), strerror(errno)); | 345 g_snprintf(pkd, sizeof(pkd), _("Could not load SILC key pair: %s"), strerror(errno)); |
346 gaim_connection_error(gc, pkd); | 346 gaim_connection_error(gc, pkd); |
347 return; | 347 return; |
348 } | 348 } |
349 | 349 |
350 sg = silc_calloc(1, sizeof(*sg)); | 350 sg = silc_calloc(1, sizeof(*sg)); |
360 if (gaim_proxy_connect(account, | 360 if (gaim_proxy_connect(account, |
361 gaim_account_get_string(account, "server", | 361 gaim_account_get_string(account, "server", |
362 "silc.silcnet.org"), | 362 "silc.silcnet.org"), |
363 gaim_account_get_int(account, "port", 706), | 363 gaim_account_get_int(account, "port", 706), |
364 silcgaim_login_connected, gc)) { | 364 silcgaim_login_connected, gc)) { |
365 gaim_connection_error(gc, ("Unable to create connection")); | 365 gaim_connection_error(gc, _("Unable to create connection")); |
366 return; | 366 return; |
367 } | 367 } |
368 | 368 |
369 /* Schedule SILC using Glib's event loop */ | 369 /* Schedule SILC using Glib's event loop */ |
370 #ifndef _WIN32 | 370 #ifndef _WIN32 |
1147 return 0; | 1147 return 0; |
1148 } | 1148 } |
1149 mflags |= SILC_MESSAGE_FLAG_ACTION; | 1149 mflags |= SILC_MESSAGE_FLAG_ACTION; |
1150 } else if (strlen(msg) > 1 && msg[0] == '/') { | 1150 } else if (strlen(msg) > 1 && msg[0] == '/') { |
1151 if (!silc_client_command_call(client, conn, msg + 1)) | 1151 if (!silc_client_command_call(client, conn, msg + 1)) |
1152 gaim_notify_error(gc, ("Call Command"), _("Cannot call command"), | 1152 gaim_notify_error(gc, _("Call Command"), _("Cannot call command"), |
1153 _("Unknown command")); | 1153 _("Unknown command")); |
1154 g_free(tmp); | 1154 g_free(tmp); |
1155 return 0; | 1155 return 0; |
1156 } | 1156 } |
1157 | 1157 |