comparison src/log.c @ 4195:4a0837c49d85

[gaim-migrate @ 4426] Nicola's Lichtmaier (niqueco) provides more _()'s committer: Tailor Script <tailor@pidgin.im>
author Luke Schierer <lschiere@pidgin.im>
date Sat, 04 Jan 2003 14:32:13 +0000
parents 17187504bfc2
children a614423c648f
comparison
equal deleted inserted replaced
4194:9325df841a40 4195:4a0837c49d85
1 /* --------------------------------------------------- 1 /* ---------------------------------------------------
2 * Function to remove a log file entry 2 * Function to remove a log file entry
3 * --------------------------------------------------- 3 * ---------------------------------------------------
4 */ 4 */
5 #ifdef HAVE_CONFIG_H
6 #include <config.h>
7 #endif
8 #include <string.h>
9
10 #ifndef _WIN32
11 #include <unistd.h>
12 #endif
13
5 #include "gaim.h" 14 #include "gaim.h"
6 #include "core.h" 15 #include "core.h"
7 #include "multi.h" 16 #include "multi.h"
8 #include "prpl.h" 17 #include "prpl.h"
9 #include <sys/stat.h> 18 #include <sys/stat.h>
329 return; 338 return;
330 339
331 if (why & OPT_LOG_MY_SIGNON) { 340 if (why & OPT_LOG_MY_SIGNON) {
332 switch (what) { 341 switch (what) {
333 case log_signon: 342 case log_signon:
334 g_snprintf(text, sizeof(text), "+++ %s (%s) signed on @ %s", 343 g_snprintf(text, sizeof(text), _("+++ %s (%s) signed on @ %s"),
335 gc->username, gc->prpl->name, full_date()); 344 gc->username, gc->prpl->name, full_date());
336 g_snprintf(html, sizeof(html), "<B>%s</B>", text); 345 g_snprintf(html, sizeof(html), "<B>%s</B>", text);
337 break; 346 break;
338 case log_signoff: 347 case log_signoff:
339 g_snprintf(text, sizeof(text), "+++ %s (%s) signed off @ %s", 348 g_snprintf(text, sizeof(text), _("+++ %s (%s) signed off @ %s"),
340 gc->username, gc->prpl->name, full_date()); 349 gc->username, gc->prpl->name, full_date());
341 g_snprintf(html, sizeof(html), "<I><FONT COLOR=GRAY>%s</FONT></I>", text); 350 g_snprintf(html, sizeof(html), "<I><FONT COLOR=GRAY>%s</FONT></I>", text);
342 break; 351 break;
343 case log_away: 352 case log_away:
344 g_snprintf(text, sizeof(text), "+++ %s (%s) changed away state @ %s", 353 g_snprintf(text, sizeof(text), _("+++ %s (%s) changed away state @ %s"),
345 gc->username, gc->prpl->name, full_date()); 354 gc->username, gc->prpl->name, full_date());
346 g_snprintf(html, sizeof(html), "<FONT COLOR=OLIVE>%s</FONT>", text); 355 g_snprintf(html, sizeof(html), "<FONT COLOR=OLIVE>%s</FONT>", text);
347 break; 356 break;
348 case log_back: 357 case log_back:
349 g_snprintf(text, sizeof(text), "+++ %s (%s) came back @ %s", 358 g_snprintf(text, sizeof(text), _("+++ %s (%s) came back @ %s"),
350 gc->username, gc->prpl->name, full_date()); 359 gc->username, gc->prpl->name, full_date());
351 g_snprintf(html, sizeof(html), "%s", text); 360 g_snprintf(html, sizeof(html), "%s", text);
352 break; 361 break;
353 case log_idle: 362 case log_idle:
354 g_snprintf(text, sizeof(text), "+++ %s (%s) became idle @ %s", 363 g_snprintf(text, sizeof(text), _("+++ %s (%s) became idle @ %s"),
355 gc->username, gc->prpl->name, full_date()); 364 gc->username, gc->prpl->name, full_date());
356 g_snprintf(html, sizeof(html), "<FONT COLOR=GRAY>%s</FONT>", text); 365 g_snprintf(html, sizeof(html), "<FONT COLOR=GRAY>%s</FONT>", text);
357 break; 366 break;
358 case log_unidle: 367 case log_unidle:
359 g_snprintf(text, sizeof(text), "+++ %s (%s) returned from idle @ %s", 368 g_snprintf(text, sizeof(text), _("+++ %s (%s) returned from idle @ %s"),
360 gc->username, gc->prpl->name, full_date()); 369 gc->username, gc->prpl->name, full_date());
361 g_snprintf(html, sizeof(html), "%s", text); 370 g_snprintf(html, sizeof(html), "%s", text);
362 break; 371 break;
363 case log_quit: 372 case log_quit:
364 g_snprintf(text, sizeof(text), "+++ Program exit @ %s", full_date()); 373 g_snprintf(text, sizeof(text), _("+++ Program exit @ %s"), full_date());
365 g_snprintf(html, sizeof(html), "<I><FONT COLOR=GRAY>%s</FONT></I>", text); 374 g_snprintf(html, sizeof(html), "<I><FONT COLOR=GRAY>%s</FONT></I>", text);
366 break; 375 break;
367 } 376 }
368 } else if (strcmp(who->name, who->show)) { 377 } else if (strcmp(who->name, who->show)) {
369 switch (what) { 378 switch (what) {
370 case log_signon: 379 case log_signon:
371 g_snprintf(text, sizeof(text), "%s (%s) reported that %s (%s) signed on @ %s", 380 g_snprintf(text, sizeof(text), _("%s (%s) reported that %s (%s) signed on @ %s"),
372 gc->username, gc->prpl->name, who->show, who->name, full_date()); 381 gc->username, gc->prpl->name, who->show, who->name, full_date());
373 g_snprintf(html, sizeof(html), "<B>%s</B>", text); 382 g_snprintf(html, sizeof(html), "<B>%s</B>", text);
374 break; 383 break;
375 case log_signoff: 384 case log_signoff:
376 g_snprintf(text, sizeof(text), "%s (%s) reported that %s (%s) signed off @ %s", 385 g_snprintf(text, sizeof(text), _("%s (%s) reported that %s (%s) signed off @ %s"),
377 gc->username, gc->prpl->name, who->show, who->name, full_date()); 386 gc->username, gc->prpl->name, who->show, who->name, full_date());
378 g_snprintf(html, sizeof(html), "<I><FONT COLOR=GRAY>%s</FONT></I>", text); 387 g_snprintf(html, sizeof(html), "<I><FONT COLOR=GRAY>%s</FONT></I>", text);
379 break; 388 break;
380 case log_away: 389 case log_away:
381 g_snprintf(text, sizeof(text), "%s (%s) reported that %s (%s) went away @ %s", 390 g_snprintf(text, sizeof(text), _("%s (%s) reported that %s (%s) went away @ %s"),
382 gc->username, gc->prpl->name, who->show, who->name, full_date()); 391 gc->username, gc->prpl->name, who->show, who->name, full_date());
383 g_snprintf(html, sizeof(html), "<FONT COLOR=OLIVE>%s</FONT>", text); 392 g_snprintf(html, sizeof(html), "<FONT COLOR=OLIVE>%s</FONT>", text);
384 break; 393 break;
385 case log_back: 394 case log_back:
386 g_snprintf(text, sizeof(text), "%s (%s) reported that %s (%s) came back @ %s", 395 g_snprintf(text, sizeof(text), _("%s (%s) reported that %s (%s) came back @ %s"),
387 gc->username, gc->prpl->name, who->show, who->name, full_date()); 396 gc->username, gc->prpl->name, who->show, who->name, full_date());
388 g_snprintf(html, sizeof(html), "%s", text); 397 g_snprintf(html, sizeof(html), "%s", text);
389 break; 398 break;
390 case log_idle: 399 case log_idle:
391 g_snprintf(text, sizeof(text), "%s (%s) reported that %s (%s) became idle @ %s", 400 g_snprintf(text, sizeof(text), _("%s (%s) reported that %s (%s) became idle @ %s"),
392 gc->username, gc->prpl->name, who->show, who->name, full_date()); 401 gc->username, gc->prpl->name, who->show, who->name, full_date());
393 g_snprintf(html, sizeof(html), "<FONT COLOR=GRAY>%s</FONT>", text); 402 g_snprintf(html, sizeof(html), "<FONT COLOR=GRAY>%s</FONT>", text);
394 break; 403 break;
395 case log_unidle: 404 case log_unidle:
396 g_snprintf(text, sizeof(text), 405 g_snprintf(text, sizeof(text),
397 "%s (%s) reported that %s (%s) returned from idle @ %s", gc->username, 406 _("%s (%s) reported that %s (%s) returned from idle @ %s"), gc->username,
398 gc->prpl->name, who->show, who->name, full_date()); 407 gc->prpl->name, who->show, who->name, full_date());
399 g_snprintf(html, sizeof(html), "%s", text); 408 g_snprintf(html, sizeof(html), "%s", text);
400 break; 409 break;
401 default: 410 default:
402 fclose(fd); 411 fclose(fd);
404 break; 413 break;
405 } 414 }
406 } else { 415 } else {
407 switch (what) { 416 switch (what) {
408 case log_signon: 417 case log_signon:
409 g_snprintf(text, sizeof(text), "%s (%s) reported that %s signed on @ %s", 418 g_snprintf(text, sizeof(text), _("%s (%s) reported that %s signed on @ %s"),
410 gc->username, gc->prpl->name, who->name, full_date()); 419 gc->username, gc->prpl->name, who->name, full_date());
411 g_snprintf(html, sizeof(html), "<B>%s</B>", text); 420 g_snprintf(html, sizeof(html), "<B>%s</B>", text);
412 break; 421 break;
413 case log_signoff: 422 case log_signoff:
414 g_snprintf(text, sizeof(text), "%s (%s) reported that %s signed off @ %s", 423 g_snprintf(text, sizeof(text), _("%s (%s) reported that %s signed off @ %s"),
415 gc->username, gc->prpl->name, who->name, full_date()); 424 gc->username, gc->prpl->name, who->name, full_date());
416 g_snprintf(html, sizeof(html), "<I><FONT COLOR=GRAY>%s</FONT></I>", text); 425 g_snprintf(html, sizeof(html), "<I><FONT COLOR=GRAY>%s</FONT></I>", text);
417 break; 426 break;
418 case log_away: 427 case log_away:
419 g_snprintf(text, sizeof(text), "%s (%s) reported that %s went away @ %s", 428 g_snprintf(text, sizeof(text), _("%s (%s) reported that %s went away @ %s"),
420 gc->username, gc->prpl->name, who->name, full_date()); 429 gc->username, gc->prpl->name, who->name, full_date());
421 g_snprintf(html, sizeof(html), "<FONT COLOR=OLIVE>%s</FONT>", text); 430 g_snprintf(html, sizeof(html), "<FONT COLOR=OLIVE>%s</FONT>", text);
422 break; 431 break;
423 case log_back: 432 case log_back:
424 g_snprintf(text, sizeof(text), "%s (%s) reported that %s came back @ %s", 433 g_snprintf(text, sizeof(text), _("%s (%s) reported that %s came back @ %s"),
425 gc->username, gc->prpl->name, who->name, full_date()); 434 gc->username, gc->prpl->name, who->name, full_date());
426 g_snprintf(html, sizeof(html), "%s", text); 435 g_snprintf(html, sizeof(html), "%s", text);
427 break; 436 break;
428 case log_idle: 437 case log_idle:
429 g_snprintf(text, sizeof(text), "%s (%s) reported that %s became idle @ %s", 438 g_snprintf(text, sizeof(text), _("%s (%s) reported that %s became idle @ %s"),
430 gc->username, gc->prpl->name, who->name, full_date()); 439 gc->username, gc->prpl->name, who->name, full_date());
431 g_snprintf(html, sizeof(html), "<FONT COLOR=GRAY>%s</FONT>", text); 440 g_snprintf(html, sizeof(html), "<FONT COLOR=GRAY>%s</FONT>", text);
432 break; 441 break;
433 case log_unidle: 442 case log_unidle:
434 g_snprintf(text, sizeof(text), 443 g_snprintf(text, sizeof(text),
435 "%s (%s) reported that %s returned from idle @ %s", gc->username, 444 _("%s (%s) reported that %s returned from idle @ %s"), gc->username,
436 gc->prpl->name, who->name, full_date()); 445 gc->prpl->name, who->name, full_date());
437 g_snprintf(html, sizeof(html), "%s", text); 446 g_snprintf(html, sizeof(html), "%s", text);
438 break; 447 break;
439 default: 448 default:
440 fclose(fd); 449 fclose(fd);