Changeset 497 in MondoRescue for branches/stable/mondo/mondo/mondoarchive/main.c
- Timestamp:
- Apr 28, 2006, 12:34:03 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/stable/mondo/mondo/mondoarchive/main.c
r424 r497 251 251 char *say_at_end; 252 252 253 #ifdef ENABLE_NLS 254 setlocale(LC_ALL, ""); 255 (void) textdomain("mondo"); 256 #endif 253 257 /* Make sure I'm root; abort if not */ 254 258 if (getuid() != 0) { 255 fprintf(stderr, "Please run as root.\r\n");259 fprintf(stderr, _("Please run as root.\n")); 256 260 exit(127); 257 261 } … … 261 265 && (!strcmp(argv[argc - 1], "-v") || !strcmp(argv[argc - 1], "-V") 262 266 || !strcmp(argv[argc - 1], "--version"))) { 263 printf( "mondoarchive v%s\nSee man page for help\n", PACKAGE_VERSION);267 printf(_("mondoarchive v%s\nSee man page for help\n"), PACKAGE_VERSION); 264 268 exit(0); 265 269 } … … 275 279 diffs = 0; 276 280 say_at_end[0] = '\0'; 277 printf( "Initializing...\n");281 printf(_("Initializing...\n")); 278 282 if (!(bkpinfo = malloc(sizeof(struct s_bkpinfo)))) { 279 283 fatal_error("Cannot malloc bkpinfo"); … … 321 325 setup_newt_stuff(); 322 326 if (!strstr(argv[2], "filelist")) { 323 printf( "Sorry - filelist goes first\n");327 printf(_("Sorry - filelist goes first\n")); 324 328 finish(1); 325 329 } else { … … 350 354 setup_newt_stuff(); 351 355 if (!strstr(argv[2], "filelist")) { 352 printf( "Sorry - filelist goes first\n");356 printf(_("Sorry - filelist goes first\n")); 353 357 finish(1); 354 358 } else { … … 370 374 setup_newt_stuff(); 371 375 if (find_cdrw_device(tmp)) { 372 printf( "Failed to find CDR-RW drive\n");373 } else { 374 printf( "CD-RW is at %s\n", tmp);376 printf(_("Failed to find CDR-RW drive\n")); 377 } else { 378 printf(_("CD-RW is at %s\n"), tmp); 375 379 } 376 380 tmp[0] = '\0'; 377 381 if (find_cdrom_device(tmp, atoi(argv[2]))) { 378 printf( "Failed to find CD-ROM drive\n");379 } else { 380 printf( "CD-ROM is at %s\n", tmp);382 printf(_("Failed to find CD-ROM drive\n")); 383 } else { 384 printf(_("CD-ROM is at %s\n"), tmp); 381 385 } 382 386 finish(0); … … 388 392 setup_newt_stuff(); 389 393 if (find_dvd_device(tmp, atoi(argv[2]))) { 390 printf( "Failed to find DVD drive\n");391 } else { 392 printf( "DVD is at %s\n", tmp);394 printf(_("Failed to find DVD drive\n")); 395 } else { 396 printf(_("DVD is at %s\n"), tmp); 393 397 } 394 398 finish(0); … … 401 405 if (argc > 2 && !strcmp(argv[1], "test-dev")) { 402 406 if (is_dev_an_NTFS_dev(argv[2])) { 403 printf( "%s is indeed an NTFS dev\n", argv[2]);404 } else { 405 printf( "%s is _not_ an NTFS dev\n", argv[2]);407 printf(_("%s is indeed an NTFS dev\n"), argv[2]); 408 } else { 409 printf(_("%s is _not_ an NTFS dev\n"), argv[2]); 406 410 } 407 411 finish(0); … … 426 430 if (res) { 427 431 printf 428 ( "Errors were detected in the command line you supplied.\n");429 printf( "Please review the log file - " MONDO_LOGFILE "\n");432 (_("Errors were detected in the command line you supplied.\n")); 433 printf(_("Please review the log file - %s \n"),MONDO_LOGFILE); 430 434 log_msg(1, "Mondoarchive will now exit."); 431 435 finish(1); … … 441 445 442 446 log_to_screen 443 ( "BusyBox's sources are available from http://www.busybox.net");447 (_("BusyBox's sources are available from http://www.busybox.net")); 444 448 sprintf(g_erase_tmpdir_and_scratchdir, "rm -Rf %s %s", bkpinfo->tmpdir, 445 449 bkpinfo->scratchdir); … … 457 461 if (res) { 458 462 strcat(say_at_end, 459 "Data archived. Please check the logs, just as a precaution. ");460 } else { 461 strcat(say_at_end, "Data archived OK. ");463 _("Data archived. Please check the logs, just as a precaution. ")); 464 } else { 465 strcat(say_at_end, _("Data archived OK. ")); 462 466 } 463 467 } … … 467 471 res = verify_data(bkpinfo); 468 472 if (res < 0) { 469 sprintf(tmp, "%d difference%c found.", -res,473 sprintf(tmp, _("%d difference%c found."), -res, 470 474 (-res != 1) ? 's' : ' '); 471 475 strcat(say_at_end, tmp); … … 487 491 if (!retval) { 488 492 mvaddstr_and_log_it(g_currentY++, 0, 489 "Backup and/or verify ran to completion. Everything appears to be fine.");493 _("Backup and/or verify ran to completion. Everything appears to be fine.")); 490 494 } else { 491 495 mvaddstr_and_log_it(g_currentY++, 0, 492 "Backup and/or verify ran to completion. However, errors did occur.");496 _("Backup and/or verify ran to completion. However, errors did occur.")); 493 497 } 494 498 495 499 if (does_file_exist("/root/images/mindi/mondorescue.iso")) { 496 500 log_to_screen 497 ( "/root/images/mindi/mondorescue.iso, a boot/utility CD, is available if you want it.");501 (_("/root/images/mindi/mondorescue.iso, a boot/utility CD, is available if you want it.")); 498 502 } 499 503 … … 502 506 if (g_text_mode) { 503 507 log_to_screen 504 ( "Type 'less /tmp/changed.files' to see which files don't match the archives");508 (_("Type 'less /tmp/changed.files' to see which files don't match the archives")); 505 509 } else { 506 510 log_msg(1, 507 "Type 'less /tmp/changed.files' to see which files don't match the archives");511 _("Type 'less /tmp/changed.files' to see which files don't match the archives")); 508 512 log_msg(2, "Calling popup_changelist_from_file()"); 509 513 popup_changelist_from_file("/tmp/changed.files"); … … 523 527 system("rm -Rf /tmp.mondo.* /mondo.scratch.*"); 524 528 if (!retval) { 525 printf( "Mondoarchive ran OK.\n");529 printf(_("Mondoarchive ran OK.\n")); 526 530 } else { 527 printf( "Errors occurred during backup. Please check logfile.\n");531 printf(_("Errors occurred during backup. Please check logfile.\n")); 528 532 } 529 533 distro_specific_kludges_at_end_of_mondoarchive(); … … 549 553 if (!g_text_mode) { 550 554 popup_and_OK 551 ( "Mondo Archive has finished its run. Please press ENTER to return to the shell prompt.");552 log_to_screen( "See %s for details of backup run.", MONDO_LOGFILE);555 (_("Mondo Archive has finished its run. Please press ENTER to return to the shell prompt.")); 556 log_to_screen(_("See %s for details of backup run."), MONDO_LOGFILE); 553 557 finish(retval); 554 558 } else { 555 printf( "See %s for details of backup run.\n", MONDO_LOGFILE);559 printf(_("See %s for details of backup run.\n"), MONDO_LOGFILE); 556 560 exit(retval); 557 561 }
Note:
See TracChangeset
for help on using the changeset viewer.