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-rstr-tools.c

    r426 r507  
    225225
    226226        asprintf(&question,
    227                 "Should I restore the image of %s ?", incoming);
     227                _("Should I restore the image of %s ?", incoming));
    228228
    229229        if (ask_me_yes_or_no(question)) {
     
    337337    while (get_cfg_file_from_archive(bkpinfo)) {
    338338        if (!ask_me_yes_or_no
    339             ("Failed to find config file/archives. Choose another source?"))
     339            (_("Failed to find config file/archives. Choose another source?")))
    340340        {
    341341            fatal_error("Could not find config file/archives. Aborting.");
     
    441441
    442442    if (is_this_device_mounted(g_isodir_device)) {
    443         log_to_screen("WARNING - isodir is already mounted");
     443        log_to_screen(_("WARNING - isodir is already mounted"));
    444444        already_mounted = TRUE;
    445445    } else {
     
    458458        if (run_program_and_log_output(mount_isodir_command, FALSE)) {
    459459            popup_and_OK
    460                 ("Cannot mount the device where the ISO files are stored.");
     460                (_("Cannot mount the device where the ISO files are stored."));
    461461            return (1);
    462462        }
    463463        log_to_screen
    464             ("I have mounted the device where the ISO files are stored.");
     464            (_("I have mounted the device where the ISO files are stored."));
    465465    }
    466466    if (!IS_THIS_A_STREAMING_BACKUP(bkpinfo->backup_media_type)) {
     
    473473    if (i < 0) {
    474474        popup_and_OK
    475             ("Cannot find ISO images in the directory you specified.");
     475            (_("Cannot find ISO images in the directory you specified."));
    476476        retval = 1;
    477477    }
     
    599599    these_failed[0] = '\0';
    600600
    601     mvaddstr_and_log_it(g_currentY, 0, "Mounting devices         ");
    602     open_progress_form("Mounting devices",
    603                        "I am now mounting all the drives.",
    604                        "This should not take long.",
     601    mvaddstr_and_log_it(g_currentY, 0, _("Mounting devices         "));
     602    open_progress_form(_("Mounting devices"),
     603                       _("I am now mounting all the drives."),
     604                       _("This should not take long."),
    605605                       "", mountlist->entries);
    606606
     
    610610                    "Again with the /proc - why is this in your mountlist?");
    611611        } else if (is_this_device_mounted(mountlist->el[lino].device)) {
    612             sprintf(tmp, "%s is already mounted",
     612            sprintf(tmp, _("%s is already mounted"),
    613613                    mountlist->el[lino].device);
    614614            log_to_screen(tmp);
     
    639639        if (g_partition_table_locked_up > 0) {
    640640            log_to_screen
    641                 ("fdisk's ictol() call to refresh its copy of the partition table causes the kernel to");
     641                (_("fdisk's ioctl() call to refresh its copy of the partition table causes the kernel to"));
    642642            log_to_screen
    643                 ("lock up the partition table. You might have to reboot and use Interactive Mode to");
     643                (_("lock up the partition table. You might have to reboot and use Interactive Mode to"));
    644644            log_to_screen
    645                 ("format and restore *without* partitioning first. Sorry for the inconvenience.");
    646         }
    647         sprintf(tmp, "Could not mount devices %s- shall I abort?",
     645                (_("format and restore *without* partitioning first. Sorry for the inconvenience."));
     646        }
     647        sprintf(tmp, _("Could not mount devices %s- shall I abort?"),
    648648                these_failed);
    649649        if (!ask_me_yes_or_no(tmp)) {
    650650            retval = 0;
    651651            log_to_screen
    652                 ("Continuing, although some devices failed to be mounted");
    653             mvaddstr_and_log_it(g_currentY++, 74, "Done.");
     652                (_("Continuing, although some devices failed to be mounted"));
     653            mvaddstr_and_log_it(g_currentY++, 74, _("Done."));
    654654        } else {
    655             mvaddstr_and_log_it(g_currentY++, 74, "Failed.");
     655            mvaddstr_and_log_it(g_currentY++, 74, _("Failed."));
    656656            log_to_screen
    657                 ("Unable to mount some or all of your partitions.");
     657                (_("Unable to mount some or all of your partitions."));
    658658        }
    659659    } else {
    660         log_to_screen("All partitions were mounted OK.");
    661         mvaddstr_and_log_it(g_currentY++, 74, "Done.");
     660        log_to_screen(_("All partitions were mounted OK."));
     661        mvaddstr_and_log_it(g_currentY++, 74, _("Done."));
    662662    }
    663663    run_program_and_log_output("df -P -m", 3);
     
    13221322    if (am_I_in_disaster_recovery_mode()
    13231323        &&
    1324         ask_me_yes_or_no("Do you want to retrieve the mountlist as well?"))
     1324        ask_me_yes_or_no(_("Do you want to retrieve the mountlist as well?")))
    13251325    {
    13261326//      sprintf(command, "cp -f tmp/mountlist.txt /tmp");
     
    13481348
    13491349    case 0:
    1350         log_to_screen("Pre-processing filelist");
     1350        log_to_screen(("Pre-processing filelist"));
    13511351        if (!does_file_exist(g_biggielist_txt)) {
    13521352            sprintf(command, "> %s", g_biggielist_txt);
     
    13601360
    13611361    default:
    1362         open_evalcall_form("Pre-processing filelist");
     1362        open_evalcall_form(_("Pre-processing filelist"));
    13631363        while (!waitpid(pid, (int *) 0, WNOHANG)) {
    13641364            usleep(100000);
     
    13731373    unlink(g_filelist_full);
    13741374    if (g_text_mode) {
    1375         printf("Restore which directory? --> ");
     1375        printf(_("Restore which directory? --> "));
    13761376        fgets(tmp, sizeof(tmp), stdin);
    13771377        toggle_path_selection(filelist, tmp, TRUE);
     
    15061506    else {
    15071507        log_to_screen
    1508             ("Unable to determine type of boot loader. Defaulting to LILO.");
     1508            (_("Unable to determine type of boot loader. Defaulting to LILO."));
    15091509        res = run_lilo(offer_to_hack_scripts);
    15101510    }
     
    15121512    retval += res;
    15131513    if (res) {
    1514         log_to_screen("Your boot loader returned an error");
     1514        log_to_screen(_("Your boot loader returned an error"));
    15151515    } else {
    1516         log_to_screen("Your boot loader ran OK");
     1516        log_to_screen(_("Your boot loader ran OK"));
    15171517    }
    15181518    paranoid_free(device);
     
    15951595    }
    15961596    if (offer_to_run_stabgrub
    1597         && ask_me_yes_or_no("Did you change the mountlist?"))
     1597        && ask_me_yes_or_no(_("Did you change the mountlist?")))
    15981598        /* interactive mode */
    15991599    {
    16001600        mvaddstr_and_log_it(g_currentY,
    16011601                            0,
    1602                             "Modifying fstab and grub.conf, and running GRUB...                             ");
     1602                            _("Modifying fstab and grub.conf, and running GRUB...                             "));
    16031603        for (done = FALSE; !done;) {
    1604             popup_and_get_string("Boot device",
    1605                                  "Please confirm/enter the boot device. If in doubt, try /dev/hda",
     1604            popup_and_get_string(_("Boot device"),
     1605                                 _("Please confirm/enter the boot device. If in doubt, try /dev/hda"),
    16061606                                 boot_device, MAX_STR_LEN / 4);
    16071607            sprintf(command, "stabgrub-me %s", boot_device);
     
    16091609            if (res) {
    16101610                popup_and_OK
    1611                     ("GRUB installation failed. Please install manually using 'grub-install' or similar command. You are now chroot()'ed to your restored system. Please type 'exit' when you are done.");
     1611                    (_("GRUB installation failed. Please install manually using 'grub-install' or similar command. You are now chroot()'ed to your restored system. Please type 'exit' when you are done."));
    16121612                newtSuspend();
    16131613                system("chroot " MNT_RESTORING);
    16141614                newtResume();
    1615                 popup_and_OK("Thank you.");
     1615                popup_and_OK(_("Thank you."));
    16161616            } else {
    16171617                done = TRUE;
    16181618            }
    1619             popup_and_OK("You will now edit fstab and grub.conf");
     1619            popup_and_OK(_("You will now edit fstab and grub.conf"));
    16201620            if (!g_text_mode) {
    16211621                newtSuspend();
     
    16341634        mvaddstr_and_log_it(g_currentY,
    16351635                            0,
    1636                             "Running GRUB...                                                 ");
     1636                            _("Running GRUB...                                                 "));
    16371637        iamhere(command);
    16381638        res = run_program_and_log_output(command, 1);
    16391639        if (res) {
    16401640            popup_and_OK
    1641                 ("Because of bugs in GRUB's own installer, GRUB was not installed properly. Please install the boot loader manually now, using this chroot()'ed shell prompt. Type 'exit' when you have finished.");
     1641                (_("Because of bugs in GRUB's own installer, GRUB was not installed properly. Please install the boot loader manually now, using this chroot()'ed shell prompt. Type 'exit' when you have finished."));
    16421642            newtSuspend();
    16431643            system("chroot " MNT_RESTORING);
    16441644            newtResume();
    1645             popup_and_OK("Thank you.");
     1645            popup_and_OK(_("Thank you."));
    16461646        }
    16471647    }
    16481648    if (res) {
    1649         mvaddstr_and_log_it(g_currentY++, 74, "Failed.");
     1649        mvaddstr_and_log_it(g_currentY++, 74, _("Failed."));
    16501650        log_to_screen
    1651             ("GRUB ran w/error(s). See /tmp/mondo-restore.log for more info.");
     1651            (_("GRUB ran w/error(s). See /tmp/mondo-restore.log for more info."));
    16521652        log_msg(1, "Type:-");
    16531653        log_msg(1, "    mount-me");
     
    16601660                "If you're really stuck, please e-mail the mailing list.");
    16611661    } else {
    1662         mvaddstr_and_log_it(g_currentY++, 74, "Done.");
     1662        mvaddstr_and_log_it(g_currentY++, 74, _("Done."));
    16631663    }
    16641664    paranoid_free(rootdev);
     
    16981698    strcpy(editor, find_my_editor());
    16991699    if (offer_to_run_stabelilo
    1700         && ask_me_yes_or_no("Did you change the mountlist?"))
     1700        && ask_me_yes_or_no(_("Did you change the mountlist?")))
    17011701
    17021702        /* interactive mode */
     
    17041704        mvaddstr_and_log_it(g_currentY,
    17051705                            0,
    1706                             "Modifying fstab and elilo.conf...                             ");
     1706                            _("Modifying fstab and elilo.conf...                             "));
    17071707        sprintf(command, "stabelilo-me");
    17081708        res = run_program_and_log_output(command, 3);
    17091709        if (res) {
    17101710            popup_and_OK
    1711                 ("You will now edit fstab and elilo.conf, to make sure they match your new mountlist.");
     1711                (_("You will now edit fstab and elilo.conf, to make sure they match your new mountlist."));
    17121712            for (done = FALSE; !done;) {
    17131713                if (!g_text_mode) {
     
    17231723                }
    17241724//              newtCls();
    1725                 if (ask_me_yes_or_no("Edit them again?")) {
     1725                if (ask_me_yes_or_no(_("Edit them again?"))) {
    17261726                    continue;
    17271727                }
     
    17291729            }
    17301730        } else {
    1731             log_to_screen("elilo.conf and fstab were modified OK");
     1731            log_to_screen(_("elilo.conf and fstab were modified OK"));
    17321732        }
    17331733    } else
     
    17731773    strcpy(editor, find_my_editor());
    17741774    if (offer_to_run_stablilo
    1775         && ask_me_yes_or_no("Did you change the mountlist?"))
     1775        && ask_me_yes_or_no(_("Did you change the mountlist?")))
    17761776
    17771777        /* interactive mode */
     
    17791779        mvaddstr_and_log_it(g_currentY,
    17801780                            0,
    1781                             "Modifying fstab and lilo.conf, and running LILO...                             ");
     1781                            _("Modifying fstab and lilo.conf, and running LILO...                             "));
    17821782        sprintf(command, "stablilo-me");
    17831783        res = run_program_and_log_output(command, 3);
    17841784        if (res) {
    17851785            popup_and_OK
    1786                 ("You will now edit fstab and lilo.conf, to make sure they match your new mountlist.");
     1786                (_("You will now edit fstab and lilo.conf, to make sure they match your new mountlist."));
    17871787            for (done = FALSE; !done;) {
    17881788                if (!g_text_mode) {
     
    17971797                }
    17981798//              newtCls();
    1799                 if (ask_me_yes_or_no("Edit them again?")) {
     1799                if (ask_me_yes_or_no(_("Edit them again?"))) {
    18001800                    continue;
    18011801                }
     
    18111811                    done =
    18121812                        ask_me_yes_or_no
    1813                         ("LILO failed. Re-edit system files?");
     1813                        (_("LILO failed. Re-edit system files?"));
    18141814                } else {
    18151815                    done = TRUE;
     
    18171817            }
    18181818        } else {
    1819             log_to_screen("lilo.conf and fstab were modified OK");
     1819            log_to_screen(_("lilo.conf and fstab were modified OK"));
    18201820        }
    18211821    } else
     
    18241824        mvaddstr_and_log_it(g_currentY,
    18251825                            0,
    1826                             "Running LILO...                                                 ");
     1826                            _("Running LILO...                                                 "));
    18271827        res =
    18281828            run_program_and_log_output("chroot " MNT_RESTORING " lilo -L",
     
    18341834        }
    18351835        if (res) {
    1836             mvaddstr_and_log_it(g_currentY++, 74, "Failed.");
     1836            mvaddstr_and_log_it(g_currentY++, 74, _("Failed."));
    18371837            log_to_screen
    1838                 ("Failed to re-jig fstab and/or lilo. Edit/run manually, please.");
     1838                (_("Failed to re-jig fstab and/or lilo. Edit/run manually, please."));
    18391839        } else {
    1840             mvaddstr_and_log_it(g_currentY++, 74, "Done.");
     1840            mvaddstr_and_log_it(g_currentY++, 74, _("Done."));
    18411841        }
    18421842    }
     
    18861886
    18871887    if (offer_to_hack_scripts
    1888         && ask_me_yes_or_no("Did you change the mountlist?"))
     1888        && ask_me_yes_or_no(_("Did you change the mountlist?")))
    18891889        /* interactive mode */
    18901890    {
    18911891        mvaddstr_and_log_it(g_currentY, 0,
    1892                             "Modifying fstab and restoring MBR...                           ");
     1892                            _("Modifying fstab and restoring MBR...                           "));
    18931893        for (done = FALSE; !done;) {
    18941894            if (!run_program_and_log_output("which vi", FALSE)) {
    1895                 popup_and_OK("You will now edit fstab");
     1895                popup_and_OK(_("You will now edit fstab"));
    18961896                if (!g_text_mode) {
    18971897                    newtSuspend();
     
    19041904//              newtCls();
    19051905            }
    1906             popup_and_get_string("Boot device",
    1907                                  "Please confirm/enter the boot device. If in doubt, try /dev/hda",
     1906            popup_and_get_string(_("Boot device"),
     1907                                 _("Please confirm/enter the boot device. If in doubt, try /dev/hda"),
    19081908                                 boot_device, MAX_STR_LEN / 4);
    19091909            sprintf(command, "stabraw-me %s", boot_device);
    19101910            res = run_program_and_log_output(command, 3);
    19111911            if (res) {
    1912                 done = ask_me_yes_or_no("Modifications failed. Re-try?");
     1912                done = ask_me_yes_or_no(_("Modifications failed. Re-try?"));
    19131913            } else {
    19141914                done = TRUE;
     
    19191919    {
    19201920        mvaddstr_and_log_it(g_currentY, 0,
    1921                             "Restoring MBR...                                               ");
     1921                            _("Restoring MBR...                                               "));
    19221922        res = run_program_and_log_output(command, 3);
    19231923    }
    19241924    if (res) {
    1925         mvaddstr_and_log_it(g_currentY++, 74, "Failed.");
     1925        mvaddstr_and_log_it(g_currentY++, 74, _("Failed."));
    19261926        log_to_screen
    1927             ("MBR+fstab processed w/error(s). See /tmp/mondo-restore.log for more info.");
     1927            (_("MBR+fstab processed w/error(s). See /tmp/mondo-restore.log for more info."));
    19281928    } else {
    1929         mvaddstr_and_log_it(g_currentY++, 74, "Done.");
     1929        mvaddstr_and_log_it(g_currentY++, 74, _("Done."));
    19301930    }
    19311931    paranoid_free(command);
     
    20672067{
    20682068    log_to_screen
    2069         ("Mondorestore is terminating in response to a signal from the OS");
     2069        (_("Mondorestore is terminating in response to a signal from the OS"));
    20702070    paranoid_MR_finish(254);
    20712071}
     
    20892089        return;
    20902090    }
    2091     open_progress_form("CAUTION",
    2092                        "Be advised: I am about to ERASE your hard disk(s)!",
    2093                        "You may press Ctrl+Alt+Del to abort safely.",
     2091    open_progress_form(_("CAUTION"),
     2092                       _("Be advised: I am about to ERASE your hard disk(s)!"),
     2093                       _("You may press Ctrl+Alt+Del to abort safely."),
    20942094                       "", 20);
    20952095    for (i = 0; i < 20; i++) {
    20962096        g_current_progress = i;
    2097         sprintf(tmp, "You have %d seconds left to abort.", 20 - i);
     2097        sprintf(tmp, _("You have %d seconds left to abort."), 20 - i);
    20982098        update_progress_form(tmp);
    20992099        sleep(1);
     
    21512151
    21522152    run_program_and_log_output("df -P -m", 3);
    2153     mvaddstr_and_log_it(g_currentY, 0, "Unmounting devices      ");
    2154     open_progress_form("Unmounting devices",
    2155                        "Unmounting all devices that were mounted,",
    2156                        "in preparation for the post-restoration reboot.",
     2153    mvaddstr_and_log_it(g_currentY, 0, _("Unmounting devices      "));
     2154    open_progress_form(_("Unmounting devices"),
     2155                       _("Unmounting all devices that were mounted,"),
     2156                       _("in preparation for the post-restoration reboot."),
    21572157                       "", mountlist->entries);
    21582158    chdir("/");
     
    21872187            continue;
    21882188        }
    2189         sprintf(tmp, "Unmounting device %s  ", mountlist->el[lino].device);
     2189        sprintf(tmp, _("Unmounting device %s  "), mountlist->el[lino].device);
    21902190
    21912191        update_progress_form(tmp);
     
    22062206            res = run_program_and_log_output(command, 3);
    22072207        } else {
    2208             strcat(tmp, "...not mounted anyway :-) OK");
     2208            strcat(tmp, _("...not mounted anyway :-) OK"));
    22092209            res = 0;
    22102210        }
    22112211        g_current_progress++;
    22122212        if (res) {
    2213             strcat(tmp, "...Failed");
     2213            strcat(tmp, _("...Failed"));
    22142214            retval++;
    22152215            log_to_screen(tmp);
     
    22202220    close_progress_form();
    22212221    if (retval) {
    2222         mvaddstr_and_log_it(g_currentY++, 74, "Failed.");
     2222        mvaddstr_and_log_it(g_currentY++, 74, _("Failed."));
    22232223    } else {
    2224         mvaddstr_and_log_it(g_currentY++, 74, "Done.");
     2224        mvaddstr_and_log_it(g_currentY++, 74, _("Done."));
    22252225    }
    22262226    if (retval) {
    2227         log_to_screen("Unable to unmount some of your partitions.");
     2227        log_to_screen(_("Unable to unmount some of your partitions."));
    22282228    } else {
    2229         log_to_screen("All partitions were unmounted OK.");
     2229        log_to_screen(_("All partitions were unmounted OK."));
    22302230    }
    22312231    free(mountlist);
     
    23112311    malloc_string(tmp);
    23122312    log_msg(2, "gcffa --- starting");
    2313     log_to_screen("I'm thinking...");
     2313    log_to_screen(_("I'm thinking..."));
    23142314    sprintf(mountpt, "%s/mount.bootdisk", bkpinfo->tmpdir);
    23152315    device[0] = '\0';
     
    24232423
    24242424            if (!does_file_exist("tmp/mondo-restore.cfg")) {
    2425                 log_to_screen("Cannot find config info on tape/CD/floppy");
     2425                log_to_screen(_("Cannot find config info on tape/CD/floppy"));
    24262426                return (1);
    24272427            }
     
    25042504        log_msg(1, "%s not found", cfg_file);
    25052505        log_to_screen
    2506             ("Oh dear. Unable to recover configuration file from boot disk");
     2506            (_("Oh dear. Unable to recover configuration file from boot disk"));
    25072507        return (1);
    25082508    }
    25092509
    2510     log_to_screen("Recovered mondo-restore.cfg");
     2510    log_to_screen(_("Recovered mondo-restore.cfg"));
    25112511    if (!does_file_exist(MOUNTLIST_FNAME_STUB)) {
    2512         log_to_screen("...but not mountlist.txt - a pity, really...");
     2512        log_to_screen(_("...but not mountlist.txt - a pity, really..."));
    25132513    }
    25142514/* start SAH */
     
    25802580    while (unfinished_mdstat_devices > 0) {
    25812581        if (read_mdstat(mdstat, mdstat_file)) {
    2582             log_to_screen("Sorry, cannot read %s", mdstat_file);
     2582            log_to_screen(_("Sorry, cannot read %s"), mdstat_file);
    25832583            return;
    25842584        }
     
    25862586            if (mdstat->el[i].progress < wait_for_percentage) {
    25872587                unfinished_mdstat_devices++;
    2588                 sprintf(screen_message, "Sync'ing /dev/md%d",
     2588                sprintf(screen_message, _("Sync'ing /dev/md%d"),
    25892589                        mdstat->el[i].md);
    25902590                open_evalcall_form(screen_message);
Note: See TracChangeset for help on using the changeset viewer.