Ignore:
Timestamp:
Apr 28, 2006, 12:34:03 AM (18 years ago)
Author:
bcornec
Message:

Integration of a big patch from rene-marc dolhen <rmd_at_mecreant.org> to support internationalization with gettext.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/stable/mondo/mondo/common/libmondo-stream.c

    r128 r497  
    519519        //      log_it("g_current_media_number = %d", g_current_media_number);
    520520        sprintf(tmp,
    521                 "When the tape drive goes quiet, please insert volume %d in this series.",
     521                _("When the tape drive goes quiet, please insert volume %d in this series."),
    522522                tapeno);
    523523        popup_and_OK(tmp);
    524         open_evalcall_form("Waiting while the tape drive settles");
    525     } else {
    526         open_evalcall_form("Waiting while the tape drive rewinds");
     524        open_evalcall_form(_("Waiting while the tape drive settles"));
     525    } else {
     526        open_evalcall_form(_("Waiting while the tape drive rewinds"));
    527527    }
    528528
     
    731731                                bkpinfo->internal_tape_block_size))) {
    732732        log_OS_error(g_tape_fifo);
    733         log_to_screen("Cannot openin stream device");
     733        log_to_screen(_("Cannot openin stream device"));
    734734        return (1);
    735735    }
    736     log_to_screen("Reading stream");
     736    log_to_screen(_("Reading stream"));
    737737    log_it("stream device = '%s'", bkpinfo->media_device);
    738738/* skip data disks */
    739739    open_evalcall_form("Skipping data disks on stream");
    740     log_to_screen("Skipping data disks on stream");
     740    log_to_screen(_("Skipping data disks on stream"));
    741741    if (!(fout = fopen(outfname, "w"))) {
    742742        log_OS_error(outfname);
    743         log_to_screen("Cannot openout datadisk all.tar.gz file");
     743        log_to_screen(_("Cannot openout datadisk all.tar.gz file"));
    744744        return (-1);
    745745    }
    746746    if (!(datablock = (char *) malloc(256 * 1024))) {
    747         log_to_screen("Unable to malloc 256*1024");
     747        log_to_screen(_("Unable to malloc 256*1024"));
    748748        exit(1);
    749749    }
     
    822822        return (0);
    823823    } else {
    824         log_to_screen("Failed to openout to cdstream (fifo)");
     824        log_to_screen(_("Failed to openout to cdstream (fifo)"));
    825825        return (1);
    826826    }
     
    855855         open_device_via_buffer(tapedev, 'w', internal_tape_block_size))) {
    856856        log_OS_error(g_tape_fifo);
    857         log_to_screen("Cannot openin stream device");
     857        log_to_screen(_("Cannot openin stream device"));
    858858        return (1);
    859859    }
     
    998998    if (!fout) {
    999999        log_OS_error(outfname);
    1000         log_to_screen("Cannot openout file");
     1000        log_to_screen(_("Cannot openout file"));
    10011001        return (1);
    10021002    }
     
    10561056    }
    10571057    if (strcmp(temp_cksum, actual_cksum)) {
    1058         sprintf(tmp, "actual cksum=%s; recorded cksum=%s", actual_cksum,
     1058        sprintf(tmp, _("actual cksum=%s; recorded cksum=%s"), actual_cksum,
    10591059                temp_cksum);
    10601060        log_to_screen(tmp);
    1061         sprintf(tmp, "%s (%ld K) is corrupt on tape", temp_fname,
     1061        sprintf(tmp, _("%s (%ld K) is corrupt on tape"), temp_fname,
    10621062                (long) orig_size >> 10);
    10631063        log_to_screen(tmp);
     
    12111211        log_it("mediasize = %ld", mediasize);
    12121212        we_need_a_new_tape = TRUE;
    1213         log_to_screen("Should have started a new tape/CD already");
     1213        log_to_screen(_("Should have started a new tape/CD already"));
    12141214    }
    12151215    if ((g_tape_posK + length_of_incoming_file / 1024) >> 10 >=
     
    13681368                                bkpinfo->internal_tape_block_size))) {
    13691369        log_OS_error(g_tape_fifo);
    1370         log_to_screen("Cannot openin stream device");
     1370        log_to_screen(_("Cannot openin stream device"));
    13711371        return (1);
    13721372    }
     
    14061406    if (g_current_media_number > MAX_NOOF_MEDIA) {
    14071407        res++;
    1408         log_to_screen("Too many tapes. Man, you need to use nfs!");
     1408        log_to_screen(_("Too many tapes. Man, you need to use nfs!"));
    14091409    }
    14101410    if (bkpinfo->backup_media_type == cdstream) {
     
    14181418        g_tape_stream = popen(command, "w");
    14191419        if (!g_tape_stream) {
    1420             log_to_screen("Failed to openout to cdstream (fifo)");
     1420            log_to_screen(_("Failed to openout to cdstream (fifo)"));
    14211421            return (1);
    14221422        }
     
    14281428                                    bkpinfo->internal_tape_block_size))) {
    14291429            log_OS_error(g_tape_fifo);
    1430             log_to_screen("Cannot openin stream device");
     1430            log_to_screen(_("Cannot openin stream device"));
    14311431            return (1);
    14321432        }
     
    15131513    /*@ end vars *************************************************** */
    15141514
    1515     open_evalcall_form("Writing data disks to tape");
    1516     log_to_screen("Writing data disks to tape");
     1515    open_evalcall_form(_("Writing data disks to tape"));
     1516    log_to_screen(_("Writing data disks to tape"));
    15171517    log_it("Data disks = %s", fname);
    15181518    if (!does_file_exist(fname)) {
    1519         sprintf(tmp, "Cannot find %s", fname);
     1519        sprintf(tmp, _("Cannot find %s"), fname);
    15201520        log_to_screen(tmp);
    15211521        return (1);
     
    17061706    if (!g_tape_stream) {
    17071707        log_to_screen
    1708             ("You're not backing up to tape. Why write a tape header?");
     1708            (_("You're not backing up to tape. Why write a tape header?"));
    17091709        return (1);
    17101710    }
     
    17511751
    17521752    /*@ end vars *************************************************** */
    1753     sprintf(tmp, "Wrong marker! (Should be %s, ",
     1753    sprintf(tmp, _("Wrong marker! (Should be %s, "),
    17541754            marker_to_string(should_be));
    1755     sprintf(tmp + strlen(tmp), "is actually %s)", marker_to_string(it_is));
     1755    sprintf(tmp + strlen(tmp), _("is actually %s)"), marker_to_string(it_is));
    17561756    log_to_screen(tmp);
    17571757}
Note: See TracChangeset for help on using the changeset viewer.