Changeset 507 in MondoRescue for trunk/mondo/mondo/mondorestore/mondo-restore.c
- Timestamp:
- Apr 30, 2006, 2:04:16 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/mondo/mondo/mondorestore/mondo-restore.c
r489 r507 507 507 * The message to display if we detect that the user is using a Compaq Proliant. 508 508 */ 509 #define COMPAQ_PROLIANTS_SUCK "Partition and format your disk using Compaq's disaster recovery CD. After you've done that, please reboot with your Mondo CD/floppy in Interactive Mode."509 #define COMPAQ_PROLIANTS_SUCK _("Partition and format your disk using Compaq's disaster recovery CD. After you've done that, please reboot with your Mondo CD/floppy in Interactive Mode.") 510 510 511 511 … … 537 537 if (!does_file_exist(g_mountlist_fname)) { 538 538 log_to_screen(g_mountlist_fname); 539 log_to_screen( "does not exist");539 log_to_screen(_("does not exist")); 540 540 return (1); 541 541 } … … 545 545 if (retval) { 546 546 log_to_screen 547 ( "Warning - load_raidtab_into_raidlist returned an error");547 (_("Warning - load_raidtab_into_raidlist returned an error")); 548 548 } 549 549 res = edit_mountlist(g_mountlist_fname, mountlist, raidlist); … … 555 555 save_raidlist_to_raidtab(raidlist, RAIDTAB_FNAME); 556 556 557 log_to_screen( "I have finished editing the mountlist for you.");557 log_to_screen(_("I have finished editing the mountlist for you.")); 558 558 559 559 return (retval); … … 604 604 popup_and_OK(COMPAQ_PROLIANTS_SUCK); 605 605 if (ask_me_yes_or_no 606 ( "Would you like to reboot and use your Compaq CD to prep your hard drive?"))606 (_("Would you like to reboot and use your Compaq CD to prep your hard drive?"))) 607 607 { 608 608 fatal_error 609 ( "Aborting. Please reboot and prep your hard drive with your Compaq CD.");609 (_("Aborting. Please reboot and prep your hard drive with your Compaq CD.")); 610 610 } 611 611 } … … 644 644 interactively_obtain_media_parameters_from_user(bkpinfo, FALSE); 645 645 } else { 646 popup_and_OK( "No restoring or comparing will take place today.");646 popup_and_OK(_("No restoring or comparing will take place today.")); 647 647 if (is_this_device_mounted("/mnt/cdrom")) { 648 648 run_program_and_log_output("umount /mnt/cdrom", FALSE); … … 776 776 if (g_text_mode) { 777 777 if (!ask_me_yes_or_no 778 ( "Interactive Mode + textonly = experimental! Proceed anyway?"))778 (_("Interactive Mode + textonly = experimental! Proceed anyway?"))) 779 779 { 780 780 fatal_error("Wise move."); … … 817 817 save_mountlist_to_disk(mountlist, g_mountlist_fname); 818 818 save_raidlist_to_raidtab(raidlist, RAIDTAB_FNAME); 819 mvaddstr_and_log_it(1, 30, "Restoring Interactively");819 mvaddstr_and_log_it(1, 30, _("Restoring Interactively")); 820 820 if (bkpinfo->differential) { 821 log_to_screen( "Because this is a differential backup, disk");821 log_to_screen(_("Because this is a differential backup, disk")); 822 822 log_to_screen 823 ( " partitioning and formatting will not take place.");823 (_(" partitioning and formatting will not take place.")); 824 824 done = TRUE; 825 825 } else { 826 826 if (ask_me_yes_or_no 827 ( "Do you want to erase and partition your hard drives?")) {827 (_("Do you want to erase and partition your hard drives?"))) { 828 828 if (partition_table_contains_Compaq_diagnostic_partition 829 829 (mountlist)) { … … 836 836 if (ptn_errs) { 837 837 log_to_screen 838 ( "Warning. Errors occurred during disk partitioning.");838 (_("Warning. Errors occurred during disk partitioning.")); 839 839 } 840 840 … … 842 842 if (!fmt_errs) { 843 843 log_to_screen 844 ( "Errors during disk partitioning were handled OK.");844 (_("Errors during disk partitioning were handled OK.")); 845 845 log_to_screen 846 ( "Partitions were formatted OK despite those errors.");846 (_("Partitions were formatted OK despite those errors.")); 847 847 ptn_errs = 0; 848 848 } … … 854 854 } else { 855 855 mvaddstr_and_log_it(g_currentY++, 0, 856 "User opted not to partition the devices");856 _("User opted not to partition the devices")); 857 857 if (ask_me_yes_or_no 858 ( "Do you want to format your hard drives?")) {858 (_("Do you want to format your hard drives?"))) { 859 859 fmt_errs = format_everything(mountlist, TRUE); 860 860 if (!fmt_errs) { … … 869 869 mvaddstr_and_log_it(g_currentY++, 870 870 0, 871 "Errors occurred. Please repartition and format drives manually.");871 _("Errors occurred. Please repartition and format drives manually.")); 872 872 done = FALSE; 873 873 } … … 875 875 mvaddstr_and_log_it(g_currentY++, 876 876 0, 877 "Errors occurred during partitioning. Formatting, however, went OK.");877 _("Errors occurred during partitioning. Formatting, however, went OK.")); 878 878 done = TRUE; 879 879 } 880 880 if (!done) { 881 if (!ask_me_yes_or_no( "Re-edit the mountlist?")) {881 if (!ask_me_yes_or_no(_("Re-edit the mountlist?"))) { 882 882 retval++; 883 883 goto end_of_func; … … 895 895 /* restore */ 896 896 if ((restore_all = 897 ask_me_yes_or_no( "Do you want me to restore all of your data?")))897 ask_me_yes_or_no(_("Do you want me to restore all of your data?")))) 898 898 { 899 899 log_msg(1, "Restoring all data"); … … 902 902 if ((restore_all = 903 903 ask_me_yes_or_no 904 ( "Do you want me to restore _some_ of your data?"))) {904 (_("Do you want me to restore _some_ of your data?")))) { 905 905 strcpy(old_restpath, bkpinfo->restore_path); 906 906 for (done = FALSE; !done;) { … … 915 915 // (NB: %s is where your filesystem is mounted now, by default)", MNT_RESTORING); 916 916 if (popup_and_get_string 917 ( "Restore path", "Restore files to where?", tmp,917 (_("Restore path"), _("Restore files to where?"), tmp, 918 918 MAX_STR_LEN / 4)) { 919 919 if (!strcmp(tmp, "/")) { 920 if (!ask_me_yes_or_no( "Are you sure?")) {920 if (!ask_me_yes_or_no(_("Are you sure?"))) { 921 921 goto gotos_suck; 922 922 } … … 932 932 } 933 933 if (!ask_me_yes_or_no 934 ( "Restore another subset of your backup?")) {934 (_("Restore another subset of your backup?"))) { 935 935 done = TRUE; 936 936 } … … 943 943 mvaddstr_and_log_it(g_currentY++, 944 944 0, 945 "User opted not to restore any data. ");945 _("User opted not to restore any data. ")); 946 946 } 947 947 if (retval) { 948 948 mvaddstr_and_log_it(g_currentY++, 949 949 0, 950 "Errors occurred during the restore phase. ");951 } 952 953 if (ask_me_yes_or_no( "Initialize the boot loader?")) {950 _("Errors occurred during the restore phase. ")); 951 } 952 953 if (ask_me_yes_or_no(_("Initialize the boot loader?"))) { 954 954 run_boot_loader(TRUE); 955 955 } else { 956 956 mvaddstr_and_log_it(g_currentY++, 957 957 0, 958 "User opted not to initialize the boot loader.");958 _("User opted not to initialize the boot loader.")); 959 959 } 960 960 … … 965 965 /* if (restore_some || restore_all || */ 966 966 if (ask_me_yes_or_no 967 ( "Label your ext2 and ext3 partitions if necessary?")) {967 (_("Label your ext2 and ext3 partitions if necessary?"))) { 968 968 mvaddstr_and_log_it(g_currentY, 0, 969 "Using e2label to label your ext2,3 partitions");969 _("Using e2label to label your ext2,3 partitions")); 970 970 if (does_file_exist("/tmp/fstab.new")) { 971 971 strcpy(fstab_fname, "/tmp/fstab.new"); … … 980 980 if (res) { 981 981 log_to_screen 982 ( "label-partitions-as-necessary returned an error");983 mvaddstr_and_log_it(g_currentY++, 74, "Failed.");982 (_("label-partitions-as-necessary returned an error")); 983 mvaddstr_and_log_it(g_currentY++, 74, _("Failed.")); 984 984 } else { 985 985 mvaddstr_and_log_it(g_currentY++, 74, "Done."); … … 992 992 mvaddstr_and_log_it(g_currentY++, 993 993 0, 994 "Warning - errors occurred during the restore phase.");994 _("Warning - errors occurred during the restore phase.")); 995 995 } 996 996 end_of_func: … … 1044 1044 retval += compare_mode(bkpinfo, mountlist, raidlist); 1045 1045 } else { 1046 log_to_screen( "OK, I shan't restore/compare any files.");1046 log_to_screen(_("OK, I shan't restore/compare any files.")); 1047 1047 } 1048 1048 } … … 1054 1054 if (system("umount /tmp/isodir 2> /dev/null")) { 1055 1055 log_to_screen 1056 ( "WARNING - unable to unmount device where the ISO files are stored.");1056 (_("WARNING - unable to unmount device where the ISO files are stored.")); 1057 1057 } 1058 1058 // } … … 1115 1115 if (!evaluate_mountlist(mountlist, tmpA, tmpB, tmpC)) { 1116 1116 sprintf(tmp, 1117 "Mountlist analyzed. Result: \"%s %s %s\" Switch to Interactive Mode?",1117 _("Mountlist analyzed. Result: \"%s %s %s\" Switch to Interactive Mode?"), 1118 1118 tmpA, tmpB, tmpC); 1119 1119 if (ask_me_yes_or_no(tmp)) { … … 1125 1125 } 1126 1126 save_mountlist_to_disk(mountlist, g_mountlist_fname); 1127 mvaddstr_and_log_it(1, 30, "Restoring Automatically");1127 mvaddstr_and_log_it(1, 30, _("Restoring Automatically")); 1128 1128 if (bkpinfo->differential) { 1129 log_to_screen( "Because this is a differential backup, disk");1130 log_to_screen( "partitioning and formatting will not take place.");1129 log_to_screen(_("Because this is a differential backup, disk")); 1130 log_to_screen(_("partitioning and formatting will not take place.")); 1131 1131 res = 0; 1132 1132 } else { … … 1154 1154 if (res) { 1155 1155 log_to_screen 1156 ( "Warning. Errors occurred during partitioning.");1156 (_("Warning. Errors occurred during partitioning.")); 1157 1157 res = 0; 1158 1158 } … … 1160 1160 retval += res; 1161 1161 if (!res) { 1162 log_to_screen( "Preparing to format your disk(s)");1162 log_to_screen(_("Preparing to format your disk(s)")); 1163 1163 sleep(1); 1164 1164 system("sync"); 1165 log_to_screen( "Please wait. This may take a few minutes.");1165 log_to_screen(_("Please wait. This may take a few minutes.")); 1166 1166 res += format_everything(mountlist, FALSE); 1167 1167 } … … 1173 1173 mvaddstr_and_log_it(g_currentY++, 1174 1174 0, 1175 "Failed to partition and/or format your hard drives.");1176 1177 if (ask_me_yes_or_no( "Try in interactive mode instead?")) {1175 _("Failed to partition and/or format your hard drives.")); 1176 1177 if (ask_me_yes_or_no(_("Try in interactive mode instead?"))) { 1178 1178 retval = interactive_mode(bkpinfo, mountlist, raidlist); 1179 1179 goto after_the_nuke; 1180 1180 } else 1181 1181 if (!ask_me_yes_or_no 1182 ( "Would you like to try to proceed anyway?")) {1182 (_("Would you like to try to proceed anyway?"))) { 1183 1183 return (retval); 1184 1184 } … … 1188 1188 unmount_all_devices(mountlist); 1189 1189 log_to_screen 1190 ( "Unable to mount all partitions. Sorry, I cannot proceed.");1190 (_("Unable to mount all partitions. Sorry, I cannot proceed.")); 1191 1191 return (retval); 1192 1192 } … … 1204 1204 mvaddstr_and_log_it(g_currentY, 1205 1205 0, 1206 "Using e2label to label your ext2,3 partitions");1206 _("Using e2label to label your ext2,3 partitions")); 1207 1207 1208 1208 sprintf(tmp, "label-partitions-as-necessary %s < /tmp/fstab", … … 1210 1210 res = run_program_and_log_output(tmp, TRUE); 1211 1211 if (res) { 1212 log_to_screen( "label-partitions-as-necessary returned an error");1213 mvaddstr_and_log_it(g_currentY++, 74, "Failed.");1212 log_to_screen(_("label-partitions-as-necessary returned an error")); 1213 mvaddstr_and_log_it(g_currentY++, 74, _("Failed.")); 1214 1214 } else { 1215 mvaddstr_and_log_it(g_currentY++, 74, "Done.");1215 mvaddstr_and_log_it(g_currentY++, 74, _("Done.")); 1216 1216 } 1217 1217 retval += res; … … 1219 1219 after_the_nuke: 1220 1220 if (retval) { 1221 log_to_screen( "Errors occurred during the nuke phase.");1221 log_to_screen(_("Errors occurred during the nuke phase.")); 1222 1222 } else if (strstr(call_program_and_get_last_line_of_output("cat /proc/cmdline"), "RESTORE")) // Bruno's thing 1223 1223 { 1224 1224 log_to_screen 1225 ( "PC was restored successfully. Thank you for using Mondo Rescue.");1225 (_("PC was restored successfully. Thank you for using Mondo Rescue.")); 1226 1226 log_to_screen 1227 ( "Please visit our website at http://www.mondorescue.org for more information.");1227 (_("Please visit our website at http://www.mondorescue.org for more information.")); 1228 1228 } else { 1229 strcpy(tmp, " Mondo has restored your system. Please remove the backup media and reboot.\n\nPlease visit our website at http://www.mondorescue.org for more information.");1229 strcpy(tmp,_(" Mondo has restored your system. Please remove the backup media and reboot.\n\nPlease visit our website at http://www.mondorescue.org for more information.")); 1230 1230 if (strstr(call_program_and_get_last_line_of_output("cat /proc/cmdline"), "restore") == NULL) { 1231 1231 popup_and_OK(tmp); 1232 1232 } 1233 1233 log_to_screen 1234 ( "Mondo has restored your system. Please remove the backup media and reboot.");1234 (_("Mondo has restored your system. Please remove the backup media and reboot.")); 1235 1235 log_to_screen 1236 ( "Please visit our website at http://www.mondorescue.org for more information.");1236 (_("Please visit our website at http://www.mondorescue.org for more information.")); 1237 1237 } 1238 1238 g_I_have_just_nuked = TRUE; … … 1283 1283 if (!g_restoring_live_from_cd) { 1284 1284 popup_and_OK 1285 ( "Please insert tape/CD/boot floppy, then hit 'OK' to continue.");1285 (_("Please insert tape/CD/boot floppy, then hit 'OK' to continue.")); 1286 1286 sleep(1); 1287 1287 } … … 1296 1296 log_msg(2, "bkpinfo->isodir = %s", bkpinfo->isodir); 1297 1297 1298 open_evalcall_form( "Thinking...");1298 open_evalcall_form(_("Thinking...")); 1299 1299 1300 1300 get_cfg_file_from_archive_or_bust(bkpinfo); … … 1309 1309 save_filelist(filelist, "/tmp/selected-files.txt"); 1310 1310 strcpy(old_restpath, bkpinfo->restore_path); 1311 if (popup_and_get_string( "Restore path",1312 "Restore files to where? )",1311 if (popup_and_get_string(_("Restore path"), 1312 _("Restore files to where? )"), 1313 1313 bkpinfo->restore_path, MAX_STR_LEN / 4)) { 1314 1314 iamhere("Restoring everything"); … … 1406 1406 1407 1407 if (!(fin = fopen(slice_fname(bigfileno, 0, ARCHIVES_PATH, ""), "r"))) { 1408 log_to_screen( "Cannot even open bigfile's info file");1408 log_to_screen(_("Cannot even open bigfile's info file")); 1409 1409 return (1); 1410 1410 } … … 1519 1519 log_msg(3, "file_to_openout = %s", file_to_openout); 1520 1520 if (!(fout = fopen(file_to_openout, "w"))) { 1521 log_to_screen( "Cannot openout outfile_fname - hard disk full?");1521 log_to_screen(_("Cannot openout outfile_fname - hard disk full?")); 1522 1522 return (1); 1523 1523 } … … 1542 1542 g_current_media_number, sliceno); 1543 1543 log_msg(2, tmp); 1544 sprintf(tmp, "Restoring from %s #%d",1544 sprintf(tmp, _("Restoring from %s #%d"), 1545 1545 media_descriptor_string(bkpinfo->backup_media_type), 1546 1546 g_current_media_number); 1547 1547 log_to_screen(tmp); 1548 1548 insist_on_this_cd_number(bkpinfo, g_current_media_number); 1549 log_to_screen( "Continuing to restore.");1549 log_to_screen(_("Continuing to restore.")); 1550 1550 } else { 1551 1551 strcpy(tmp, … … 1576 1576 strcpy(suffix, ""); 1577 1577 } else { 1578 log_to_screen( "OK, that's pretty fsck0red...");1578 log_to_screen(_("OK, that's pretty fsck0red...")); 1579 1579 return (1); 1580 1580 } … … 2034 2034 if (run_program_and_log_output(tmp, FALSE)) { 2035 2035 log_to_screen 2036 ( "(compare_a_tarball) Compression program not found - oh no!");2036 (_("(compare_a_tarball) Compression program not found - oh no!")); 2037 2037 paranoid_MR_finish(1); 2038 2038 } … … 2092 2092 if (res) { 2093 2093 log_to_screen 2094 ( "Errors occurred while setting extended attributes");2094 (_("Errors occurred while setting extended attributes")); 2095 2095 } else { 2096 2096 log_msg(1, "I set xattr OK"); … … 2103 2103 if (res) { 2104 2104 log_to_screen 2105 ( "Errors occurred while setting access control lists");2105 (_("Errors occurred while setting access control lists")); 2106 2106 } else { 2107 2107 log_msg(1, "I set ACL OK"); … … 2120 2120 if (does_file_exist("/PAUSE")) { 2121 2121 popup_and_OK 2122 ( "Press ENTER to go on. Delete /PAUSE to stop these pauses.");2122 (_("Press ENTER to go on. Delete /PAUSE to stop these pauses.")); 2123 2123 } 2124 2124 unlink(filelist_subset_fname); … … 2317 2317 2318 2318 if (does_file_exist("/PAUSE") && current_tarball_number >= 50) { 2319 log_to_screen( "Paused after set %ld", current_tarball_number);2320 popup_and_OK( "Pausing. Press ENTER to continue.");2319 log_to_screen(_("Paused after set %ld"), current_tarball_number); 2320 popup_and_OK(_("Pausing. Press ENTER to continue.")); 2321 2321 } 2322 2322 … … 2381 2381 read_cfg_var(g_mondo_cfg_file, "total-slices", tmp); 2382 2382 total_slices = atol(tmp); 2383 sprintf(tmp, "Reassembling large files ");2383 sprintf(tmp, _("Reassembling large files ")); 2384 2384 mvaddstr_and_log_it(g_currentY, 0, tmp); 2385 2385 if (length_of_file(BIGGIELIST) < 6) { … … 2397 2397 log_msg(2, tmp); 2398 2398 2399 open_progress_form( "Reassembling large files",2400 "I am now reassembling all the large files.",2401 "Please wait. This may take some time.",2399 open_progress_form(_("Reassembling large files"), 2400 _("I am now reassembling all the large files."), 2401 _("Please wait. This may take some time."), 2402 2402 "", total_slices); 2403 2403 for (bigfileno = 0, finished = FALSE; !finished;) { … … 2420 2420 insist_on_this_cd_number(bkpinfo, 2421 2421 ++g_current_media_number); 2422 sprintf(tmp, "Restoring from %s #%d",2422 sprintf(tmp, _("Restoring from %s #%d"), 2423 2423 media_descriptor_string(bkpinfo-> 2424 2424 backup_media_type), … … 2434 2434 } else { 2435 2435 just_changed_cds = FALSE; 2436 sprintf(tmp, "Restoring big file %ld", bigfileno + 1);2436 sprintf(tmp, _("Restoring big file %ld"), bigfileno + 1); 2437 2437 update_progress_form(tmp); 2438 2438 res = … … 2463 2463 if (does_file_exist("/PAUSE")) { 2464 2464 popup_and_OK 2465 ( "Press ENTER to go on. Delete /PAUSE to stop these pauses.");2465 (_("Press ENTER to go on. Delete /PAUSE to stop these pauses.")); 2466 2466 } 2467 2467 close_progress_form(); 2468 2468 if (retval) { 2469 mvaddstr_and_log_it(g_currentY++, 74, "Errors.");2469 mvaddstr_and_log_it(g_currentY++, 74, _("Errors.")); 2470 2470 } else { 2471 mvaddstr_and_log_it(g_currentY++, 74, "Done.");2471 mvaddstr_and_log_it(g_currentY++, 74, _("Done.")); 2472 2472 } 2473 2473 paranoid_free(xattr_fname); … … 2517 2517 assert(bkpinfo != NULL); 2518 2518 2519 mvaddstr_and_log_it(g_currentY, 0, "Restoring from archives");2519 mvaddstr_and_log_it(g_currentY, 0, _("Restoring from archives")); 2520 2520 log_msg(2, 2521 2521 "Insisting on 1st CD, so that I can have a look at LAST-FILELIST-NUMBER"); … … 2527 2527 read_cfg_var(g_mondo_cfg_file, "last-filelist-number", tmp); 2528 2528 max_val = atol(tmp) + 1; 2529 sprintf(progress_str, "Restoring from %s #%d",2529 sprintf(progress_str, _("Restoring from %s #%d"), 2530 2530 media_descriptor_string(bkpinfo->backup_media_type), 2531 2531 g_current_media_number); 2532 2532 log_to_screen(progress_str); 2533 open_progress_form( "Restoring from archives",2534 "Restoring data from the archives.",2535 "Please wait. This may take some time.",2533 open_progress_form(_("Restoring from archives"), 2534 _("Restoring data from the archives."), 2535 _("Please wait. This may take some time."), 2536 2536 progress_str, max_val); 2537 2537 for (;;) { … … 2559 2559 if (current_tarball_number == 0) { 2560 2560 log_to_screen 2561 ( "No tarballs. Strange. Maybe you only backed up freakin' big files?");2561 (_("No tarballs. Strange. Maybe you only backed up freakin' big files?")); 2562 2562 return (0); 2563 2563 } … … 2569 2569 } 2570 2570 g_current_media_number++; 2571 sprintf(progress_str, "Restoring from %s #%d",2571 sprintf(progress_str, _("Restoring from %s #%d"), 2572 2572 media_descriptor_string(bkpinfo->backup_media_type), 2573 2573 g_current_media_number); 2574 2574 log_to_screen(progress_str); 2575 2575 } else { 2576 sprintf(progress_str, "Restoring from fileset #%ld on %s #%d",2576 sprintf(progress_str, _("Restoring from fileset #%ld on %s #%d"), 2577 2577 current_tarball_number, 2578 2578 media_descriptor_string(bkpinfo->backup_media_type), … … 2586 2586 filelist); 2587 2587 } 2588 sprintf(tmp, "%s #%d, fileset #%ld - restore ",2588 sprintf(tmp, _("%s #%d, fileset #%ld - restore "), 2589 2589 media_descriptor_string(bkpinfo->backup_media_type), 2590 2590 g_current_media_number, current_tarball_number); 2591 2591 if (res) { 2592 strcat(tmp, "reported errors");2592 strcat(tmp, _("reported errors")); 2593 2593 } else if (attempts > 1) { 2594 strcat(tmp, "succeeded");2594 strcat(tmp, _("succeeded")); 2595 2595 } else { 2596 strcat(tmp, "succeeded");2596 strcat(tmp, _("succeeded")); 2597 2597 } 2598 2598 if (attempts > 1) { 2599 sprintf(tmp + strlen(tmp), " (%d attempts) - review logs",2599 sprintf(tmp + strlen(tmp), _(" (%d attempts) - review logs"), 2600 2600 attempts); 2601 2601 } … … 2612 2612 close_progress_form(); 2613 2613 if (retval) { 2614 mvaddstr_and_log_it(g_currentY++, 74, "Errors.");2614 mvaddstr_and_log_it(g_currentY++, 74, _("Errors.")); 2615 2615 } else { 2616 mvaddstr_and_log_it(g_currentY++, 74, "Done.");2616 mvaddstr_and_log_it(g_currentY++, 74, _("Done.")); 2617 2617 } 2618 2618 paranoid_free(tmp); … … 2697 2697 noof_biggiefiles); 2698 2698 log_msg(2, tmp); 2699 open_progress_form( "Reassembling large files",2700 "I am now reassembling all the large files.",2701 "Please wait. This may take some time.",2699 open_progress_form(_("Reassembling large files"), 2700 _("I am now reassembling all the large files."), 2701 _("Please wait. This may take some time."), 2702 2702 "", total_slices); 2703 2703 … … 2719 2719 p++; 2720 2720 } 2721 sprintf(tmp, "Restoring big file %ld (%lld K)",2721 sprintf(tmp, _("Restoring big file %ld (%lld K)"), 2722 2722 current_bigfile_number + 1, biggie_size / 1024); 2723 2723 update_progress_form(tmp); … … 2770 2770 if (does_file_exist("/PAUSE")) { 2771 2771 popup_and_OK 2772 ( "Press ENTER to go on. Delete /PAUSE to stop these pauses.");2772 (_("Press ENTER to go on. Delete /PAUSE to stop these pauses.")); 2773 2773 } 2774 2774 2775 2775 close_progress_form(); 2776 2776 if (retval) { 2777 mvaddstr_and_log_it(g_currentY++, 74, "Errors.");2777 mvaddstr_and_log_it(g_currentY++, 74, _("Errors.")); 2778 2778 } else { 2779 mvaddstr_and_log_it(g_currentY++, 74, "Done.");2779 mvaddstr_and_log_it(g_currentY++, 74, _("Done.")); 2780 2780 } 2781 2781 paranoid_free(biggies_whose_EXATs_we_should_set); … … 2833 2833 malloc_string(xattr_fname); 2834 2834 malloc_string(acl_fname); 2835 mvaddstr_and_log_it(g_currentY, 0, "Restoring from archives");2835 mvaddstr_and_log_it(g_currentY, 0, _("Restoring from archives")); 2836 2836 read_cfg_var(g_mondo_cfg_file, "last-filelist-number", tmp); 2837 2837 max_val = atol(tmp) + 1; … … 2841 2841 run_program_and_log_output("pwd", 5); 2842 2842 2843 sprintf(progress_str, "Restoring from media #%d",2843 sprintf(progress_str, _("Restoring from media #%d"), 2844 2844 g_current_media_number); 2845 2845 log_to_screen(progress_str); 2846 open_progress_form( "Restoring from archives",2847 "Restoring data from the archives.",2848 "Please wait. This may take some time.",2846 open_progress_form(_("Restoring from archives"), 2847 _("Restoring data from the archives."), 2848 _("Please wait. This may take some time."), 2849 2849 progress_str, max_val); 2850 2850 … … 2880 2880 } 2881 2881 sprintf(tmp, 2882 "Restoring from fileset #%ld (name=%s, size=%ld K)",2882 _("Restoring from fileset #%ld (name=%s, size=%ld K)"), 2883 2883 current_afioball_number, tmp_fname, (long) tmp_size >> 10); 2884 2884 res = … … 2889 2889 retval += res; 2890 2890 if (res) { 2891 sprintf(tmp, "Fileset %ld - errors occurred",2891 sprintf(tmp, _("Fileset %ld - errors occurred"), 2892 2892 current_afioball_number); 2893 2893 log_to_screen(tmp); … … 2901 2901 current_afioball_number++; 2902 2902 g_current_progress++; 2903 sprintf(progress_str, "Restoring from fileset #%ld on %s #%d",2903 sprintf(progress_str, _("Restoring from fileset #%ld on %s #%d"), 2904 2904 current_afioball_number, 2905 2905 media_descriptor_string(bkpinfo->backup_media_type), … … 2913 2913 close_progress_form(); 2914 2914 if (retval) { 2915 mvaddstr_and_log_it(g_currentY++, 74, "Errors.");2915 mvaddstr_and_log_it(g_currentY++, 74, _("Errors.")); 2916 2916 } else { 2917 mvaddstr_and_log_it(g_currentY++, 74, "Done.");2917 mvaddstr_and_log_it(g_currentY++, 74, _("Done.")); 2918 2918 } 2919 2919 paranoid_free(tmp); … … 2966 2966 if (!find_home_of_exe("petris") && !g_text_mode) { 2967 2967 newtDrawRootText(0, g_noof_rows - 2, 2968 "Press ALT-<left cursor> twice to play Petris :-) ");2968 _("Press ALT-<left cursor> twice to play Petris :-) ")); 2969 2969 newtRefresh(); 2970 2970 } 2971 mvaddstr_and_log_it(g_currentY, 0, "Preparing to read your archives");2971 mvaddstr_and_log_it(g_currentY, 0, _("Preparing to read your archives")); 2972 2972 if (IS_THIS_A_STREAMING_BACKUP(bkpinfo->backup_media_type)) { 2973 2973 mount_cdrom(bkpinfo); 2974 2974 mvaddstr_and_log_it(g_currentY++, 0, 2975 "Restoring OS and data from streaming media");2975 _("Restoring OS and data from streaming media")); 2976 2976 if (bkpinfo->backup_media_type == cdstream) { 2977 2977 openin_cdstream(bkpinfo); … … 2990 2990 } else { 2991 2991 mvaddstr_and_log_it(g_currentY++, 0, 2992 "Restoring OS and data from CD ");2992 _("Restoring OS and data from CD ")); 2993 2993 mount_cdrom(bkpinfo); 2994 2994 resA = restore_all_tarballs_from_CD(bkpinfo, filelist); … … 2997 2997 chdir(cwd); 2998 2998 if (resA + resB) { 2999 log_to_screen( "Errors occurred while data was being restored.");2999 log_to_screen(_("Errors occurred while data was being restored.")); 3000 3000 } 3001 3001 if (length_of_file("/etc/raidtab") > 0) { … … 3108 3108 retval++; 3109 3109 log_to_screen 3110 ( "Error(s) occurred while processing filelist and wildcard");3110 (_("Error(s) occurred while processing filelist and wildcard")); 3111 3111 } 3112 3112 iamhere("FIXME"); … … 3203 3203 * * 3204 3204 **************************************************************************/ 3205 3206 #ifdef ENABLE_NLS 3207 setlocale(LC_ALL, ""); 3208 (void) textdomain("mondo"); 3209 #endif 3210 3205 3211 if (getuid() != 0) { 3206 fprintf(stderr, "Please run as root.\r\n");3212 fprintf(stderr, _("Please run as root.\n")); 3207 3213 exit(127); 3208 3214 } … … 3349 3355 strcpy(bkpinfo->restore_path, "/tmp/TESTING"); 3350 3356 bkpinfo->backup_media_type = dvd; 3351 open_progress_form( "Reassembling /dev/hda1",3352 "Shark is a bit of a silly person.",3353 "Please wait. This may take some time.",3357 open_progress_form(_("Reassembling /dev/hda1"), 3358 _("Shark is a bit of a silly person."), 3359 _("Please wait. This may take some time."), 3354 3360 "", 1999); 3355 3361 system("rm -Rf /tmp/*pih*"); … … 3427 3433 retval = run_grub(FALSE, "/dev/hda"); 3428 3434 if (retval) { 3429 log_to_screen( "Failed to write Master Boot Record");3435 log_to_screen(_("Failed to write Master Boot Record")); 3430 3436 } 3431 3437 paranoid_MR_finish(0); … … 3438 3444 if (argc != 1) { 3439 3445 popup_and_OK 3440 ( "Live mode doesn't support command-line parameters yet.");3446 (_("Live mode doesn't support command-line parameters yet.")); 3441 3447 paranoid_MR_finish(1); 3442 3448 // return(1); … … 3470 3476 log_msg(2, "FYI, MOUNTLIST_FNAME = %s ", g_mountlist_fname); 3471 3477 if (argc == 3 && strcmp(argv[1], "--monitas-memorex") == 0) { 3472 log_to_screen( "Uh, that hasn't been implemented yet.");3478 log_to_screen(_("Uh, that hasn't been implemented yet.")); 3473 3479 paranoid_MR_finish(1); 3474 3480 } … … 3499 3505 if (retval) { 3500 3506 log_to_screen 3501 ( "Warning - load_raidtab_into_raidlist returned an error");3507 (_("Warning - load_raidtab_into_raidlist returned an error")); 3502 3508 } 3503 3509 … … 3553 3559 } 3554 3560 if (retval) { 3555 log_to_screen( "Failed to write Master Boot Record");3561 log_to_screen(_("Failed to write Master Boot Record")); 3556 3562 } 3557 3563 } else if (argc == 2 && strcmp(argv[1], "--isonuke") == 0) { … … 3559 3565 retval = iso_mode(bkpinfo, mountlist, raidlist, TRUE); 3560 3566 } else if (argc != 1) { 3561 log_to_screen( "Invalid paremeters");3567 log_to_screen(_("Invalid paremeters")); 3562 3568 paranoid_MR_finish(1); 3563 3569 } else { … … 3571 3577 if (does_file_exist("/tmp/changed.files")) { 3572 3578 log_to_screen 3573 ( "See /tmp/changed.files for list of files that have changed.");3579 (_("See /tmp/changed.files for list of files that have changed.")); 3574 3580 } 3575 3581 mvaddstr_and_log_it(g_currentY++, 3576 3582 0, 3577 "Run complete. Errors were reported. Please review the logfile.");3583 _("Run complete. Errors were reported. Please review the logfile.")); 3578 3584 } else { 3579 3585 if (IS_THIS_A_STREAMING_BACKUP(bkpinfo->backup_media_type)) { 3580 3586 mvaddstr_and_log_it(g_currentY++, 3581 3587 0, 3582 "Run complete. Please remove floppy/CD/media and reboot.");3588 _("Run complete. Please remove floppy/CD/media and reboot.")); 3583 3589 } else { 3584 3590 run_program_and_log_output("sync", FALSE); … … 3601 3607 mvaddstr_and_log_it(g_currentY++, 3602 3608 0, 3603 "Run complete. Please remove media and reboot.");3609 _("Run complete. Please remove media and reboot.")); 3604 3610 } 3605 3611 } … … 3611 3617 if (mount_all_devices(mountlist, TRUE)) { 3612 3618 log_to_screen 3613 ( "Unable to re-mount partitions for post-nuke stuff");3619 (_("Unable to re-mount partitions for post-nuke stuff")); 3614 3620 } else { 3615 3621 log_msg(1, "Re-mounted partitions for post-nuke stuff"); … … 3644 3650 run_program_and_log_output(tmp, FALSE); 3645 3651 log_to_screen 3646 ( "Restore log copied to /tmp/mondo-restore.log on your hard disk");3652 (_("Restore log copied to /tmp/mondo-restore.log on your hard disk")); 3647 3653 sprintf(tmp, 3648 "Mondo-restore is exiting (retval=%d) ",3654 _("Mondo-restore is exiting (retval=%d) "), 3649 3655 retval); 3650 3656 log_to_screen(tmp);
Note:
See TracChangeset
for help on using the changeset viewer.