Changeset 507 in MondoRescue for trunk/mondo/mondo/mondorestore/mondo-prep.c


Ignore:
Timestamp:
Apr 30, 2006, 2:04:16 AM (18 years ago)
Author:
bcornec
Message:

merge -r489:506 $SVN_M/branches/stable

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/mondo/mondo/mondorestore/mondo-prep.c

    r197 r507  
    239239// zero & reboot
    240240            log_to_screen
    241                 ("I am sorry for the inconvenience but I must ask you to reboot.");
     241                (_("I am sorry for the inconvenience but I must ask you to reboot."));
    242242            log_to_screen
    243                 ("I need to reset the Master Boot Record; in order to be");
     243                (_("I need to reset the Master Boot Record; in order to be"));
    244244            log_to_screen
    245                 ("sure the kernel notices, I must reboot after doing it.");
     245                (_("sure the kernel notices, I must reboot after doing it."));
    246246            log_to_screen("Please hit 'Enter' to reboot.");
    247247            for (lino = 0; lino < drivelist->entries; lino++) {
     
    269269            system("sync");
    270270            popup_and_OK
    271                 ("I must now reboot. Please leave the boot media in the drive and repeat your actions - e.g. type 'nuke' - and it should work fine.");
     271                (_("I must now reboot. Please leave the boot media in the drive and repeat your actions - e.g. type 'nuke' - and it should work fine."));
    272272            system("reboot");
    273273        }
     
    615615#ifdef __FreeBSD__
    616616    log_to_screen
    617         ("I don't know how to extrapolate the mountlist on FreeBSD. Sorry.");
     617        (_("I don't know how to extrapolate the mountlist on FreeBSD. Sorry."));
    618618    return (1);
    619619#endif
     
    624624            if (!does_file_exist("/etc/raidtab")) {
    625625                log_to_screen
    626                     ("Cannot find /etc/raidtab - cannot extrapolate the fdisk entries");
     626                    (_("Cannot find /etc/raidtab - cannot extrapolate the fdisk entries"));
    627627                finish(1);
    628628            }
     
    749749    }
    750750    if (is_this_device_mounted(device)) {
    751         sprintf(tmp, "%s is mounted - cannot format it       ", device);
     751        sprintf(tmp, _("%s is mounted - cannot format it       "), device);
    752752        log_to_screen(tmp);
    753753        paranoid_free(program);
     
    761761            if (!does_file_exist("/tmp/raidconf.txt")) {
    762762                log_to_screen
    763                     ("/tmp/raidconf.txt does not exist. I therefore cannot start Vinum.");
     763                    (_("/tmp/raidconf.txt does not exist. I therefore cannot start Vinum."));
    764764            } else {
    765765                int res;
     
    769769                if (res) {
    770770                    log_to_screen
    771                         ("`vinum create /tmp/raidconf.txt' returned errors. Please fix them and re-run mondorestore.");
     771                        (_("`vinum create /tmp/raidconf.txt' returned errors. Please fix them and re-run mondorestore."));
    772772                    finish(1);
    773773                }
     
    780780            char line[MAX_STR_LEN];
    781781            sprintf(tmp,
    782                     "Initializing Vinum device %s (this may take a *long* time)",
     782                    _("Initializing Vinum device %s (this may take a *long* time)"),
    783783                    device);
    784784            log_to_screen(tmp);
     
    823823        }
    824824#else
    825         sprintf(tmp, "Initializing RAID device %s", device);
     825        sprintf(tmp, _("Initializing RAID device %s"), device);
    826826        log_to_screen(tmp);
    827827
    828828// Shouldn't be necessary.
    829         log_to_screen("Stopping %s", device);
     829        log_to_screen(_("Stopping %s"), device);
    830830        stop_raid_device(device);
    831831        system("sync");
     
    900900    retval += res;
    901901    if (retval) {
    902         strcat(tmp, "...failed");
     902        strcat(tmp, _("...failed"));
    903903    } else {
    904         strcat(tmp, "...OK");
     904        strcat(tmp, _("...OK"));
    905905    }
    906906
     
    951951            (interactively) ? "true" : "false");
    952952    log_it(tmp);
    953     mvaddstr_and_log_it(g_currentY, 0, "Formatting partitions     ");
    954     open_progress_form("Formatting partitions",
    955                        "I am now formatting your hard disk partitions.",
    956                        "This may take up to five minutes.", "",
     953    mvaddstr_and_log_it(g_currentY, 0, _("Formatting partitions     "));
     954    open_progress_form(_("Formatting partitions"),
     955                       _("I am now formatting your hard disk partitions."),
     956                       _("This may take up to five minutes."), "",
    957957                       mountlist->entries + 1);
    958958
     
    10011001    if (does_file_exist("/tmp/i-want-my-lvm")) {
    10021002        wait_until_software_raids_are_prepped("/proc/mdstat", 10);
    1003         log_to_screen("Configuring LVM");
     1003        log_to_screen(_("Configuring LVM"));
    10041004        if (!g_text_mode) {
    10051005            newtSuspend();
     
    10921092
    10931093    if (retval) {
    1094         mvaddstr_and_log_it(g_currentY++, 74, "Failed.");
     1094        mvaddstr_and_log_it(g_currentY++, 74, _("Failed."));
    10951095        log_to_screen
    1096             ("Errors occurred during the formatting of your hard drives.");
     1096            (_("Errors occurred during the formatting of your hard drives."));
    10971097    } else {
    1098         mvaddstr_and_log_it(g_currentY++, 74, "Done.");
     1098        mvaddstr_and_log_it(g_currentY++, 74, _("Done."));
    10991099    }
    11001100
     
    11071107//123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789
    11081108            log_to_screen
    1109                 ("Partition table locked up %d times. At least one 'mkfs' (format) command",
     1109                (_("Partition table locked up %d times. At least one 'mkfs' (format) command"),
    11101110                 g_partition_table_locked_up);
    11111111            log_to_screen
    1112                 ("failed. I think these two events are related. Sometimes, fdisk's ioctl() call");
     1112                (_("failed. I think these two events are related. Sometimes, fdisk's ioctl() call"));
    11131113            log_to_screen
    1114                 ("to refresh its copy of the partition table causes the kernel to lock the ");
     1114                (_("to refresh its copy of the partition table causes the kernel to lock the "));
    11151115            log_to_screen
    1116                 ("partition table. I believe this has just happened.");
     1116                (_("partition table. I believe this has just happened."));
    11171117            if (ask_me_yes_or_no
    1118                 ("Please choose 'yes' to reboot and try again; or 'no' to ignore this warning and continue."))
     1118                (_("Please choose 'yes' to reboot and try again; or 'no' to ignore this warning and continue.")))
    11191119            {
    11201120                system("sync");
     
    11251125        } else {
    11261126            log_to_screen
    1127                 ("Partition table locked up %d time%c. However, disk formatting succeeded.",
     1127                (_("Partition table locked up %d time%c. However, disk formatting succeeded."),
    11281128                 g_partition_table_locked_up,
    11291129                 (g_partition_table_locked_up == 1) ? '.' : 's');
     
    15281528    pout_to_fdisk = popen(tmp, "w");
    15291529    if (!pout_to_fdisk) {
    1530         log_to_screen("Cannot call parted2fdisk to configure %s", drivename);
     1530        log_to_screen(_("Cannot call parted2fdisk to configure %s"), drivename);
    15311531        paranoid_free(device_str);
    15321532        paranoid_free(format);
     
    15641564                    if (system(command)) {
    15651565                        log_to_screen
    1566                             ("Warning! Unable to make the drive bootable.");
     1566                            (_("Warning! Unable to make the drive bootable."));
    15671567                    }
    15681568                    paranoid_free(device_str);
     
    16141614            if (!file) {
    16151615                sprintf(tmp,
    1616                         "Warning - unable to open %s for wiping it's partition table",
     1616                        _("Warning - unable to open %s for wiping it's partition table"),
    16171617                        drivename);
    16181618                log_to_screen(tmp);
     
    16211621            for (i = 0; i < 512; i++) {
    16221622                if (!write(file, "\0", 1)) {
    1623                     sprintf(tmp, "Warning - unable to write to %s",
     1623                    sprintf(tmp, _("Warning - unable to write to %s"),
    16241624                            drivename);
    16251625                    log_to_screen(tmp);
     
    16551655        if (current_devno == 5 && previous_devno == 4) {
    16561656            log_to_screen
    1657                 ("You must leave at least one partition spare as the Extended partition.");
     1657                (_("You must leave at least one partition spare as the Extended partition."));
    16581658            paranoid_free(device_str);
    16591659            paranoid_free(format);
     
    16721672            if (system(tmp)) {
    16731673                log_to_screen
    1674                     ("Warning! Unable to make the slice bootable.");
     1674                    (_("Warning! Unable to make the slice bootable."));
    16751675            }
    16761676        }
     
    17001700            g_partition_table_locked_up++;
    17011701            log_to_screen
    1702                 ("A flaw in the Linux kernel has locked the partition table.");
     1702                (_("A flaw in the Linux kernel has locked the partition table."));
    17031703        }
    17041704    }
     
    17731773
    17741774    if (is_this_device_mounted(partition_name)) {
    1775         sprintf(tmp, "%s is mounted, and should not be partitioned",
     1775        sprintf(tmp, _("%s is mounted, and should not be partitioned"),
    17761776                partition_name);
    17771777        log_to_screen(tmp);
     
    18101810                if (prev_partno >= 4) {
    18111811                    log_to_screen
    1812                         ("You need to leave at least one partition free, for 'extended/logical'");
     1812                        (_("You need to leave at least one partition free, for 'extended/logical'"));
    18131813                    paranoid_free(program);
    18141814                    paranoid_free(partition_name);
     
    20012001*/
    20022002
    2003     open_progress_form("Partitioning devices",
    2004                        "I am now going to partition all your drives.",
    2005                        "This should not take more than five minutes.", "",
     2003    open_progress_form(_("Partitioning devices"),
     2004                       _("I am now going to partition all your drives."),
     2005                       _("This should not take more than five minutes."), "",
    20062006                       mountlist->entries);
    20072007
     
    20152015    close_progress_form();
    20162016    if (retval) {
    2017         mvaddstr_and_log_it(g_currentY++, 74, "Failed.");
     2017        mvaddstr_and_log_it(g_currentY++, 74, _("Failed."));
    20182018        log_to_screen
    2019             ("Errors occurred during the partitioning of your hard drives.");
     2019            (_("Errors occurred during the partitioning of your hard drives."));
    20202020    } else {
    2021         mvaddstr_and_log_it(g_currentY++, 74, "Done.");
     2021        mvaddstr_and_log_it(g_currentY++, 74, _("Done."));
    20222022        paranoid_system("rm -f /tmp/fdisk*.log 2> /dev/null");
    20232023    }
     
    25312531        return;
    25322532    }
    2533     sprintf(tmp, "Expanding entries to suit drive %s (%ld MB)", drive_name,
     2533    sprintf(tmp, _("Expanding entries to suit drive %s (%ld MB)"), drive_name,
    25342534            current_size_of_drive);
    25352535    log_to_screen(tmp);
     
    25502550
    25512551    if (original_size_of_drive <= 0) {
    2552         sprintf(tmp, "Cannot resize %s's entries. Drive not found.",
     2552        sprintf(tmp, _("Cannot resize %s's entries. Drive not found."),
    25532553                drive_name);
    25542554        log_to_screen(tmp);
     
    25802580            newsizL = (long) new_size;
    25812581        }
    2582         sprintf(tmp, "Changing %s from %lld KB to %ld KB",
     2582        sprintf(tmp, _("Changing %s from %lld KB to %ld KB"),
    25832583                drivemntlist->el[partno]->device,
    25842584                drivemntlist->el[partno]->size, newsizL);
     
    25872587    }
    25882588    final_size = get_phys_size_of_drive(drive_name);
    2589     sprintf(tmp, "final_size = %ld MB", final_size);
     2589    sprintf(tmp, _("final_size = %ld MB"), final_size);
    25902590    log_to_screen(tmp);
    25912591    paranoid_free(tmp);
     
    26282628                                                        device);
    26292629    }
    2630     log_to_screen("Mountlist adjusted to suit current hard drive(s)");
     2630    log_to_screen(_("Mountlist adjusted to suit current hard drive(s)"));
    26312631    paranoid_free(drivelist);
    26322632}
Note: See TracChangeset for help on using the changeset viewer.