Changeset 507 in MondoRescue
- Timestamp:
- Apr 30, 2006, 2:04:16 AM (19 years ago)
- Location:
- trunk
- Files:
-
- 4 deleted
- 31 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/documentation/Makefile.howto
r408 r507 34 34 @rm -fr $(TARGET) 35 35 @docbook2html -d $(TARGET).dsl'#html' -o $(TARGET) $(TARGET).sgml 36 @ln -sf $(IMAGESDIR) $(TARGET) 36 37 37 38 $(TARGET).html: $(SRC) $(DSL) $(IMAGES) … … 63 64 @echo "Delivering mondorescue howto" 64 65 @echo "" 65 @if [ "${INSTALLDIR}" != "" ]; then mkdir -p ${INSTALLDIR} ; cp -a $(TARGET).{html,pdf,ps,txt,rtf} $(TARGET) ${INSTALLDIR} ; cp -a ${IMAGESDIR} ${INSTALLDIR}/$(TARGET) ;else echo "No INSTALLDIR specified aborting install"; fi66 @if [ "${INSTALLDIR}" != "" ]; then mkdir -p ${INSTALLDIR} ; cp -a $(TARGET).{html,pdf,ps,txt,rtf} $(TARGET) ${INSTALLDIR} ; else echo "No INSTALLDIR specified aborting install"; fi -
trunk/mondo/ChangeLog
r309 r507 9 9 needed + remove memory leaks) 10 10 11 v2.07 () 11 v2.2.0 (2006-05-01) 12 ======= 13 14 - Internationalization (A huge thank to rene-marc dolhen 15 <rmd_at_mecreant.org> who achieved that big task) 16 - Fixed verify for NFS (Andree Leidenfrost) 17 - Fix for Bug #6975 (Bruno Cornec) 18 - Fix a bug when restoring interactively and having file names with blank 19 (Bruno Cornec) 20 - Fix options -I and -E of mondoarchive which were not working 21 (Bruno Cornec) 22 - Removed 'ax' options from ps call in busybox (Andree Leidenfrost) 23 24 v2.0.7 (2006-02-23) 12 25 - useless cat, sort|uniq commands removed 13 26 (Bruno Cornec/Sébastien Aperghis-Tramoni) -
trunk/mondo/Makefile.am
r426 r507 1 1 AUTOMAKE_OPTIONS = 1.7 2 SUBDIRS = mondo 2 SUBDIRS = mondo po 3 3 man8_MANS = docs/man/mondoarchive.8 docs/man/mondorestore.8 4 5 ACLOCAL_AMFLAGS = -I m4 6 7 EXTRA_DIST = config.rpath config.rpath -
trunk/mondo/bootstrap
r35 r507 28 28 make maintainer-clean >/dev/null 2>&1 29 29 libtoolize -f -c --automake 30 aclocal 30 cp /usr/bin/gettextize . 31 perl -pi -e 's~read dummy < /dev/tty~~' gettextize 32 ./gettextize -c -f --no-changelog < /dev/null 33 rm -f gettextize 34 aclocal -I m4 31 35 autoheader 32 36 automake -
trunk/mondo/configure.in
r489 r507 30 30 AC_PROG_MAKE_SET 31 31 32 AM_GNU_GETTEXT([external]) 33 ALL_LINGUAS="fr" 32 34 33 35 dnl --with/--enable stuff -
trunk/mondo/distributions/rpm/mondo.spec
r461 r507 90 90 %attr(755,root,root) %{_datadir}/%{name}/autorun 91 91 %attr(755,root,root) %{_datadir}/%{name}/post-nuke.sample/usr/bin/post-nuke 92 %{_datadir}/locale/*/LC_MESSAGES/mondo.mo 92 93 %{_datadir}/%{name}/* 93 94 %{_mandir}/man8/* -
trunk/mondo/mkinstalldirs
r30 r507 1 1 #! /bin/sh 2 2 # mkinstalldirs --- make directory hierarchy 3 # Author: Noah Friedman <friedman@prep.ai.mit.edu> 3 4 scriptversion=2004-02-15.20 5 6 # Original author: Noah Friedman <friedman@prep.ai.mit.edu> 4 7 # Created: 1993-05-16 5 # Public domain 8 # Public domain. 9 # 10 # This file is maintained in Automake, please report 11 # bugs to <bug-automake@gnu.org> or send patches to 12 # <automake-patches@gnu.org>. 6 13 7 14 errstatus=0 … … 9 16 10 17 usage="\ 11 Usage: mkinstalldirs [-h] [--help] [-m mode] dir ..." 18 Usage: mkinstalldirs [-h] [--help] [--version] [-m MODE] DIR ... 19 20 Create each directory DIR (with mode MODE, if specified), including all 21 leading file name components. 22 23 Report bugs to <bug-automake@gnu.org>." 12 24 13 25 # process command line arguments 14 26 while test $# -gt 0 ; do 15 case "${1}" in 16 -h | --help | --h* ) # -h for help 17 echo "${usage}" 1>&2; exit 0 ;; 18 -m ) # -m PERM arg 19 shift 20 test $# -eq 0 && { echo "${usage}" 1>&2; exit 1; } 21 dirmode="${1}" 22 shift ;; 23 -- ) shift; break ;; # stop option processing 24 -* ) echo "${usage}" 1>&2; exit 1 ;; # unknown option 25 * ) break ;; # first non-opt arg 26 esac 27 case $1 in 28 -h | --help | --h*) # -h for help 29 echo "$usage" 30 exit 0 31 ;; 32 -m) # -m PERM arg 33 shift 34 test $# -eq 0 && { echo "$usage" 1>&2; exit 1; } 35 dirmode=$1 36 shift 37 ;; 38 --version) 39 echo "$0 $scriptversion" 40 exit 0 41 ;; 42 --) # stop option processing 43 shift 44 break 45 ;; 46 -*) # unknown option 47 echo "$usage" 1>&2 48 exit 1 49 ;; 50 *) # first non-opt arg 51 break 52 ;; 53 esac 27 54 done 28 55 … … 37 64 38 65 case $# in 39 0) exit 0 ;;66 0) exit 0 ;; 40 67 esac 41 68 69 # Solaris 8's mkdir -p isn't thread-safe. If you mkdir -p a/b and 70 # mkdir -p a/c at the same time, both will detect that a is missing, 71 # one will create a, then the other will try to create a and die with 72 # a "File exists" error. This is a problem when calling mkinstalldirs 73 # from a parallel make. We use --version in the probe to restrict 74 # ourselves to GNU mkdir, which is thread-safe. 42 75 case $dirmode in 43 '') 44 if mkdir -p -- . 2>/dev/null; then 45 echo "mkdir -p -- $*" 46 exec mkdir -p -- "$@" 47 fi ;; 48 *) 49 if mkdir -m "$dirmode" -p -- . 2>/dev/null; then 50 echo "mkdir -m $dirmode -p -- $*" 51 exec mkdir -m "$dirmode" -p -- "$@" 52 fi ;; 76 '') 77 if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then 78 echo "mkdir -p -- $*" 79 exec mkdir -p -- "$@" 80 else 81 # On NextStep and OpenStep, the `mkdir' command does not 82 # recognize any option. It will interpret all options as 83 # directories to create, and then abort because `.' already 84 # exists. 85 test -d ./-p && rmdir ./-p 86 test -d ./--version && rmdir ./--version 87 fi 88 ;; 89 *) 90 if mkdir -m "$dirmode" -p --version . >/dev/null 2>&1 && 91 test ! -d ./--version; then 92 echo "mkdir -m $dirmode -p -- $*" 93 exec mkdir -m "$dirmode" -p -- "$@" 94 else 95 # Clean up after NextStep and OpenStep mkdir. 96 for d in ./-m ./-p ./--version "./$dirmode"; 97 do 98 test -d $d && rmdir $d 99 done 100 fi 101 ;; 53 102 esac 54 103 55 104 for file 56 105 do 57 58 106 set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'` 107 shift 59 108 60 61 62 63 64 case "$pathcomp"in65 -*) pathcomp=./$pathcomp ;;66 109 pathcomp= 110 for d 111 do 112 pathcomp="$pathcomp$d" 113 case $pathcomp in 114 -*) pathcomp=./$pathcomp ;; 115 esac 67 116 68 69 117 if test ! -d "$pathcomp"; then 118 echo "mkdir $pathcomp" 70 119 71 120 mkdir "$pathcomp" || lasterr=$? 72 121 73 if test ! -d "$pathcomp"; then 74 errstatus=$lasterr 75 else 76 if test ! -z "$dirmode"; then 77 echo "chmod $dirmode $pathcomp" 122 if test ! -d "$pathcomp"; then 123 errstatus=$lasterr 124 else 125 if test ! -z "$dirmode"; then 126 echo "chmod $dirmode $pathcomp" 127 lasterr="" 128 chmod "$dirmode" "$pathcomp" || lasterr=$? 78 129 79 lasterr="" 80 chmod "$dirmode" "$pathcomp" || lasterr=$? 81 82 if test ! -z "$lasterr"; then 83 errstatus=$lasterr 84 fi 130 if test ! -z "$lasterr"; then 131 errstatus=$lasterr 85 132 fi 86 133 fi 87 fi 134 fi 135 fi 88 136 89 90 137 pathcomp="$pathcomp/" 138 done 91 139 done 92 140 … … 95 143 # Local Variables: 96 144 # mode: shell-script 97 # sh-indentation: 3 145 # sh-indentation: 2 146 # eval: (add-hook 'write-file-hooks 'time-stamp) 147 # time-stamp-start: "scriptversion=" 148 # time-stamp-format: "%:y-%02m-%02d.%02H" 149 # time-stamp-end: "$" 98 150 # End: 99 # mkinstalldirs ends here -
trunk/mondo/mondo/common/Makefile.am
r426 r507 14 14 libmondo-archive.h libmondo-devices.h \ 15 15 libmondo-filelist.h libmondo-files.h libmondo-fork.h \ 16 libmondo- gui.h libmondo-mountlist.h libmondo-raid.h \16 libmondo-mountlist.h libmondo-raid.h \ 17 17 libmondo-stream.h libmondo-string.h libmondo-tools.h \ 18 18 libmondo-verify.h libmondo-fifo.h \ … … 20 20 libmondo-devices-EXT.h libmondo-fifo-EXT.h \ 21 21 libmondo-files-EXT.h libmondo-fork-EXT.h \ 22 libmondo- gui-EXT.h libmondo-filelist-EXT.h \22 libmondo-filelist-EXT.h \ 23 23 libmondo-mountlist-EXT.h libmondo-raid-EXT.h \ 24 24 libmondo-string-EXT.h libmondo-tools-EXT.h \ -
trunk/mondo/mondo/common/libmondo-archive.c
r426 r507 16 16 #include "libmondo-devices-EXT.h" 17 17 #include "libmondo-tools-EXT.h" 18 #include " libmondo-gui-EXT.h"18 #include "newt-specific-EXT.h" 19 19 #include "libmondo-fork-EXT.h" 20 20 #include "libmondo-files-EXT.h" … … 23 23 #include "libmondo-verify-EXT.h" 24 24 #include "libmondo-archive.h" 25 #include "lib-common-externs.h"26 25 #include <sys/sem.h> 27 26 #include <sys/types.h> … … 1457 1456 log_to_screen("Archiving regular files"); 1458 1457 log_msg(5, "Go, Shorty. It's your birthday."); 1459 open_progress_form( "Backing up filesystem",1460 "I am backing up your live filesystem now.",1461 "Please wait. This may take a couple of hours.",1462 "Working...",1458 open_progress_form(_("Backing up filesystem"), 1459 _("I am backing up your live filesystem now."), 1460 _("Please wait. This may take a couple of hours."), 1461 _("Working..."), 1463 1462 get_last_filelist_number(bkpinfo) + 1); 1464 1463 … … 1665 1664 1666 1665 if (bkpinfo->backup_media_type == iso && bkpinfo->manual_cd_tray) { 1667 popup_and_OK( "Please insert new media and press Enter.");1666 popup_and_OK(_("Please insert new media and press Enter.")); 1668 1667 } 1669 1668 … … 2148 2147 log_to_screen("Archiving regular files"); 2149 2148 2150 open_progress_form( "Backing up filesystem",2151 "I am backing up your live filesystem now.",2152 "Please wait. This may take a couple of hours.",2153 "Working...",2149 open_progress_form(_("Backing up filesystem"), 2150 _("I am backing up your live filesystem now."), 2151 _("Please wait. This may take a couple of hours."), 2152 _("Working..."), 2154 2153 get_last_filelist_number(bkpinfo) + 1); 2155 2154 -
trunk/mondo/mondo/common/libmondo-devices.c
r309 r507 11 11 #include "libmondo-files-EXT.h" 12 12 #include "libmondo-devices.h" 13 #include "lib-common-externs.h"14 13 #include "libmondo-string-EXT.h" 15 14 #include "libmondo-tools-EXT.h" 16 #include " libmondo-gui-EXT.h"15 #include "newt-specific-EXT.h" 17 16 #include "libmondo-fork-EXT.h" 18 17 #include "libmondo-stream-EXT.h" … … 139 138 && !does_file_exist("/tmp/mountlist.txt.sample")) { 140 139 log_to_screen 141 ( "Using /dev/root is stupid of you but I'll forgive you.");140 (_("Using /dev/root is stupid of you but I'll forgive you.")); 142 141 is_this_a_ramdisk = FALSE; 143 142 } … … 165 164 switch (bt) { 166 165 case none: 167 asprintf(&output, "none");166 asprintf(&output, _("none")); 168 167 break; 169 168 case iso: 170 asprintf(&output, "iso");169 asprintf(&output, _("iso")); 171 170 break; 172 171 case cdr: 173 asprintf(&output, "cdr");172 asprintf(&output, _("cdr")); 174 173 break; 175 174 case cdrw: 176 asprintf(&output, "cdrw");175 asprintf(&output, _("cdrw")); 177 176 break; 178 177 case cdstream: 179 asprintf(&output, "cdstream");178 asprintf(&output, _("cdstream")); 180 179 break; 181 180 case nfs: 182 asprintf(&output, "nfs");181 asprintf(&output, _("nfs")); 183 182 break; 184 183 case tape: 185 asprintf(&output, "tape");184 asprintf(&output, _("tape")); 186 185 break; 187 186 case udev: 188 asprintf(&output, "udev");187 asprintf(&output, _("udev")); 189 188 break; 190 189 default: 191 asprintf(&output, "default");190 asprintf(&output, _("default")); 192 191 } 193 192 return (output); … … 470 469 if ((dev == NULL) || (! mount_CDROM_here(dev, mountpoint))) { 471 470 if (!popup_and_get_string 472 ( "CD-ROM device", "Please enter your CD-ROM's /dev device",471 (_("CD-ROM device"), _("Please enter your CD-ROM's /dev device"), 473 472 dev, MAX_STR_LEN / 4)) { 474 473 res = FALSE; … … 478 477 } 479 478 if (res) { 480 log_msg(1, "mount failed");481 } else { 482 log_msg(1, "mount succeeded with %s", dev);479 log_msg(1, _("mount failed")); 480 } else { 481 log_msg(1, _("mount succeeded with %s"), dev); 483 482 } 484 483 paranoid_free(dev); … … 1370 1369 } 1371 1370 if (res) { 1372 log_to_screen( "WARNING - failed to unmount CD-ROM drive");1371 log_to_screen(_("WARNING - failed to unmount CD-ROM drive")); 1373 1372 } 1374 1373 if (!bkpinfo->please_dont_eject) { … … 1378 1377 } 1379 1378 if (res) { 1380 log_to_screen( "WARNING - failed to eject CD-ROM disk");1379 log_to_screen(_("WARNING - failed to eject CD-ROM disk")); 1381 1380 } 1382 1381 popup_and_OK(request); … … 1428 1427 which_backup_media_type(bkpinfo->restore_data); 1429 1428 if (bkpinfo->backup_media_type == none) { 1430 log_to_screen( "User has chosen not to backup the PC");1429 log_to_screen(_("User has chosen not to backup the PC")); 1431 1430 finish(1); 1432 1431 } 1433 1432 if (bkpinfo->backup_media_type == tape && bkpinfo->restore_data) { 1434 popup_and_OK( "Please remove CD/floppy from drive(s)");1433 popup_and_OK(_("Please remove CD/floppy from drive(s)")); 1435 1434 } 1436 1435 log_msg(3, "media type = %s", … … 1467 1466 if (archiving_to_media) { 1468 1467 if (ask_me_yes_or_no 1469 ( "Is your computer a laptop, or does the CD writer incorporate BurnProof technology?"))1468 (_("Is your computer a laptop, or does the CD writer incorporate BurnProof technology?"))) 1470 1469 { 1471 1470 bkpinfo->manual_cd_tray = TRUE; … … 1473 1472 if ((bkpinfo->compression_level = 1474 1473 which_compression_level()) == -1) { 1475 log_to_screen( "User has chosen not to backup the PC");1474 log_to_screen(_("User has chosen not to backup the PC")); 1476 1475 finish(1); 1477 1476 } 1478 asprintf(&comment, "What speed is your %s (re)writer?",1477 asprintf(&comment, _("What speed is your %s (re)writer?"), 1479 1478 media_descriptor_string(bkpinfo->backup_media_type)); 1480 1479 if (bkpinfo->backup_media_type == dvd) { … … 1491 1490 } 1492 1491 if (bkpinfo->backup_media_type != dvd) { 1493 if (!popup_and_get_string( "Speed", comment, tmp, 4)) {1494 log_to_screen( "User has chosen not to backup the PC");1492 if (!popup_and_get_string(_("Speed"), comment, tmp, 4)) { 1493 log_to_screen(_("User has chosen not to backup the PC")); 1495 1494 finish(1); 1496 1495 } … … 1502 1501 1503 1502 asprintf(&comment, 1504 "How much data (in Megabytes) will each %s store?",1503 _("How much data (in Megabytes) will each %s store?"), 1505 1504 media_descriptor_string(bkpinfo->backup_media_type)); 1506 1505 1507 1506 if (!popup_and_get_string("Size", comment, sz_size, 5)) { 1508 log_to_screen( "User has chosen not to backup the PC");1507 log_to_screen(_("User has chosen not to backup the PC")); 1509 1508 finish(1); 1510 1509 } … … 1515 1514 } 1516 1515 if (bkpinfo->media_size[0] <= 0) { 1517 log_to_screen( "User has chosen not to backup the PC");1516 log_to_screen(_("User has chosen not to backup the PC")); 1518 1517 finish(1); 1519 1518 } … … 1539 1538 bkpinfo->media_device); 1540 1539 asprintf(&comment, 1541 "Please specify your %s drive's /dev entry",1540 _("Please specify your %s drive's /dev entry"), 1542 1541 media_descriptor_string(bkpinfo-> 1543 1542 backup_media_type)); 1544 1543 if (!popup_and_get_string 1545 ( "Device?", comment, bkpinfo->media_device,1544 (_("Device?"), comment, bkpinfo->media_device, 1546 1545 MAX_STR_LEN / 4)) { 1547 log_to_screen( "User has chosen not to backup the PC");1546 log_to_screen(_("User has chosen not to backup the PC")); 1548 1547 finish(1); 1549 1548 } … … 1558 1557 if (bkpinfo->media_device != NULL) { 1559 1558 asprintf(&tmp, 1560 "I think I've found your %s burner at SCSI node %s; am I right on the money?",1559 _("I think I've found your %s burner at SCSI node %s; am I right on the money?"), 1561 1560 media_descriptor_string(bkpinfo-> 1562 1561 backup_media_type), … … 1568 1567 } else { 1569 1568 if (g_kernel_version < 2.6) { 1570 i = popup_and_get_string( "Device node?",1571 "What is the SCSI node of your CD (re)writer, please?",1569 i = popup_and_get_string(_("Device node?"), 1570 _("What is the SCSI node of your CD (re)writer, please?"), 1572 1571 bkpinfo->media_device, 1573 1572 MAX_STR_LEN / 4); 1574 1573 } else { 1575 i = popup_and_get_string( "/dev entry?",1576 "What is the /dev entry of your CD (re)writer, please?",1574 i = popup_and_get_string(_("/dev entry?"), 1575 _("What is the /dev entry of your CD (re)writer, please?"), 1577 1576 bkpinfo->media_device, 1578 1577 MAX_STR_LEN / 4); 1579 1578 } 1580 1579 if (!i) { 1581 log_to_screen( "User has chosen not to backup the PC");1580 log_to_screen(_("User has chosen not to backup the PC")); 1582 1581 finish(1); 1583 1582 } … … 1592 1591 case udev: 1593 1592 if (!ask_me_yes_or_no 1594 ( "This option is for advanced users only. Are you sure?")) {1595 log_to_screen( "User has chosen not to backup the PC");1593 (_("This option is for advanced users only. Are you sure?"))) { 1594 log_to_screen(_("User has chosen not to backup the PC")); 1596 1595 finish(1); 1597 1596 } … … 1600 1599 paranoid_free(bkpinfo->media_device); 1601 1600 if (find_tape_device_and_size(bkpinfo->media_device, sz_size)) { 1602 log_msg(3, "Ok, using vanilla scsi tape.");1601 log_msg(3, _("Ok, using vanilla scsi tape.")); 1603 1602 paranoid_alloc(bkpinfo->media_device,VANILLA_SCSI_TAPE ); 1604 1603 if ((fin = fopen(bkpinfo->media_device, "r"))) { … … 1618 1617 } 1619 1618 asprintf(&tmp, 1620 "I think I've found your tape streamer at %s; am I right on the money?",1619 _("I think I've found your tape streamer at %s; am I right on the money?"), 1621 1620 bkpinfo->media_device); 1622 1621 if (!ask_me_yes_or_no(tmp)) { … … 1627 1626 if (bkpinfo->media_device == NULL) { 1628 1627 if (!popup_and_get_string 1629 ( "Device name?",1630 "What is the /dev entry of your tape streamer?",1628 (_("Device name?"), 1629 _("What is the /dev entry of your tape streamer?"), 1631 1630 bkpinfo->media_device, MAX_STR_LEN / 4)) { 1632 log_to_screen( "User has chosen not to backup the PC");1631 log_to_screen(_("User has chosen not to backup the PC")); 1633 1632 finish(1); 1634 1633 } … … 1636 1635 asprintf(&tmp, "ls -l %s", bkpinfo->media_device); 1637 1636 if (run_program_and_log_output(tmp, FALSE)) { 1638 log_to_screen( "User has not specified a valid /dev entry");1637 log_to_screen(_("User has not specified a valid /dev entry")); 1639 1638 finish(1); 1640 1639 } … … 1653 1652 if ((bkpinfo->compression_level = 1654 1653 which_compression_level()) == -1) { 1655 log_to_screen( "User has chosen not to backup the PC");1654 log_to_screen(_("User has chosen not to backup the PC")); 1656 1655 finish(1); 1657 1656 } … … 1674 1673 { 1675 1674 if (!popup_and_get_string 1676 ( "NFS dir.",1677 "Please enter path and directory where archives are stored remotely. (Mondo has taken a guess at the correct value. If it is incorrect, delete it and type the correct one.)",1675 (_("NFS dir."), 1676 _("Please enter path and directory where archives are stored remotely. (Mondo has taken a guess at the correct value. If it is incorrect, delete it and type the correct one.)"), 1678 1677 bkpinfo->nfs_mount, MAX_STR_LEN / 4)) { 1679 log_to_screen( "User has chosen not to backup the PC");1678 log_to_screen(_("User has chosen not to backup the PC")); 1680 1679 finish(1); 1681 1680 } … … 1683 1682 if ((bkpinfo->compression_level = 1684 1683 which_compression_level()) == -1) { 1685 log_to_screen( "User has chosen not to backup the PC");1684 log_to_screen(_("User has chosen not to backup the PC")); 1686 1685 finish(1); 1687 1686 } … … 1699 1698 1700 1699 asprintf(&comment, 1701 "How much data (in Megabytes) will each media store?");1702 if (!popup_and_get_string( "Size", comment, sz_size, 5)) {1703 log_to_screen( "User has chosen not to backup the PC");1700 _("How much data (in Megabytes) will each media store?")); 1701 if (!popup_and_get_string(_("Size"), comment, sz_size, 5)) { 1702 log_to_screen(_("User has chosen not to backup the PC")); 1704 1703 finish(1); 1705 1704 } … … 1708 1707 } 1709 1708 if (bkpinfo->media_size[0] <= 0) { 1710 log_to_screen( "User has chosen not to backup the PC");1709 log_to_screen(_("User has chosen not to backup the PC")); 1711 1710 finish(1); 1712 1711 } … … 1716 1715 system("umount /tmp/isodir 2> /dev/null"); 1717 1716 if (!popup_and_get_string 1718 ( "NFS share", "Which remote NFS share should I mount?",1717 (_("NFS share"), _("Which remote NFS share should I mount?"), 1719 1718 bkpinfo->nfs_mount, MAX_STR_LEN)) { 1720 log_to_screen( "User has chosen not to backup the PC");1719 log_to_screen(_("User has chosen not to backup the PC")); 1721 1720 finish(1); 1722 1721 } … … 1738 1737 if (!is_this_device_mounted(bkpinfo->nfs_mount)) { 1739 1738 popup_and_OK 1740 ( "Please mount that partition before you try to backup to or restore from it.");1739 (_("Please mount that partition before you try to backup to or restore from it.")); 1741 1740 finish(1); 1742 1741 } 1743 1742 asprintf(&tmp, bkpinfo->nfs_remote_dir); 1744 1743 if (!popup_and_get_string 1745 ( "Directory", "Which directory within that mountpoint?", tmp,1744 (_("Directory"), _("Which directory within that mountpoint?"), tmp, 1746 1745 MAX_STR_LEN)) { 1747 log_to_screen( "User has chosen not to backup the PC");1746 log_to_screen(_("User has chosen not to backup the PC")); 1748 1747 finish(1); 1749 1748 } … … 1760 1759 asprintf(&tmp, bkpinfo->nfs_remote_dir); 1761 1760 asprintf(&prompt, 1762 "Directory '%s' under mountpoint '%s' does not exist or is not writable. You can fix this or change the directory and retry or cancel the backup.",1761 _("Directory '%s' under mountpoint '%s' does not exist or is not writable. You can fix this or change the directory and retry or cancel the backup."), 1763 1762 bkpinfo->nfs_remote_dir, bkpinfo->isodir); 1764 1763 if (!popup_and_get_string 1765 ( "Directory", prompt, tmp, MAX_STR_LEN)) {1766 log_to_screen( "User has chosen not to backup the PC");1764 (_("Directory"), prompt, tmp, MAX_STR_LEN)) { 1765 log_to_screen(_("User has chosen not to backup the PC")); 1767 1766 finish(1); 1768 1767 } … … 1778 1777 1779 1778 if (!popup_and_get_string 1780 ( "Prefix.",1781 "Please enter the prefix that will be prepended to your ISO filename. Example: machine1 to obtain machine1-[1-9]*.iso files",1779 (_("Prefix."), 1780 _("Please enter the prefix that will be prepended to your ISO filename. Example: machine1 to obtain machine1-[1-9]*.iso files"), 1782 1781 bkpinfo->prefix, MAX_STR_LEN / 4)) { 1783 log_to_screen( "User has chosen not to backup the PC");1782 log_to_screen(_("User has chosen not to backup the PC")); 1784 1783 finish(1); 1785 1784 } … … 1797 1796 if (!bkpinfo->disaster_recovery) { 1798 1797 if (!popup_and_get_string 1799 ( "Storage dir.",1800 "Please enter the full path that contains your ISO images. Example: /mnt/raid0_0",1798 (_("Storage dir."), 1799 _("Please enter the full path that contains your ISO images. Example: /mnt/raid0_0"), 1801 1800 bkpinfo->isodir, MAX_STR_LEN / 4)) { 1802 log_to_screen( "User has chosen not to backup the PC");1801 log_to_screen(_("User has chosen not to backup the PC")); 1803 1802 finish(1); 1804 1803 } … … 1806 1805 if ((bkpinfo->compression_level = 1807 1806 which_compression_level()) == -1) { 1808 log_to_screen( "User has chosen not to backup the PC");1807 log_to_screen(_("User has chosen not to backup the PC")); 1809 1808 finish(1); 1810 1809 } 1811 1810 if (!popup_and_get_string 1812 ( "ISO size.",1813 "Please enter how big you want each ISO image to be (in megabytes). This should be less than or equal to the size of the CD-R[W]'s or DVD's you plan to backup to.",1811 (_("ISO size."), 1812 _("Please enter how big you want each ISO image to be (in megabytes). This should be less than or equal to the size of the CD-R[W]'s or DVD's you plan to backup to."), 1814 1813 sz_size, 16)) { 1815 log_to_screen( "User has chosen not to backup the PC");1814 log_to_screen(_("User has chosen not to backup the PC")); 1816 1815 finish(1); 1817 1816 } … … 1822 1821 1823 1822 if (!popup_and_get_string 1824 ( "Prefix.",1825 "Please enter the prefix that will be prepended to your ISO filename. Example: machine1 to obtain machine1-[1-9]*.iso files",1823 (_("Prefix."), 1824 _("Please enter the prefix that will be prepended to your ISO filename. Example: machine1 to obtain machine1-[1-9]*.iso files"), 1826 1825 bkpinfo->prefix, MAX_STR_LEN / 4)) { 1827 1826 log_to_screen("User has chosen not to backup the PC"); … … 1857 1856 #ifdef __FreeBSD__ 1858 1857 if (!popup_and_get_string 1859 ( "Boot device",1860 "What is your boot device? (e.g. /dev/ad0)",1858 (_("Boot device"), 1859 _("What is your boot device? (e.g. /dev/ad0)"), 1861 1860 bkpinfo->boot_device, MAX_STR_LEN / 4)) { 1862 log_to_screen( "User has chosen not to backup the PC");1861 log_to_screen(_("User has chosen not to backup the PC")); 1863 1862 finish(1); 1864 1863 } … … 1866 1865 #else 1867 1866 if (!popup_and_get_string 1868 ( "Boot device",1869 "What is your boot device? (e.g. /dev/hda)",1867 (_("Boot device"), 1868 _("What is your boot device? (e.g. /dev/hda)"), 1870 1869 bkpinfo->boot_device, MAX_STR_LEN / 4)) { 1871 log_to_screen( "User has chosen not to backup the PC");1870 log_to_screen(_("User has chosen not to backup the PC")); 1872 1871 finish(1); 1873 1872 } … … 1889 1888 if (i == 'U') { 1890 1889 if (ask_me_yes_or_no 1891 ( "Unidentified boot loader. Shall I restore it byte-for-byte at restore time and hope for the best?"))1890 (_("Unidentified boot loader. Shall I restore it byte-for-byte at restore time and hope for the best?"))) 1892 1891 { 1893 1892 i = 'R'; // raw 1894 1893 } else { 1895 1894 log_to_screen 1896 ( "I cannot find your boot loader. Please run mondoarchive with parameters.");1895 (_("I cannot find your boot loader. Please run mondoarchive with parameters.")); 1897 1896 finish(1); 1898 1897 } … … 1902 1901 strcpy(bkpinfo->include_paths, "/"); 1903 1902 if (!popup_and_get_string 1904 ( "Backup paths",1905 "Please enter paths which you want me to backup. The default is '/' (i.e. everything).",1903 (_("Backup paths"), 1904 _("Please enter paths which you want me to backup. The default is '/' (i.e. everything)."), 1906 1905 bkpinfo->include_paths, MAX_STR_LEN)) { 1907 log_to_screen( "User has chosen not to backup the PC");1906 log_to_screen(_("User has chosen not to backup the PC")); 1908 1907 finish(1); 1909 1908 } … … 1922 1921 if (strlen(tmp) > 2) { 1923 1922 if (!popup_and_get_string 1924 ( "NTFS partitions",1925 "Please enter/confirm the NTFS partitions you wish to backup as well.",1923 (_("NTFS partitions"), 1924 _("Please enter/confirm the NTFS partitions you wish to backup as well."), 1926 1925 tmp, MAX_STR_LEN / 4)) { 1927 log_to_screen( "User has chosen not to backup the PC");1926 log_to_screen(_("User has chosen not to backup the PC")); 1928 1927 finish(1); 1929 1928 } … … 1933 1932 1934 1933 if (!popup_and_get_string 1935 ( "Exclude paths",1936 "Please enter paths which you do NOT want to backup. Separate them with spaces. NB: /tmp and /proc are always excluded. :-) Just hit 'Enter' if you want to do a full system backup.",1934 (_("Exclude paths"), 1935 _("Please enter paths which you do NOT want to backup. Separate them with spaces. NB: /tmp and /proc are always excluded. :-) Just hit 'Enter' if you want to do a full system backup."), 1937 1936 bkpinfo->exclude_paths, MAX_STR_LEN)) { 1938 log_to_screen( "User has chosen not to backup the PC");1937 log_to_screen(_("User has chosen not to backup the PC")); 1939 1938 finish(1); 1940 1939 } … … 1943 1942 bkpinfo->verify_data = 1944 1943 ask_me_yes_or_no 1945 ( "Will you want to verify your backups after Mondo has created them?");1944 (_("Will you want to verify your backups after Mondo has created them?")); 1946 1945 1947 1946 #ifndef __FreeBSD__ 1948 1947 if (!ask_me_yes_or_no 1949 ( "Are you confident that your kernel is a sane, sensible, standard Linux kernel? Say 'no' if you are using a Gentoo <1.4 or Debian <3.0, please.")){1948 (_("Are you confident that your kernel is a sane, sensible, standard Linux kernel? Say 'no' if you are using a Gentoo <1.4 or Debian <3.0, please."))){ 1950 1949 paranoid_alloc(bkpinfo->kernel_path, "FAILSAFE"); 1951 1950 } … … 1953 1952 1954 1953 if (!ask_me_yes_or_no 1955 ( "Are you sure you want to proceed? Hit 'no' to abort.")) {1956 log_to_screen( "User has chosen not to backup the PC");1954 (_("Are you sure you want to proceed? Hit 'no' to abort."))) { 1955 log_to_screen(_("User has chosen not to backup the PC")); 1957 1956 finish(1); 1958 1957 } -
trunk/mondo/mondo/common/libmondo-fifo.c
r142 r507 96 96 if (!res) { 97 97 bufsize++; 98 asprintf(&tmp, "Negotiated max buffer of %d MB ", bufsize);98 asprintf(&tmp, _("Negotiated max buffer of %d MB ", bufsize)); 99 99 log_to_screen(tmp); 100 100 paranoid_free(tmp); … … 103 103 res = 0; 104 104 log_to_screen 105 ( "Cannot negotiate a buffer of ANY size. Using dd instead.");105 (_("Cannot negotiate a buffer of ANY size. Using dd instead.")); 106 106 } 107 107 if (direction == 'r') { … … 143 143 if (run_program_and_log_output(tmp, 1)) { 144 144 fres = NULL; 145 log_to_screen( "Failed to open tape streamer. Buffer error.");146 } else { 147 log_to_screen( "Buffer successfully started.");145 log_to_screen(_("Failed to open tape streamer. Buffer error.")); 146 } else { 147 log_to_screen(_("Buffer successfully started.")); 148 148 } 149 149 paranoid_free(tmp); -
trunk/mondo/mondo/common/libmondo-filelist.c
r334 r507 11 11 #include "my-stuff.h" 12 12 #include "mondostructures.h" 13 #include "lib-common-externs.h"14 13 #include "libmondo-filelist.h" 15 14 #include "libmondo-string-EXT.h" 16 15 #include "libmondo-files-EXT.h" 17 16 #include "libmondo-fork-EXT.h" 18 #include " libmondo-gui-EXT.h"17 #include "newt-specific-EXT.h" 19 18 #include "libmondo-tools-EXT.h" 20 19 … … 91 90 int i, retval = 0; 92 91 93 mvaddstr_and_log_it(g_currentY, 0, "Dividing filelist into sets");94 95 log_to_screen( "Dividing filelist into sets. Please wait.");92 mvaddstr_and_log_it(g_currentY, 0, _("Dividing filelist into sets")); 93 94 log_to_screen(_("Dividing filelist into sets. Please wait.")); 96 95 i = 0; 97 96 /* … … 376 375 if (depth == 0) { 377 376 open_evalcall_form("Freeing memory"); 378 log_to_screen( "Freeing memory formerly occupied by filelist");377 log_to_screen(_("Freeing memory formerly occupied by filelist")); 379 378 } 380 379 depth++; … … 789 788 // add here 790 789 if (!(newnode = (struct s_node *) malloc(sizeof(struct s_node)))) { 791 log_to_screen( "failed to malloc");790 log_to_screen(_("failed to malloc")); 792 791 depth--; 793 792 return (1); … … 821 820 (node->down = 822 821 (struct s_node *) malloc(sizeof(struct s_node)))) { 823 log_to_screen( "%s - failed to malloc", string_to_add);822 log_to_screen(_("%s - failed to malloc"), string_to_add); 824 823 return (1); 825 824 } … … 873 872 fatal_error("filelist does not exist -- cannot load it"); 874 873 } 875 log_to_screen( "Loading filelist");874 log_to_screen(_("Loading filelist")); 876 875 asprintf(&command_to_open_fname, "gzip -dc %s", filelist_fname); 877 876 asprintf(&tmp, "zcat %s | wc -l", filelist_fname); … … 882 881 883 882 if (lines_in_filelist < 3) { 884 log_to_screen( "Warning - surprisingly short filelist.");883 log_to_screen(_("Warning - surprisingly short filelist.")); 885 884 } 886 885 g_original_noof_lines_in_filelist = lines_in_filelist; … … 901 900 paranoid_free(command_to_open_fname); 902 901 903 open_evalcall_form( "Loading filelist from disk");902 open_evalcall_form(_("Loading filelist from disk")); 904 903 for (getline(&fname, &n, pin); !feof(pin); getline(&fname, &n, pin)) { 905 904 if ((fname[strlen(fname) - 1] == 13 … … 1015 1014 assert(outfname != NULL); // will be zerolength if save_filelist() is called by itself 1016 1015 if (depth == 0) { 1017 log_to_screen( "Saving filelist");1016 log_to_screen(_("Saving filelist")); 1018 1017 if (!(fout = fopen(outfname, "w"))) { 1019 1018 fatal_error("Cannot openout/save filelist"); 1020 1019 } 1021 1020 lines_in_filelist = g_original_noof_lines_in_filelist; /* set by load_filelist() */ 1022 open_evalcall_form( "Saving selection to disk");1021 open_evalcall_form(_("Saving selection to disk")); 1023 1022 } 1024 1023 for (node = filelist; node != NULL; node = node->right) { … … 1281 1280 if (bkpinfo->make_filelist) { 1282 1281 mvaddstr_and_log_it(g_currentY, 0, 1283 "Making catalog of files to be backed up");1282 _("Making catalog of files to be backed up")); 1284 1283 } else { 1285 1284 mvaddstr_and_log_it(g_currentY, 0, 1286 "Using supplied catalog of files to be backed up");1285 _("Using supplied catalog of files to be backed up")); 1287 1286 } 1288 1287 … … 1305 1304 log_OS_error("Call to mondo-makefilelist failed"); 1306 1305 *p_res++; 1307 mvaddstr_and_log_it(g_currentY++, 74, "Failed.");1306 mvaddstr_and_log_it(g_currentY++, 74, _("Failed.")); 1308 1307 } else { 1309 mvaddstr_and_log_it(g_currentY++, 74, "Done.");1308 mvaddstr_and_log_it(g_currentY++, 74, _("Done.")); 1310 1309 } 1311 1310 return (res); … … 1399 1398 #ifndef _XWIN 1400 1399 if (!g_text_mode) { 1401 asprintf(&tmp, "Reading %-68s", dir);1400 asprintf(&tmp, _("Reading %-68s"), dir); 1402 1401 newtDrawRootText(0, g_noof_rows - 3, tmp); 1403 1402 paranoid_free(tmp); -
trunk/mondo/mondo/common/libmondo-files.c
r416 r507 13 13 #include "libmondo-files.h" 14 14 15 #include "lib-common-externs.h"16 17 15 #include "libmondo-tools-EXT.h" 18 #include " libmondo-gui-EXT.h"16 #include "newt-specific-EXT.h" 19 17 #include "libmondo-devices-EXT.h" 20 18 #include "libmondo-fork-EXT.h" … … 294 292 while (!kernel[0]) { 295 293 if (!ask_me_yes_or_no 296 ( "Kernel not found or invalid. Choose another?")) {294 (_("Kernel not found or invalid. Choose another?"))) { 297 295 return (1); 298 296 } 299 297 if (!popup_and_get_string 300 ( "Kernel path",301 "What is the full path and filename of your kernel, please?",298 (_("Kernel path"), 299 _("What is the full path and filename of your kernel, please?"), 302 300 kernel, MAX_STR_LEN / 4)) { 303 301 fatal_error … … 489 487 490 488 if (!does_file_exist(filename)) { 491 asprintf(&tmp, "Tring to get last line of nonexistent file (%s)",489 asprintf(&tmp, _("Tring to get last line of nonexistent file (%s)"), 492 490 filename); 493 491 log_it(tmp); … … 884 882 if (res) { 885 883 asprintf(&errorstr, 886 "Please install '%s'. I cannot find it on your system.",884 _("Please install '%s'. I cannot find it on your system."), 887 885 fname); 888 886 log_to_screen(errorstr); 889 887 paranoid_free(errorstr); 890 888 log_to_screen 891 ( "There may be an hyperlink at http://www.mondorescue.org which");892 log_to_screen( "will take you to the relevant (missing) package.");889 (_("There may be an hyperlink at http://www.mondorescue.org which")); 890 log_to_screen(_("will take you to the relevant (missing) package.")); 893 891 return (1); 894 892 } else { … … 998 996 999 997 asprintf(&tmp, "%s/payload.tgz", g_mondo_home); 998 999 /* i18n */ 1000 asprintf(&command, CP_BIN " --parents /usr/share/locale/*/LC_MESSAGES/mondo.mo %s",bkpinfo->scratchdir); 1001 log_msg(4, "command = %s", command); 1002 run_program_and_log_output(command, 1); 1003 paranoid_free(command); 1004 1000 1005 if (does_file_exist(tmp)) { 1001 1006 log_it("Untarring payload %s to scratchdir %s", tmp, … … 1271 1276 if (scratchLL <= 1) { 1272 1277 asprintf(&tmp, 1273 "Your backup will probably occupy a single %s. Maybe two.",1278 _("Your backup will probably occupy a single %s. Maybe two."), 1274 1279 media_descriptor_string(bkpinfo->backup_media_type)); 1275 1280 } else { 1276 asprintf(&tmp, "Your backup will occupy approximately %s media.",1281 asprintf(&tmp, _("Your backup will occupy approximately %s media."), 1277 1282 number_to_text((int) (scratchLL + 1))); 1278 1283 } -
trunk/mondo/mondo/common/libmondo-fork.c
r412 r507 106 106 #include "libmondo-fork.h" 107 107 #include "libmondo-string-EXT.h" 108 #include " libmondo-gui-EXT.h"108 #include "newt-specific-EXT.h" 109 109 #include "libmondo-files-EXT.h" 110 110 #include "libmondo-tools-EXT.h" 111 #include "lib-common-externs.h"112 111 113 112 /*@unused@*/ … … 159 158 } 160 159 161 #define MONDO_POPMSG "Your PC will not retract the CD tray automatically. Please call mondoarchive with the -m (manual CD tray) flag."160 #define MONDO_POPMSG _("Your PC will not retract the CD tray automatically. Please call mondoarchive with the -m (manual CD tray) flag.") 162 161 163 162 /** … … 223 222 224 223 log_to_screen 225 ( "Please be patient. Do not be alarmed by on-screen inactivity.");224 (_("Please be patient. Do not be alarmed by on-screen inactivity.")); 226 225 log_msg(4, "Calling open_evalcall_form() with what_i_am_doing='%s'", 227 226 what_i_am_doing); … … 252 251 if (retval) { 253 252 log_msg(2, "Basic call '%s' returned an error.", basic_call); 254 popup_and_OK( "Press ENTER to continue.");253 popup_and_OK(_("Press ENTER to continue.")); 255 254 popup_and_OK 256 ( "mkisofs and/or cdrecord returned an error. CD was not created");255 (_("mkisofs and/or cdrecord returned an error. CD was not created")); 257 256 } 258 257 } … … 426 425 if (!(fin = popen(command, "r"))) { 427 426 log_OS_error("Unable to popen-in command"); 428 asprintf(&tmp, "Failed utterly to call '%s'", command);427 asprintf(&tmp, _("Failed utterly to call '%s'", command)); 429 428 log_to_screen(tmp); 430 429 paranoid_free(tmp); … … 436 435 437 436 if (!does_file_exist(lockfile)) { 438 log_to_screen( "Waiting for external binary to start");437 log_to_screen(_("Waiting for external binary to start")); 439 438 for (i = 0; i < 60 && !does_file_exist(lockfile); sleep(1), i++) { 440 439 log_msg(3, "Waiting for lockfile %s to exist", lockfile); … … 687 686 if (pcno <= 5 && last_pcno > 40) { 688 687 close_evalcall_form(); 689 open_evalcall_form(" Verifying...");688 open_evalcall_form("_(Verifying...")); 690 689 } 691 690 last_pcno = pcno; … … 764 763 if (pcno <= 5 && last_pcno >= 40) { 765 764 close_evalcall_form(); 766 open_evalcall_form( "Verifying...");765 open_evalcall_form(_("Verifying...")); 767 766 } 768 767 if (counter++ >= 5) { -
trunk/mondo/mondo/common/libmondo-mountlist.c
r280 r507 11 11 #include "mondostructures.h" 12 12 #include "libmondo-mountlist.h" 13 #include "lib-common-externs.h"14 13 #include "libmondo-raid-EXT.h" 15 14 #include "libmondo-devices-EXT.h" 16 15 #include "libmondo-tools-EXT.h" 17 16 #include "libmondo-string-EXT.h" 18 #include " libmondo-gui-EXT.h"17 #include "newt-specific-EXT.h" 19 18 20 19 /*@unused@*/ … … 921 920 if (!(fin = fopen(fname, "r"))) { 922 921 log_it("Unable to open mountlist - '%s'", fname); 923 log_to_screen( "Cannot open mountlist");922 log_to_screen(_("Cannot open mountlist")); 924 923 paranoid_free(siz); 925 924 return (1); … … 962 961 && mountlist->el[items].device[0] != '#') { 963 962 if (items >= ARBITRARY_MAXIMUM) { 964 log_to_screen( "Too many lines in mountlist.. ABORTING");963 log_to_screen(_("Too many lines in mountlist.. ABORTING")); 965 964 finish(1); 966 965 } -
trunk/mondo/mondo/common/libmondo-raid.c
r274 r507 10 10 #include "my-stuff.h" 11 11 #include "mondostructures.h" 12 #include " libmondo-gui-EXT.h"12 #include "newt-specific-EXT.h" 13 13 #include "libmondo-files-EXT.h" 14 14 #include "libmondo-tools-EXT.h" 15 15 #include "libmondo-string-EXT.h" 16 #include "lib-common-externs.h"17 16 #include "libmondo-raid.h" 18 17 … … 885 884 ("Oh my gosh. You actually think a YOTTABYTE will get you anywhere? What're you going to do with 1,208,925,819,614,629,174,706,176 bytes?!?!"); 886 885 popup_and_OK 887 ( "That sizespec is more than 1,208,925,819,614,629,174,706,176 bytes. You have a shocking amount of data. Please send a screenshot to the list :-)");886 (_("That sizespec is more than 1,208,925,819,614,629,174,706,176 bytes. You have a shocking amount of data. Please send a screenshot to the list :-)")); 888 887 return size * sign * 1024 * 1024 * 1024 * 1024 * 1024 * 889 888 1024 * 1024 * 1024; … … 1037 1036 // FIXME --- the above line does not allow for spare disks 1038 1037 log_to_screen 1039 ( "FIXME - create_raidtab_from_mdstat does not allow for spare disks");1038 (_("FIXME - create_raidtab_from_mdstat does not allow for spare disks")); 1040 1039 } 1041 1040 raidlist->entries = i; -
trunk/mondo/mondo/common/libmondo-stream.c
r171 r507 13 13 #include "mondostructures.h" 14 14 #include "libmondo-devices.h" 15 #include "lib-common-externs.h"16 15 #include "libmondo-stream.h" 17 16 #include "libmondo-string-EXT.h" 18 17 #include "libmondo-files-EXT.h" 19 #include " libmondo-gui-EXT.h"18 #include "newt-specific-EXT.h" 20 19 #include "libmondo-fork-EXT.h" 21 20 #include "libmondo-tools-EXT.h" … … 416 415 // log_it("g_current_media_number = %d", g_current_media_number); 417 416 asprintf(&tmp, 418 "When the tape drive goes quiet, please insert volume %d in this series.",417 _("When the tape drive goes quiet, please insert volume %d in this series."), 419 418 tapeno); 420 419 popup_and_OK(tmp); 421 420 paranoid_free(tmp); 422 open_evalcall_form( "Waiting while the tape drive settles");423 } else { 424 open_evalcall_form( "Waiting while the tape drive rewinds");421 open_evalcall_form(_("Waiting while the tape drive settles")); 422 } else { 423 open_evalcall_form(_("Waiting while the tape drive rewinds")); 425 424 } 426 425 … … 613 612 bkpinfo->internal_tape_block_size))) { 614 613 log_OS_error(g_tape_fifo); 615 log_to_screen( "Cannot openin stream device");614 log_to_screen(_("Cannot openin stream device")); 616 615 return (1); 617 616 } 618 log_to_screen( "Reading stream");617 log_to_screen(_("Reading stream")); 619 618 log_it("stream device = '%s'", bkpinfo->media_device); 620 619 /* skip data disks */ 621 620 open_evalcall_form("Skipping data disks on stream"); 622 log_to_screen( "Skipping data disks on stream");621 log_to_screen(_("Skipping data disks on stream")); 623 622 if (!(fout = fopen(outfname, "w"))) { 624 623 log_OS_error(outfname); 625 log_to_screen( "Cannot openout datadisk all.tar.gz file");624 log_to_screen(_("Cannot openout datadisk all.tar.gz file")); 626 625 return (-1); 627 626 } 628 627 if (!(datablock = (char *) malloc(256 * 1024))) { 629 log_to_screen( "Unable to malloc 256*1024");628 log_to_screen(_("Unable to malloc 256*1024")); 630 629 exit(1); 631 630 } … … 707 706 return (0); 708 707 } else { 709 log_to_screen( "Failed to openout to cdstream (fifo)");708 log_to_screen(_("Failed to openout to cdstream (fifo)")); 710 709 return (1); 711 710 } … … 739 738 open_device_via_buffer(tapedev, 'w', internal_tape_block_size))) { 740 739 log_OS_error(g_tape_fifo); 741 log_to_screen( "Cannot openin stream device");740 log_to_screen(_("Cannot openin stream device")); 742 741 return (1); 743 742 } … … 872 871 if (!fout) { 873 872 log_OS_error(outfname); 874 log_to_screen( "Cannot openout file");873 log_to_screen(_("Cannot openout file")); 875 874 return (1); 876 875 } … … 930 929 } 931 930 if (strcmp(temp_cksum, actual_cksum)) { 932 asprintf(&tmp, "actual cksum=%s; recorded cksum=%s", actual_cksum,931 asprintf(&tmp, _("actual cksum=%s; recorded cksum=%s"), actual_cksum, 933 932 temp_cksum); 934 933 log_to_screen(tmp); 935 934 paranoid_free(tmp); 936 935 937 asprintf(&tmp, "%s (%ld K) is corrupt on tape", temp_fname,936 asprintf(&tmp, _("%s (%ld K) is corrupt on tape"), temp_fname, 938 937 (long) orig_size >> 10); 939 938 log_to_screen(tmp); … … 1078 1077 log_it("mediasize = %ld", mediasize); 1079 1078 we_need_a_new_tape = TRUE; 1080 log_to_screen( "Should have started a new tape/CD already");1079 log_to_screen(_("Should have started a new tape/CD already")); 1081 1080 } 1082 1081 if ((g_tape_posK + length_of_incoming_file / 1024) >> 10 >= … … 1238 1237 bkpinfo->internal_tape_block_size))) { 1239 1238 log_OS_error(g_tape_fifo); 1240 log_to_screen( "Cannot openin stream device");1239 log_to_screen(_("Cannot openin stream device")); 1241 1240 return (1); 1242 1241 } … … 1275 1274 if (g_current_media_number > MAX_NOOF_MEDIA) { 1276 1275 res++; 1277 log_to_screen( "Too many tapes. Man, you need to use nfs!");1276 log_to_screen(_("Too many tapes. Man, you need to use nfs!")); 1278 1277 } 1279 1278 if (bkpinfo->backup_media_type == cdstream) { … … 1288 1287 paranoid_free(command); 1289 1288 if (!g_tape_stream) { 1290 log_to_screen( "Failed to openout to cdstream (fifo)");1289 log_to_screen(_("Failed to openout to cdstream (fifo)")); 1291 1290 return (1); 1292 1291 } … … 1298 1297 bkpinfo->internal_tape_block_size))) { 1299 1298 log_OS_error(g_tape_fifo); 1300 log_to_screen( "Cannot openin stream device");1299 log_to_screen(_("Cannot openin stream device")); 1301 1300 return (1); 1302 1301 } … … 1379 1378 /*@ end vars *************************************************** */ 1380 1379 1381 open_evalcall_form( "Writing data disks to tape");1382 log_to_screen( "Writing data disks to tape");1380 open_evalcall_form(_("Writing data disks to tape")); 1381 log_to_screen(_("Writing data disks to tape")); 1383 1382 log_it("Data disks = %s", fname); 1384 1383 if (!does_file_exist(fname)) { 1385 asprintf(&tmp, "Cannot find %s", fname);1384 asprintf(&tmp, _("Cannot find %s"), fname); 1386 1385 log_to_screen(tmp); 1387 1386 paranoid_free(tmp); … … 1568 1567 if (!g_tape_stream) { 1569 1568 log_to_screen 1570 ( "You're not backing up to tape. Why write a tape header?");1569 (_("You're not backing up to tape. Why write a tape header?")); 1571 1570 return (1); 1572 1571 } … … 1602 1601 1603 1602 /*@ end vars *************************************************** */ 1604 asprintf(&tmp, "Wrong marker! (Should be %s, is actually %s)",1603 asprintf(&tmp, _("Wrong marker! (Should be %s, is actually %s)"), 1605 1604 marker_to_string(should_be), marker_to_string(it_is)); 1606 1605 log_to_screen(tmp); -
trunk/mondo/mondo/common/libmondo-string.c
r171 r507 12 12 #include "mondostructures.h" 13 13 #include "libmondo-string.h" 14 #include "lib-common-externs.h"15 14 #include "libmondo-files-EXT.h" 16 #include " libmondo-gui-EXT.h"15 #include "newt-specific-EXT.h" 17 16 #include "libmondo-tools-EXT.h" 18 17 … … 246 245 ("Oh my gosh. You actually think a YOTTABYTE will get you anywhere? What're you going to do with 1,208,925,819,614,629,174,706,176 bytes of data?!?!"); 247 246 popup_and_OK 248 ( "That sizespec is more than 1,208,925,819,614,629,174,706,176 bytes. You have a shocking amount of data. Please send a screenshot to the list :-)");247 (_("That sizespec is more than 1,208,925,819,614,629,174,706,176 bytes. You have a shocking amount of data. Please send a screenshot to the list :-)")); 249 248 fatal_error("Integer overflow."); 250 249 } else if (ch != 'm' && ch != 'M') { … … 901 900 sev = 2; 902 901 asprintf(&reason, 903 "/var's contents will change regularly, inevitably.");902 _("/var's contents will change regularly, inevitably.")); 904 903 } 905 904 if (!strncmp(filename, "/home", 5)) { 906 905 sev = 2; 907 906 asprintf(&reason, 908 "It's in your /home partiton. Therefore, it is important.");907 _("It's in your /home partiton. Therefore, it is important.")); 909 908 } 910 909 if (!strncmp(filename, "/usr/", 5)) { 911 910 sev = 3; 912 911 asprintf(&reason, 913 "You may have installed/removed software during the backup.");912 _("You may have installed/removed software during the backup.")); 914 913 } 915 914 if (!strncmp(filename, "/etc/", 5)) { 916 915 sev = 3; 917 916 asprintf(&reason, 918 "Do not edit config files while backing up your PC.");917 _("Do not edit config files while backing up your PC.")); 919 918 } 920 919 if (!strcmp(filename, "/etc/adjtime") 921 920 || !strcmp(filename, "/etc/mtab")) { 922 921 sev = 1; 923 asprintf(&reason, "This file changes all the time. It's OK.");922 asprintf(&reason, _("This file changes all the time. It's OK.")); 924 923 } 925 924 if (!strncmp(filename, "/root/", 6)) { 926 925 sev = 3; 927 926 asprintf(&reason, 928 "Were you compiling/editing something in /root?");927 _("Were you compiling/editing something in /root?")); 929 928 } 930 929 if (!strncmp(filename, "/root/.", 7)) { 931 930 sev = 2; 932 asprintf(&reason, "Temp or 'dot' files changed in /root.");931 asprintf(&reason, _("Temp or 'dot' files changed in /root.")); 933 932 } 934 933 if (!strncmp(filename, "/var/lib/", 9)) { 935 934 sev = 2; 936 asprintf(&reason, "Did you add/remove software during backing?");935 asprintf(&reason, _("Did you add/remove software during backing?")); 937 936 } 938 937 if (!strncmp(filename, "/var/lib/rpm", 12)) { 939 938 sev = 3; 940 asprintf(&reason, "Did you add/remove software during backing?");939 asprintf(&reason, _("Did you add/remove software during backing?")); 941 940 } 942 941 if (!strncmp(filename, "/var/lib/slocate", 16)) { 943 942 sev = 1; 944 943 asprintf(&reason, 945 "The 'update' daemon ran during backup. This does not affect the integrity of your backup.");944 _("The 'update' daemon ran during backup. This does not affect the integrity of your backup.")); 946 945 } 947 946 if (!strncmp(filename, "/var/log/", 9) … … 950 949 sev = 1; 951 950 asprintf(&reason, 952 "Log files change frequently as the computer runs. Fret not.");951 _("Log files change frequently as the computer runs. Fret not.")); 953 952 } 954 953 if (!strncmp(filename, "/var/spool", 10)) { 955 954 sev = 1; 956 955 asprintf(&reason, 957 "Background processes or printers were active. This does not affect the integrity of your backup.");956 _("Background processes or printers were active. This does not affect the integrity of your backup.")); 958 957 } 959 958 if (!strncmp(filename, "/var/spool/mail", 10)) { 960 959 sev = 2; 961 asprintf(&reason, "Mail was sent/received during backup.");960 asprintf(&reason, _("Mail was sent/received during backup.")); 962 961 } 963 962 if (filename[strlen(filename) - 1] == '~') { 964 963 sev = 1; 965 964 asprintf(&reason, 966 "Backup copy of another file which was modified recently.");965 _("Backup copy of another file which was modified recently.")); 967 966 } 968 967 if (strstr(filename, "cache")) { 969 968 sev = 1; 970 969 asprintf(&reason, 971 "Part of a cache of data. Caches change from time to time. Don't worry.");970 _("Part of a cache of data. Caches change from time to time. Don't worry.")); 972 971 } 973 972 if (!strncmp(filename, "/var/run/", 9) … … 984 983 sev = 3; 985 984 asprintf(&reason, 986 "Changed since backup. Consider running a differential backup in a day or two.");985 _("Changed since backup. Consider running a differential backup in a day or two.")); 987 986 } 988 987 … … 1043 1042 if (bkpinfo->media_size[g_current_media_number] <= 0) { 1044 1043 asprintf(&tmp, "%lld", g_tape_posK); 1045 asprintf(&outstr, "Volume %d: %s kilobytes archived so far",1044 asprintf(&outstr, _("Volume %d: %s kilobytes archived so far"), 1046 1045 g_current_media_number, commarize(tmp)); 1047 1046 paranoid_free(tmp); 1047 1048 1048 return (outstr); 1049 1049 } … … 1054 1054 (int) (g_tape_posK / 10 / 1055 1055 bkpinfo->media_size[g_current_media_number]); 1056 asprintf(&prepstr, "Volume %d: [", g_current_media_number);1056 asprintf(&prepstr, _("Volume %d: ["), g_current_media_number); 1057 1057 } else { 1058 1058 percentage = … … 1086 1086 asprintf(&outstr, "%s%s%s] %3d%% used", prepstr, tmp1, tmp2, percentage); 1087 1087 */ 1088 asprintf(&outstr, "%s%s%s] %3d percent used", prepstr, tmp1, tmp2,1088 asprintf(&outstr, _("%s%s%s] %3d percent used"), prepstr, tmp1, tmp2, 1089 1089 percentage); 1090 1090 paranoid_free(prepstr); -
trunk/mondo/mondo/common/libmondo-tools.c
r426 r507 10 10 #include "my-stuff.h" 11 11 #include "mondostructures.h" 12 #include "lib-common-externs.h"13 12 #include "libmondo-tools.h" 14 #include " libmondo-gui-EXT.h"13 #include "newt-specific-EXT.h" 15 14 #include "libmondo-files-EXT.h" 16 15 #include "libmondo-fork-EXT.h" … … 109 108 newtSuspend(); 110 109 #endif 111 printf( "ASSERTION FAILED: `%s'\n", exp);112 printf( "\tat %s:%d in %s\n\n", file, line, function);113 printf( "(I)gnore, ignore (A)ll, (D)ebug, a(B)ort, or (E)xit? ");110 printf(_("ASSERTION FAILED: `%s'\n"), exp); 111 printf(_("\tat %s:%d in %s\n\n"), file, line, function); 112 printf(_("(I)gnore, ignore (A)ll, (D)ebug, a(B)ort, or (E)xit? ")); 114 113 do { 115 114 is_valid = TRUE; … … 138 137 case '\n': 139 138 printf 140 ( "(I)gnore, ignore (A)ll, (D)ebug, a(B)ort, or (E)xit? ");139 (_("(I)gnore, ignore (A)ll, (D)ebug, a(B)ort, or (E)xit? ")); 141 140 break; 142 141 default: 143 142 is_valid = FALSE; 144 printf( "Invalid choice.\n");143 printf(_("Invalid choice.\n")); 145 144 break; 146 145 } … … 840 839 if (atol(tmp) < 35000) { 841 840 retval++; 842 log_to_screen( "You must have at least 32MB of RAM to use Mondo.");841 log_to_screen(_("You must have at least 32MB of RAM to use Mondo.")); 843 842 } 844 843 if (atol(tmp) < 66000) { 845 844 log_to_screen 846 ( "WARNING! You have very little RAM. Please upgrade to 64MB or more.");845 (_("WARNING! You have very little RAM. Please upgrade to 64MB or more.")); 847 846 } 848 847 paranoid_free(tmp); … … 872 871 ("grep ramdisk /proc/devices", FALSE)) { 873 872 if (!ask_me_yes_or_no 874 ( "Your kernel has no ramdisk support. That's mind-numbingly stupid but I'll allow it if you're planning to use a failsafe kernel. Are you?"))873 (_("Your kernel has no ramdisk support. That's mind-numbingly stupid but I'll allow it if you're planning to use a failsafe kernel. Are you?"))) 875 874 { 876 875 // retval++; 877 876 log_to_screen 878 ( "It looks as if your kernel lacks ramdisk and initrd support.");877 (_("It looks as if your kernel lacks ramdisk and initrd support.")); 879 878 log_to_screen 880 ( "I'll allow you to proceed but FYI, if I'm right, your kernel is broken.");879 (_("I'll allow you to proceed but FYI, if I'm right, your kernel is broken.")); 881 880 } 882 881 } … … 900 899 !run_program_and_log_output 901 900 ("mount | grep -w dos | grep -v /dev/fd | grep -v nexdisk", 0)) { 902 log_to_screen( "I think you have a Windows 9x partition.");901 log_to_screen(_("I think you have a Windows 9x partition.")); 903 902 retval += whine_if_not_found("parted"); 904 903 #ifndef __IA64__ … … 906 905 // retval += 907 906 if (!find_home_of_exe("ms-sys")) { 908 log_to_screen( "Please install ms-sys just in case.");907 log_to_screen(_("Please install ms-sys just in case.")); 909 908 } 910 909 #endif … … 916 915 } else { 917 916 log_to_screen 918 ( "Your system lacks the 'cmp' binary. I'll create a dummy cmp for you.");917 (_("Your system lacks the 'cmp' binary. I'll create a dummy cmp for you.")); 919 918 if (run_program_and_log_output 920 919 ("cp -f `which true` /usr/bin/cmp", 0)) { … … 931 930 if (strstr(tmp, "autofs")) { 932 931 log_to_screen 933 ( "Your CD-ROM is mounted via autofs. I therefore cannot tell");932 (_("Your CD-ROM is mounted via autofs. I therefore cannot tell")); 934 933 log_to_screen 935 ( "if a CD actually is inserted. If a CD is inserted, please");936 log_to_screen( "eject it. Thank you.");934 (_("if a CD actually is inserted. If a CD is inserted, please")); 935 log_to_screen(_("eject it. Thank you.")); 937 936 log_it 938 937 ("Ignoring autofs CD-ROM 'mount' since we hope nothing's in it."); … … 961 960 retval++; 962 961 log_to_screen 963 ( "Please find out what happened to /etc/modules.conf");962 (_("Please find out what happened to /etc/modules.conf")); 964 963 } 965 964 } … … 974 973 975 974 if (run_program_and_log_output("mindi -V", 1)) { 976 log_to_screen( "Could not ascertain mindi's version number.");975 log_to_screen(_("Could not ascertain mindi's version number.")); 977 976 log_to_screen 978 ( "You have not installed Mondo and/or Mindi properly.");979 log_to_screen( "Please uninstall and reinstall them both.");977 (_("You have not installed Mondo and/or Mindi properly.")); 978 log_to_screen(_("Please uninstall and reinstall them both.")); 980 979 fatal_error("Please reinstall Mondo and Mindi."); 981 980 } … … 983 982 ("mindi --makemountlist /tmp/mountlist.txt.test", 5)) { 984 983 log_to_screen 985 ( "Mindi --makemountlist /tmp/mountlist.txt.test failed for some reason.");984 (_("Mindi --makemountlist /tmp/mountlist.txt.test failed for some reason.")); 986 985 log_to_screen 987 ( "Please run that command by hand and examine /var/log/mindi.log");986 (_("Please run that command by hand and examine /var/log/mindi.log")); 988 987 log_to_screen 989 ( "for more information. Perhaps your /etc/fstab file is insane.");988 (_("for more information. Perhaps your /etc/fstab file is insane.")); 990 989 log_to_screen 991 ( "Perhaps Mindi's MakeMountlist() subroutine has a bug. We'll see.");990 (_("Perhaps Mindi's MakeMountlist() subroutine has a bug. We'll see.")); 992 991 retval++; 993 992 } … … 996 995 && !does_file_exist("/etc/raidtab")) { 997 996 log_to_screen 998 ( "You have RAID partitions but no /etc/raidtab - creating one from /proc/mdstat");997 (_("You have RAID partitions but no /etc/raidtab - creating one from /proc/mdstat")); 999 998 create_raidtab_from_mdstat("/etc/raidtab", "/proc/mdstat"); 1000 999 } 1001 1000 1002 1001 if (retval) { 1003 mvaddstr_and_log_it(g_currentY++, 74, "Failed.");1002 mvaddstr_and_log_it(g_currentY++, 74, _("Failed.")); 1004 1003 } else { 1005 mvaddstr_and_log_it(g_currentY++, 74, "Done.");1004 mvaddstr_and_log_it(g_currentY++, 74, _("Done.")); 1006 1005 } 1007 1006 return (retval); -
trunk/mondo/mondo/common/libmondo-verify.c
r485 r507 9 9 #include "mondostructures.h" 10 10 #include "libmondo-verify.h" 11 #include " libmondo-gui-EXT.h"11 #include "newt-specific-EXT.h" 12 12 #include "libmondo-files-EXT.h" 13 13 #include "libmondo-fork-EXT.h" … … 16 16 #include "libmondo-devices-EXT.h" 17 17 #include "libmondo-tools-EXT.h" 18 #include "lib-common-externs.h"19 18 20 19 /*@unused@*/ … … 669 668 paranoid_free(tmp); 670 669 671 asprintf(&tmp, "%s has changed on live filesystem",670 asprintf(&tmp, _("%s has changed on live filesystem"), 672 671 biggie_fname); 673 672 log_to_screen(tmp); … … 719 718 asprintf(&curr_acl_list_fname, ACL_BIGGLST_FNAME_RAW_SZ, 720 719 bkpinfo->tmpdir); 721 log_to_screen( "Verifying regular archives on tape");720 log_to_screen(_("Verifying regular archives on tape")); 722 721 total_afioballs = get_last_filelist_number(bkpinfo) + 1; 723 open_progress_form( "Verifying filesystem",724 "I am verifying archives against your live filesystem now.",725 "Please wait. This may take a couple of hours.", "",722 open_progress_form(_("Verifying filesystem"), 723 _("I am verifying archives against your live filesystem now."), 724 _("Please wait. This may take a couple of hours."), "", 726 725 total_afioballs); 727 726 res = read_header_block_from_stream(&size, NULL, &ctrl_chr); … … 771 770 res = verify_an_afioball_from_stream(bkpinfo, fname, size); 772 771 if (res) { 773 asprintf(&tmp, "Afioball %ld differs from live filesystem",772 asprintf(&tmp, _("Afioball %ld differs from live filesystem"), 774 773 current_afioball_number); 775 774 log_to_screen(tmp); … … 857 856 noof_biggiefiles = (long) size; 858 857 log_msg(1, "noof_biggiefiles = %ld", noof_biggiefiles); 859 open_progress_form( "Verifying big files", comment,860 "Please wait. This may take some time.", "",858 open_progress_form(_("Verifying big files"), comment, 859 _("Please wait. This may take some time."), "", 861 860 noof_biggiefiles); 862 861 paranoid_free(comment); … … 876 875 p++; 877 876 } 878 asprintf(&comment, "Verifying bigfile #%ld (%ld K)",877 asprintf(&comment, _("Verifying bigfile #%ld (%ld K)"), 879 878 current_biggiefile_number, (long) size >> 10); 880 879 update_progress_form(comment); … … 949 948 950 949 if (bkpinfo->manual_cd_tray) { 951 popup_and_OK( "Please push CD tray closed.");950 popup_and_OK(_("Please push CD tray closed.")); 952 951 } 953 952 if (find_and_mount_actual_cd(bkpinfo, mountpoint)) { 954 log_to_screen( "failed to mount actual CD");953 log_to_screen(_("failed to mount actual CD")); 955 954 return (1); 956 955 } … … 964 963 mddevice = make_vn(fname); 965 964 if (ret) { 966 asprintf(&tmp, "make_vn of %s failed; unable to verify ISO\n",965 asprintf(&tmp, _("make_vn of %s failed; unable to verify ISO\n"), 967 966 fname); 968 967 log_to_screen(tmp); … … 976 975 #endif 977 976 if (run_program_and_log_output(command, FALSE)) { 978 asprintf(&tmp, "%s failed; unable to mount ISO image\n",977 asprintf(&tmp, _("%s failed; unable to mount ISO image\n"), 979 978 command); 980 979 log_to_screen(tmp); … … 1065 1064 1066 1065 log_msg(3, "verify_tape_backups --- starting"); 1067 log_to_screen( "Verifying backups");1066 log_to_screen(_("Verifying backups")); 1068 1067 openin_tape(bkpinfo); 1069 1068 … … 1093 1092 && length_of_file(changed_files_fname) > 2) { 1094 1093 log_to_screen 1095 ( "Warning - unable to check logfile to derive list of changed files");1094 (_("Warning - unable to check logfile to derive list of changed files")); 1096 1095 } else { 1097 1096 log_to_screen 1098 ( "No differences found. Therefore, no 'changed.files' text file.");1097 (_("No differences found. Therefore, no 'changed.files' text file.")); 1099 1098 } 1100 1099 } … … 1119 1118 1120 1119 log_to_screen 1121 ( "See /tmp/changed.files for a list of nonmatching files.");1120 (_("See /tmp/changed.files for a list of nonmatching files.")); 1122 1121 log_to_screen 1123 ( "The files probably changed on filesystem, not on backup media.");1122 (_("The files probably changed on filesystem, not on backup media.")); 1124 1123 // retval++; 1125 1124 } -
trunk/mondo/mondo/common/libmondo.h
r59 r507 9 9 #include "libmondo-files-EXT.h" 10 10 #include "libmondo-fork-EXT.h" 11 #include " libmondo-gui-EXT.h"11 #include "newt-specific-EXT.h" 12 12 #include "libmondo-mountlist-EXT.h" 13 13 #include "libmondo-raid-EXT.h" -
trunk/mondo/mondo/common/my-stuff.h
r426 r507 72 72 #endif 73 73 #include <assert.h> 74 75 #include "../../config.h" 74 76 75 77 #if defined(DEBUG) && !__cplusplus … … 239 241 * Welcome string displayed at the top of the newt interface. 240 242 */ 241 #define WELCOME_STRING "W E L C O M E T O M O N D O R E S C U E"243 #define WELCOME_STRING _("W E L C O M E T O M O N D O R E S C U E") 242 244 243 245 /** … … 397 399 #define DEFAULT_MR_LOGLEVEL 4 398 400 401 #ifdef ENABLE_NLS 402 # include <libintl.h> 403 # undef _ 404 # define _(String) dgettext (PACKAGE, String) 405 # ifdef gettext_noop 406 # define N_(String) gettext_noop (String) 407 # else 408 # define N_(String) (String) 409 # endif 410 #else 411 # define textdomain(String) (String) 412 # define gettext(String) (String) 413 # define dgettext(Domain,Message) (Message) 414 # define dcgettext(Domain,Message,Type) (Message) 415 # define bindtextdomain(Domain,Directory) (Domain) 416 # define _(String) (String) 417 # define N_(String) (String) 418 419 #endif 420 421 422 399 423 #endif /* _MY_STUFF_H_ */ -
trunk/mondo/mondo/common/newt-specific.c
r300 r507 25 25 #include "libmondo-tools-EXT.h" 26 26 #include "libmondo-fork-EXT.h" 27 #include "libmondo-gui-EXT.h" 28 #include "lib-common-externs.h" 27 #include "newt-specific-EXT.h" 29 28 30 29 /*@unused@*/ … … 124 123 tmp[i - 1] = '\0'; 125 124 } 126 if (strstr( "yesYES", tmp)) {125 if (strstr(_("yesYES"), tmp)) { 127 126 paranoid_free(tmp); 128 127 return (TRUE); 129 } else if (strstr( "NOno", tmp)) {128 } else if (strstr(_("NOno"), tmp)) { 130 129 paranoid_free(tmp); 131 130 return (FALSE); … … 133 132 system("sync"); 134 133 printf 135 ( "Please enter either YES or NO (or yes or no, or y or n, or...)\n");134 (_("Please enter either YES or NO (or yes or no, or y or n, or...)\n")); 136 135 } 137 136 } 138 137 } else { 139 return (popup_with_buttons(prompt, "Yes", "No"));138 return (popup_with_buttons(prompt, _("Yes"), _("No"))); 140 139 } 141 140 } … … 169 168 tmp[i - 1] = '\0'; 170 169 } 171 if (strstr( "okOKOkYESyes", tmp)) {170 if (strstr(_("okOKOkYESyes"), tmp)) { 172 171 paranoid_free(tmp); 173 172 return (TRUE); … … 177 176 } 178 177 } else { 179 return (popup_with_buttons(prompt, " Okay ", "Cancel"));178 return (popup_with_buttons(prompt, _(" Okay "), _("Cancel"))); 180 179 } 181 180 } … … 313 312 ("gzip -9c "MONDO_LOGFILE" > /tmp/MA.log.gz 2> /dev/null"); 314 313 printf 315 ( "If you require technical support, please contact the mailing list.\n");316 printf( "See http://www.mondorescue.org for details.\n");314 (_("If you require technical support, please contact the mailing list.\n")); 315 printf(_("See http://www.mondorescue.org for details.\n")); 317 316 printf 318 ( "The list's members can help you, if you attach that file to your e-mail.\n");319 printf( "Log file: %s\n", MONDO_LOGFILE);317 (_("The list's members can help you, if you attach that file to your e-mail.\n")); 318 printf(_("Log file: %s\n"), MONDO_LOGFILE); 320 319 if (does_file_exist("/tmp/MA.log.gz")) { 321 320 printf 322 ( "FYI, I have gzipped the log and saved it to /tmp/MA.log.gz\n");323 } 324 printf( "Mondo has aborted.\n");321 (_("FYI, I have gzipped the log and saved it to /tmp/MA.log.gz\n")); 322 } 323 printf(_("Mondo has aborted.\n")); 325 324 register_pid(0, "mondo"); // finish() does this too, FYI 326 325 if (!g_main_pid) { … … 375 374 // system("clear"); 376 375 // iamhere("Finished calling newtFinished"); 377 printf( "Execution run ended; result=%d\n", signal);378 printf( "Type 'less %s' to see the output log\n", MONDO_LOGFILE);376 printf(_("Execution run ended; result=%d\n"), signal); 377 printf(_("Type 'less %s' to see the output log\n"), MONDO_LOGFILE); 379 378 free_libmondo_global_strings(); 380 379 exit(signal); … … 662 661 while (((ch = getchar()) != '\n') && (ch != EOF)); 663 662 } else { 664 (void) popup_with_buttons(prompt, " OK ", "");663 (void) popup_with_buttons(prompt, _(" OK "), ""); 665 664 } 666 665 } … … 718 717 #endif 719 718 ); 720 b_1 = newtButton(6, newtTextboxGetNumLines(text) + 4, " OK ");721 b_2 = newtButton(18, newtTextboxGetNumLines(text) + 4, "Cancel");719 b_1 = newtButton(6, newtTextboxGetNumLines(text) + 4, _(" OK ")); 720 b_2 = newtButton(18, newtTextboxGetNumLines(text) + 4, _("Cancel")); 722 721 // newtOpenWindow (8, 5, 54, newtTextboxGetNumLines (text) + 9, title); 723 722 newtCenteredWindow(54, newtTextboxGetNumLines(text) + 9, title); … … 806 805 } 807 806 // newtOpenWindow (25, 5, 46, newtTextboxGetNumLines (text) + 7, "Alert"); 808 newtCenteredWindow(46, newtTextboxGetNumLines(text) + 7, "Alert");807 newtCenteredWindow(46, newtTextboxGetNumLines(text) + 7, _("Alert")); 809 808 myForm = newtForm(NULL, NULL, 0); 810 809 newtFormAddComponents(myForm, text, b_1, b_2, NULL); … … 870 869 newtCls(); 871 870 newtPushHelpLine 872 ( "Welcome to Mondo Rescue, by Hugo Rabson and the Internet. All rights reversed.");871 (_("Welcome to Mondo Rescue, by Hugo Rabson and the Internet. All rights reversed.")); 873 872 /* newtDrawRootText(28,0,"Welcome to Mondo Rescue"); */ 874 873 newtDrawRootText(18, 0, WELCOME_STRING); … … 947 946 g_isoform_old_progress = percentage; 948 947 asprintf(&timeline_str, 949 "%2ld:%02ld taken %2ld:%02ld remaining",948 _("%2ld:%02ld taken %2ld:%02ld remaining"), 950 949 time_taken / 60, time_taken % 60, time_remaining / 60, 951 950 time_remaining % 60); … … 977 976 } else { 978 977 asprintf(&pcline_str, 979 " %3d%% done %3d%% to go",978 _(" %3d%% done %3d%% to go"), 980 979 percentage, 100 - percentage); 981 980 } … … 1120 1119 1121 1120 if (g_text_mode) { 1122 printf( "---progress-form---1--- %s\r\n", blurb1);1123 printf( "---progress-form---2--- %s\r\n", blurb2);1124 printf( "---progress-form---3--- %s\r\n", blurb3);1125 printf( "---progress-form---E---\n");1121 printf(_("---progress-form---1--- %s%s"), blurb1, "\r\n"); 1122 printf(_("---progress-form---2--- %s%s"), blurb2, "\r\n"); 1123 printf(_("---progress-form---3--- %s%s"), blurb3, "\r\n"); 1124 printf(_("---progress-form---E---\n")); 1126 1125 1127 1126 j = trunc(percentage / 5); … … 1139 1138 1140 1139 if (percentage > 100) { 1141 log_msg(2, "percentage = %d", percentage);1140 log_msg(2, _("percentage = %d"), percentage); 1142 1141 } 1143 1142 asprintf(&taskprogress, 1144 "TASK: [%s%s] %3d%% done; %2ld:%02ld to go", tmp1,1143 _("TASK: [%s%s] %3d%% done; %2ld:%02ld to go"), tmp1, 1145 1144 tmp2, percentage, time_remaining / 60, 1146 1145 time_remaining % 60); 1147 1146 1148 printf( "---progress-form---4--- %s\r\n", taskprogress);1147 printf(_("---progress-form---4--- %s\r\n"), taskprogress); 1149 1148 paranoid_free(taskprogress); 1150 1149 } else { … … 1211 1210 if (g_text_mode) { 1212 1211 for (backup_type = none; backup_type == none;) { 1213 printf( "Backup type (");1212 printf(_("Backup type (")); 1214 1213 for (i = 0; possible_responses[i]; i++) { 1215 1214 printf("%c%s", (i == 0) ? '\0' : ' ', … … 1231 1230 if (restoring) { 1232 1231 asprintf(&title_sz, 1233 "Please choose the backup media from which you want to read data.");1234 asprintf(&minimsg_sz, "Read from:");1232 _("Please choose the backup media from which you want to read data.")); 1233 asprintf(&minimsg_sz, _("Read from:")); 1235 1234 } else { 1236 1235 asprintf(&title_sz, 1237 "Please choose the backup media to which you want to archive data.");1238 asprintf(&minimsg_sz, "Backup to:");1236 _("Please choose the backup media to which you want to archive data.")); 1237 asprintf(&minimsg_sz, _("Backup to:")); 1239 1238 } 1240 1239 newtPushHelpLine(title_sz); … … 1245 1244 paranoid_free(minimsg_sz); 1246 1245 1247 b1 = newtButton(1, 1, "CD-R disks ");1248 b2 = newtButton(17, 1, "CD-RW disks");1249 b3 = newtButton(1, 9, "Tape drive ");1250 b4 = newtButton(17, 5, "CD streamer");1251 b5 = newtButton(1, 5, " DVD disks ");1252 b6 = newtButton(17, 9, " NFS mount ");1253 b7 = newtButton(1, 13, " Hard disk ");1254 b8 = newtButton(17, 13, " Exit ");1246 b1 = newtButton(1, 1, _("CD-R disks ")); 1247 b2 = newtButton(17, 1, _("CD-RW disks")); 1248 b3 = newtButton(1, 9, _("Tape drive ")); 1249 b4 = newtButton(17, 5, _("CD streamer")); 1250 b5 = newtButton(1, 5, _(" DVD disks ")); 1251 b6 = newtButton(17, 9, _(" NFS mount ")); 1252 b7 = newtButton(1, 13, _(" Hard disk ")); 1253 b8 = newtButton(17, 13, _(" Exit ")); 1255 1254 myForm = newtForm(NULL, NULL, 0); 1256 1255 newtFormAddComponents(myForm, b1, b5, b3, b7, b2, b4, b6, b8, … … 1305 1304 newtDrawRootText(18, 0, WELCOME_STRING); 1306 1305 newtPushHelpLine 1307 ( " Please specify the level of compression that you want.");1306 (_(" Please specify the level of compression that you want.")); 1308 1307 // newtOpenWindow (23, 3, 34, 13, "How much compression?"); 1309 newtCenteredWindow(34, 13, "How much compression?");1310 b1 = newtButton(4, 1, "Maximum");1311 b2 = newtButton(18, 1, "Average");1312 b3 = newtButton(4, 5, "Minumum");1313 b4 = newtButton(18, 5, " None ");1314 b5 = newtButton(4, 9, " Exit ");1308 newtCenteredWindow(34, 13, _("How much compression?")); 1309 b1 = newtButton(4, 1, _("Maximum")); 1310 b2 = newtButton(18, 1, _("Average")); 1311 b3 = newtButton(4, 5, _("Minimum")); 1312 b4 = newtButton(18, 5, _(" None ")); 1313 b5 = newtButton(4, 9, _(" Exit ")); 1315 1314 myForm = newtForm(NULL, NULL, 0); 1316 1315 newtFormAddComponents(myForm, b1, b3, b2, b4, b5, NULL); … … 1396 1395 paranoid_fclose(fin); 1397 1396 if (filelist->entries >= ARBITRARY_MAXIMUM) { 1398 log_to_screen( "Arbitrary limits suck, man!");1397 log_to_screen(_("Arbitrary limits suck, man!")); 1399 1398 paranoid_free(tmp); 1400 1399 return (1); … … 1527 1526 } 1528 1527 asprintf(&differ_sz, 1529 " %d files differ. Hit 'Select' to pick a file. Hit 'Close' to quit the list.",1528 _(" %d files differ. Hit 'Select' to pick a file. Hit 'Close' to quit the list."), 1530 1529 i); 1531 1530 newtPushHelpLine(differ_sz); 1532 1531 paranoid_free(differ_sz); 1533 1532 1534 bClose = newtCompactButton(10, 15, " Close ");1535 bSelect = newtCompactButton(30, 15, " Select ");1536 asprintf(&tmp, "%-10s %-20s", "Priority",1537 "Filename");1533 bClose = newtCompactButton(10, 15, _(" Close ")); 1534 bSelect = newtCompactButton(30, 15, _(" Select ")); 1535 asprintf(&tmp, "%-10s %-20s", _("Priority"), 1536 _("Filename")); 1538 1537 headerMsg = newtLabel(2, 1, tmp); 1539 1538 paranoid_free(tmp); 1540 1539 1541 newtOpenWindow(5, 4, 70, 16, "Non-matching files");1540 newtOpenWindow(5, 4, 70, 16, _("Non-matching files")); 1542 1541 myForm = newtForm(NULL, NULL, 0); 1543 1542 newtFormAddComponents(myForm, headerMsg, fileListbox, bClose, … … 1553 1552 i++); 1554 1553 if (i == filelist->entries && filelist->entries > 0) { 1555 log_to_screen( "I don't know what that button does!");1554 log_to_screen(_("I don't know what that button does!")); 1556 1555 } else { 1557 1556 currline = i; -
trunk/mondo/mondo/mondoarchive/main.c
r426 r507 138 138 char *say_at_end = NULL; 139 139 140 #ifdef ENABLE_NLS 141 setlocale(LC_ALL, ""); 142 (void) textdomain("mondo"); 143 #endif 140 144 /* Make sure I'm root; abort if not */ 141 145 if (getuid() != 0) { 142 fprintf(stderr, "Please run as root.\r\n");146 fprintf(stderr, _("Please run as root.\n")); 143 147 exit(127); 144 148 } … … 148 152 && (!strcmp(argv[argc - 1], "-v") || !strcmp(argv[argc - 1], "-V") 149 153 || !strcmp(argv[argc - 1], "--version"))) { 150 printf( "mondoarchive v%s\nSee man page for help\n", PACKAGE_VERSION);154 printf(_("mondoarchive v%s\nSee man page for help\n"), PACKAGE_VERSION); 151 155 exit(0); 152 156 } … … 157 161 158 162 diffs = 0; 159 printf( "Initializing...\n");163 printf(_("Initializing...\n")); 160 164 if (!(bkpinfo = malloc(sizeof(struct s_bkpinfo)))) { 161 165 fatal_error("Cannot malloc bkpinfo"); … … 197 201 setup_newt_stuff(); 198 202 if (!strstr(argv[2], "filelist")) { 199 printf( "Sorry - filelist goes first\n");203 printf(_("Sorry - filelist goes first\n")); 200 204 finish(1); 201 205 } else { … … 226 230 setup_newt_stuff(); 227 231 if (!strstr(argv[2], "filelist")) { 228 printf( "Sorry - filelist goes first\n");232 printf(_("Sorry - filelist goes first\n")); 229 233 finish(1); 230 234 } else { … … 245 249 setup_newt_stuff(); 246 250 if ((tmp = find_cdrw_device()) == NULL) { 247 printf( "Failed to find CDR-RW drive\n");248 } else { 249 printf( "CD-RW is at %s\n", tmp);251 printf(_("Failed to find CDR-RW drive\n")); 252 } else { 253 printf(_("CD-RW is at %s\n"), tmp); 250 254 } 251 255 paranoid_free(tmp); 252 256 253 257 if ((tmp = find_cdrom_device(FALSE)) == NULL) { 254 printf( "Failed to find CD-ROM drive\n");255 } else { 256 printf( "CD-ROM is at %s\n", tmp);258 printf(_("Failed to find CD-ROM drive\n")); 259 } else { 260 printf(_("CD-ROM is at %s\n"), tmp); 257 261 } 258 262 paranoid_free(tmp); … … 265 269 setup_newt_stuff(); 266 270 if ((tmp = find_dvd_device()) == NULL) { 267 printf( "Failed to find DVD drive\n");268 } else { 269 printf( "DVD is at %s\n", tmp);271 printf(_("Failed to find DVD drive\n")); 272 } else { 273 printf(_("DVD is at %s\n"), tmp); 270 274 } 271 275 paranoid_free(tmp); … … 279 283 if (argc > 2 && !strcmp(argv[1], "test-dev")) { 280 284 if (is_dev_an_NTFS_dev(argv[2])) { 281 printf( "%s is indeed an NTFS dev\n", argv[2]);282 } else { 283 printf( "%s is _not_ an NTFS dev\n", argv[2]);285 printf(_("%s is indeed an NTFS dev\n"), argv[2]); 286 } else { 287 printf(_("%s is _not_ an NTFS dev\n"), argv[2]); 284 288 } 285 289 finish(0); … … 304 308 if (res) { 305 309 printf 306 ( "Errors were detected in the command line you supplied.\n");307 printf( "Please review the log file - " MONDO_LOGFILE "\n");310 (_("Errors were detected in the command line you supplied.\n")); 311 printf(_("Please review the log file - %s \n"),MONDO_LOGFILE); 308 312 log_msg(1, "Mondoarchive will now exit."); 309 313 finish(1); … … 319 323 320 324 log_to_screen 321 ( "BusyBox's sources are available from http://www.busybox.net");325 (_("BusyBox's sources are available from http://www.busybox.net")); 322 326 323 327 /* If we're meant to backup then backup */ … … 327 331 if (res) { 328 332 asprintf(&say_at_end, 329 "Data archived. Please check the logs, just as a precaution. ");330 } else { 331 asprintf(&say_at_end, "Data archived OK. ");333 _("Data archived. Please check the logs, just as a precaution. ")); 334 } else { 335 asprintf(&say_at_end, _("Data archived OK. ")); 332 336 } 333 337 } … … 337 341 res = verify_data(bkpinfo); 338 342 if (res < 0) { 339 asprintf(&say_at_end, "%d difference%c found.", -res,343 asprintf(&say_at_end, _("%d difference%c found."), -res, 340 344 (-res != 1) ? 's' : ' '); 341 345 res = 0; … … 353 357 if (retval == 0) { 354 358 mvaddstr_and_log_it(g_currentY++, 0, 355 "Backup and/or verify ran to completion. Everything appears to be fine.");359 _("Backup and/or verify ran to completion. Everything appears to be fine.")); 356 360 } else { 357 361 mvaddstr_and_log_it(g_currentY++, 0, 358 "Backup and/or verify ran to completion. However, errors did occur.");362 _("Backup and/or verify ran to completion. However, errors did occur.")); 359 363 } 360 364 361 365 if (does_file_exist("/root/images/mindi/mondorescue.iso")) { 362 366 log_to_screen 363 ( "/root/images/mindi/mondorescue.iso, a boot/utility CD, is available if you want it.");367 (_("/root/images/mindi/mondorescue.iso, a boot/utility CD, is available if you want it.")); 364 368 } 365 369 … … 368 372 if (g_text_mode) { 369 373 log_to_screen 370 ( "Type 'less /tmp/changed.files' to see which files don't match the archives");374 (_("Type 'less /tmp/changed.files' to see which files don't match the archives")); 371 375 } else { 372 376 log_msg(1, 373 "Type 'less /tmp/changed.files' to see which files don't match the archives");377 _("Type 'less /tmp/changed.files' to see which files don't match the archives")); 374 378 log_msg(2, "Calling popup_changelist_from_file()"); 375 379 popup_changelist_from_file("/tmp/changed.files"); … … 395 399 system("rm -Rf /tmp.mondo.* /mondo.scratch.*"); 396 400 if (retval == 0) { 397 printf( "Mondoarchive ran OK.\n");401 printf(_("Mondoarchive ran OK.\n")); 398 402 } else { 399 printf( "Errors occurred during backup. Please check logfile.\n");403 printf(_("Errors occurred during backup. Please check logfile.\n")); 400 404 } 401 405 distro_specific_kludges_at_end_of_mondoarchive(); … … 414 418 if (!g_text_mode) { 415 419 popup_and_OK 416 ( "Mondo Archive has finished its run. Please press ENTER to return to the shell prompt.");417 log_to_screen( "See %s for details of backup run.", MONDO_LOGFILE);420 (_("Mondo Archive has finished its run. Please press ENTER to return to the shell prompt.")); 421 log_to_screen(_("See %s for details of backup run."), MONDO_LOGFILE); 418 422 finish(retval); 419 423 } else { 420 printf( "See %s for details of backup run.\n", MONDO_LOGFILE);424 printf(_("See %s for details of backup run.\n"), MONDO_LOGFILE); 421 425 exit(retval); 422 426 } -
trunk/mondo/mondo/mondoarchive/mondo-cli.c
r489 r507 236 236 if (i == 0) { 237 237 retval++; 238 log_to_screen( "You must specify the media type\n");238 log_to_screen(_("You must specify the media type\n")); 239 239 } 240 240 if (i > 1) { 241 241 retval++; 242 log_to_screen( "Please specify only one media type\n");242 log_to_screen(_("Please specify only one media type\n")); 243 243 } 244 244 if (flag_set['K']) { … … 250 250 if (flag_set['L'] && flag_set['0']) { 251 251 retval++; 252 log_to_screen( "You cannot have 'no compression' _and_ LZOP.\n");252 log_to_screen(_("You cannot have 'no compression' _and_ LZOP.\n")); 253 253 } 254 254 bkpinfo->backup_data = flag_set['O']; 255 255 bkpinfo->verify_data = flag_set['V']; 256 256 if (flag_set['I'] && !bkpinfo->backup_data) { 257 log_to_screen( "-I switch is ignored if just verifying");257 log_to_screen(_("-I switch is ignored if just verifying")); 258 258 } 259 259 if (flag_set['E'] && !bkpinfo->backup_data) { 260 log_to_screen( "-E switch is ignored if just verifying");260 log_to_screen(_("-E switch is ignored if just verifying")); 261 261 } 262 262 … … 286 286 if (flag_set['f'] || flag_set['l']) { 287 287 log_to_screen 288 ( "You don't need to specify bootloader or bootdevice");288 (_("You don't need to specify bootloader or bootdevice")); 289 289 } 290 290 } … … 331 331 if (bkpinfo->include_paths[0] == '-') { 332 332 retval++; 333 log_to_screen( "Please supply a sensible value with '-I'\n");333 log_to_screen(_("Please supply a sensible value with '-I'\n")); 334 334 } 335 335 } … … 346 346 retval++; 347 347 log_to_screen 348 ( "Please do not use -J in combination with -I. If you want to make a list of files to backup, that's fine, use -J <filename> but please don't muddy the waters by combining -J with -I. Thanks. :-)");348 (_("Please do not use -J in combination with -I. If you want to make a list of files to backup, that's fine, use -J <filename> but please don't combine -J with -I. Thanks. :-)")); 349 349 } 350 350 bkpinfo->make_filelist = FALSE; … … 364 364 if (g_kernel_version >= 2.6 && !strstr(flag_val['d'], "/dev/")) { 365 365 log_to_screen 366 ( "Linus says 2.6 has a broken ide-scsi module. Proceed at your own risk...");366 (_("Linus says 2.6 has a broken ide-scsi module. Proceed at your own risk...")); 367 367 } 368 368 … … 380 380 if (!flag_set['L']) { 381 381 log_to_screen 382 ( "You must use -L with -C. Therefore I am setting it for you.");382 (_("You must use -L with -C. Therefore I am setting it for you.")); 383 383 flag_set['L'] = 1; 384 384 flag_val['L'] = NULL; … … 411 411 412 412 asprintf(&tmp, 413 "You didn't specify a tape streamer device. I'm assuming %s",413 _("You didn't specify a tape streamer device. I'm assuming %s"), 414 414 flag_val['d']); 415 415 log_to_screen(tmp); … … 427 427 if ((flag_val['d'] = find_dvd_device()) != NULL) { 428 428 flag_set['d'] = TRUE; 429 log_to_screen( "I guess DVD drive is at %s", flag_val['d']);429 log_to_screen(_("I guess DVD drive is at %s"), flag_val['d']); 430 430 } 431 431 } … … 445 445 asprintf(&flag_val['s'], "%dm", DEFAULT_DVD_DISK_SIZE); // 4.7 salesman's GB = 4.482 real GB = 4582 MB 446 446 log_to_screen 447 ( "You did not specify a size (-s) for DVD. I'm guessing %s.",447 (_("You did not specify a size (-s) for DVD. I'm guessing %s."), 448 448 flag_val['s']); 449 449 flag_set['s'] = 1; … … 499 499 if (strlen(bkpinfo->isodir) < 3) { 500 500 retval++; 501 log_to_screen( "NFS share is not mounted. Please mount it.\n");501 log_to_screen(_("NFS share is not mounted. Please mount it.\n")); 502 502 } 503 503 log_msg(3, "mount = %s", bkpinfo->nfs_mount); … … 627 627 retval++; 628 628 asprintf(&tmp, 629 "You specified kernel '%s', which does not exist\n",629 _("You specified kernel '%s', which does not exist\n"), 630 630 bkpinfo->kernel_path); 631 631 log_to_screen(tmp); … … 669 669 paranoid_free(tmp); 670 670 asprintf(&tmp, 671 "Are you sure directory '%s' exists in remote dir '%s'?\nIf so, do you have rights to write to it?\n",671 _("Are you sure directory '%s' exists in remote dir '%s'?\nIf so, do you have rights to write to it?\n"), 672 672 bkpinfo->nfs_remote_dir, bkpinfo->nfs_mount); 673 673 log_to_screen(tmp); … … 680 680 if (g_kernel_version >= 2.6) { 681 681 if (popup_and_get_string 682 ( "Device", "Please specify the device",682 (_("Device"), _("Please specify the device"), 683 683 bkpinfo->media_device, MAX_STR_LEN / 4)) { 684 684 retval++; 685 log_to_screen( "User opted to cancel.");685 log_to_screen(_("User opted to cancel.")); 686 686 } 687 687 } else if ((tmp = find_cdrw_device()) == NULL) { … … 690 690 retval++; 691 691 log_to_screen 692 ( "Tried and failed to find CD-R[W] drive automatically.\n");692 (_("Tried and failed to find CD-R[W] drive automatically.\n")); 693 693 } else { 694 694 flag_set['d'] = TRUE; … … 699 699 if (!flag_set['d'] && !flag_set['n'] && !flag_set['C']) { 700 700 retval++; 701 log_to_screen( "Please specify the backup device/directory.\n");701 log_to_screen(_("Please specify the backup device/directory.\n")); 702 702 fatal_error 703 703 ("You didn't use -d to specify the backup device/directory."); … … 722 722 retval++; 723 723 log_to_screen 724 ( "Please specify a tempdir which I can write to. :)");724 (_("Please specify a tempdir which I can write to. :)")); 725 725 fatal_error("I cannot write to the tempdir you specified."); 726 726 } … … 732 732 retval++; 733 733 log_to_screen 734 ( "Please don't specify a SAMBA or VFAT or NFS tmpdir.");734 (_("Please don't specify a SAMBA or VFAT or NFS tmpdir.")); 735 735 fatal_error("I cannot write to the tempdir you specified."); 736 736 } … … 782 782 i = which_boot_loader(tmp); 783 783 log_msg(3, "boot loader is %c, residing at %s", i, tmp); 784 printf( "boot loader is %c, residing at %s\n", i, tmp);784 printf(_("boot loader is %c, residing at %s\n"), i, tmp); 785 785 finish(0); 786 786 } … … 796 796 retval++; 797 797 log_to_screen 798 ( "Please install LZOP. You can't use '-L' until you do.\n");798 (_("Please install LZOP. You can't use '-L' until you do.\n")); 799 799 } 800 800 } … … 806 806 bkpinfo->make_cd_use_lilo = TRUE; 807 807 log_to_screen 808 ( "Forcing you to use LILO. SuSE 9.0 (64-bit) has a broken mkfs.vfat binary.");808 (_("Forcing you to use LILO. SuSE 9.0 (64-bit) has a broken mkfs.vfat binary.")); 809 809 } 810 810 if (flag_set['o']) { … … 816 816 bkpinfo->make_cd_use_lilo = TRUE; 817 817 log_to_screen 818 ( "Your kernel appears not to support vfat filesystems. I am therefore");819 log_to_screen 820 ( "using LILO instead of SYSLINUX as the CD/floppy's boot loader.");818 (_("Your kernel appears not to support vfat filesystems. I am therefore")); 819 log_to_screen 820 (_("using LILO instead of SYSLINUX as the CD/floppy's boot loader.")); 821 821 } 822 822 if (run_program_and_log_output("which mkfs.vfat", FALSE)) { … … 824 824 #ifdef __IA32__ 825 825 log_to_screen 826 ( "Your filesystem is missing 'mkfs.vfat', so I cannot use SYSLINUX as");827 log_to_screen 828 ( "your boot loader. I shall therefore use LILO instead.");826 (_("Your filesystem is missing 'mkfs.vfat', so I cannot use SYSLINUX as")); 827 log_to_screen 828 (_("your boot loader. I shall therefore use LILO instead.")); 829 829 #endif 830 830 #ifdef __IA64__ 831 831 log_to_screen 832 ( "Your filesystem is missing 'mkfs.vfat', so I cannot prepare the EFI");833 log_to_screen( "environment correctly. Please install it.");832 (_("Your filesystem is missing 'mkfs.vfat', so I cannot prepare the EFI")); 833 log_to_screen(_("environment correctly. Please install it.")); 834 834 fatal_error("Aborting"); 835 835 #endif … … 849 849 if (i == 0) { 850 850 retval++; 851 log_to_screen( "Specify backup (-O), verify (-V) or both (-OV).\n");851 log_to_screen(_("Specify backup (-O), verify (-V) or both (-OV).\n")); 852 852 } 853 853 … … 901 901 if (flag_set[optopt]) { 902 902 bad_switches = TRUE; 903 asprintf(&tmp, "Switch -%c previously defined as %s\n", opt,903 asprintf(&tmp, _("Switch -%c previously defined as %s\n"), opt, 904 904 flag_val[i]); 905 905 log_to_screen(tmp); … … 912 912 optarg[--len] = '\0'; 913 913 log_to_screen 914 ( "Warning - param '%s' should not have trailing slash!",914 (_("Warning - param '%s' should not have trailing slash!"), 915 915 optarg); 916 916 } … … 919 919 && flag_val[opt][0] != '/') { 920 920 asprintf(&tmp, 921 "-%c flag --- must be absolute path --- '%s' isn't absolute",921 _("-%c flag --- must be absolute path --- '%s' isn't absolute"), 922 922 opt, flag_val[opt]); 923 923 log_to_screen(tmp); … … 933 933 for (i = optind; i < argc; i++) { 934 934 bad_switches = TRUE; 935 asprintf(&tmp, "Invalid arg -- %s\n", argv[i]);935 asprintf(&tmp, _("Invalid arg -- %s\n"), argv[i]); 936 936 log_to_screen(tmp); 937 937 paranoid_free(tmp); … … 964 964 switch (sig) { 965 965 case SIGINT: 966 asprintf(&tmp, "SIGINT signal received from OS");967 asprintf(&tmp2, "You interrupted me :-)");966 asprintf(&tmp, _("SIGINT signal received from OS")); 967 asprintf(&tmp2, _("You interrupted me :-)")); 968 968 break; 969 969 case SIGKILL: 970 asprintf(&tmp, "SIGKILL signal received from OS");970 asprintf(&tmp, _("SIGKILL signal received from OS")); 971 971 asprintf(&tmp2, 972 "I seriously have no clue how this signal even got to me. Something's wrong with your system.");972 _("I seriously have no clue how this signal even got to me. Something's wrong with your system.")); 973 973 break; 974 974 case SIGTERM: 975 asprintf(&tmp, "SIGTERM signal received from OS");976 asprintf(&tmp2, "Got terminate signal");975 asprintf(&tmp, _("SIGTERM signal received from OS")); 976 asprintf(&tmp2, _("Got terminate signal")); 977 977 break; 978 978 case SIGHUP: 979 asprintf(&tmp, "SIGHUP signal received from OS");980 asprintf(&tmp2, "Hangup on line");979 asprintf(&tmp, _("SIGHUP signal received from OS")); 980 asprintf(&tmp2, _("Hangup on line")); 981 981 break; 982 982 case SIGSEGV: 983 asprintf(&tmp, "SIGSEGV signal received from OS");983 asprintf(&tmp, _("SIGSEGV signal received from OS")); 984 984 asprintf(&tmp2, 985 "Internal programming error. Please send a backtrace as well as your log.");985 _("Internal programming error. Please send a backtrace as well as your log.")); 986 986 break; 987 987 case SIGPIPE: 988 asprintf(&tmp, "SIGPIPE signal received from OS");989 asprintf(&tmp2, "Pipe was broken");988 asprintf(&tmp, _("SIGPIPE signal received from OS")); 989 asprintf(&tmp2, _("Pipe was broken")); 990 990 break; 991 991 case SIGABRT: 992 asprintf(&tmp, "SIGABRT signal received from OS");992 asprintf(&tmp, _("SIGABRT signal received from OS")); 993 993 asprintf(&tmp2, 994 "Abort - probably failed assertion. I'm sleeping for a few seconds so you can read the message.");994 _("Abort - probably failed assertion. I'm sleeping for a few seconds so you can read the message.")); 995 995 break; 996 996 default: 997 asprintf(&tmp, "(Unknown)");998 asprintf(&tmp2, "(Unknown)");997 asprintf(&tmp, _("(Unknown)")); 998 asprintf(&tmp2, _("(Unknown)")); 999 999 } 1000 1000 -
trunk/mondo/mondo/mondorestore/mondo-prep.c
r197 r507 239 239 // zero & reboot 240 240 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.")); 242 242 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")); 244 244 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.")); 246 246 log_to_screen("Please hit 'Enter' to reboot."); 247 247 for (lino = 0; lino < drivelist->entries; lino++) { … … 269 269 system("sync"); 270 270 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.")); 272 272 system("reboot"); 273 273 } … … 615 615 #ifdef __FreeBSD__ 616 616 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.")); 618 618 return (1); 619 619 #endif … … 624 624 if (!does_file_exist("/etc/raidtab")) { 625 625 log_to_screen 626 ( "Cannot find /etc/raidtab - cannot extrapolate the fdisk entries");626 (_("Cannot find /etc/raidtab - cannot extrapolate the fdisk entries")); 627 627 finish(1); 628 628 } … … 749 749 } 750 750 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); 752 752 log_to_screen(tmp); 753 753 paranoid_free(program); … … 761 761 if (!does_file_exist("/tmp/raidconf.txt")) { 762 762 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.")); 764 764 } else { 765 765 int res; … … 769 769 if (res) { 770 770 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.")); 772 772 finish(1); 773 773 } … … 780 780 char line[MAX_STR_LEN]; 781 781 sprintf(tmp, 782 "Initializing Vinum device %s (this may take a *long* time)",782 _("Initializing Vinum device %s (this may take a *long* time)"), 783 783 device); 784 784 log_to_screen(tmp); … … 823 823 } 824 824 #else 825 sprintf(tmp, "Initializing RAID device %s", device);825 sprintf(tmp, _("Initializing RAID device %s"), device); 826 826 log_to_screen(tmp); 827 827 828 828 // Shouldn't be necessary. 829 log_to_screen( "Stopping %s", device);829 log_to_screen(_("Stopping %s"), device); 830 830 stop_raid_device(device); 831 831 system("sync"); … … 900 900 retval += res; 901 901 if (retval) { 902 strcat(tmp, "...failed");902 strcat(tmp, _("...failed")); 903 903 } else { 904 strcat(tmp, "...OK");904 strcat(tmp, _("...OK")); 905 905 } 906 906 … … 951 951 (interactively) ? "true" : "false"); 952 952 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."), "", 957 957 mountlist->entries + 1); 958 958 … … 1001 1001 if (does_file_exist("/tmp/i-want-my-lvm")) { 1002 1002 wait_until_software_raids_are_prepped("/proc/mdstat", 10); 1003 log_to_screen( "Configuring LVM");1003 log_to_screen(_("Configuring LVM")); 1004 1004 if (!g_text_mode) { 1005 1005 newtSuspend(); … … 1092 1092 1093 1093 if (retval) { 1094 mvaddstr_and_log_it(g_currentY++, 74, "Failed.");1094 mvaddstr_and_log_it(g_currentY++, 74, _("Failed.")); 1095 1095 log_to_screen 1096 ( "Errors occurred during the formatting of your hard drives.");1096 (_("Errors occurred during the formatting of your hard drives.")); 1097 1097 } else { 1098 mvaddstr_and_log_it(g_currentY++, 74, "Done.");1098 mvaddstr_and_log_it(g_currentY++, 74, _("Done.")); 1099 1099 } 1100 1100 … … 1107 1107 //123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 1108 1108 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"), 1110 1110 g_partition_table_locked_up); 1111 1111 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")); 1113 1113 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 ")); 1115 1115 log_to_screen 1116 ( "partition table. I believe this has just happened.");1116 (_("partition table. I believe this has just happened.")); 1117 1117 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."))) 1119 1119 { 1120 1120 system("sync"); … … 1125 1125 } else { 1126 1126 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."), 1128 1128 g_partition_table_locked_up, 1129 1129 (g_partition_table_locked_up == 1) ? '.' : 's'); … … 1528 1528 pout_to_fdisk = popen(tmp, "w"); 1529 1529 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); 1531 1531 paranoid_free(device_str); 1532 1532 paranoid_free(format); … … 1564 1564 if (system(command)) { 1565 1565 log_to_screen 1566 ( "Warning! Unable to make the drive bootable.");1566 (_("Warning! Unable to make the drive bootable.")); 1567 1567 } 1568 1568 paranoid_free(device_str); … … 1614 1614 if (!file) { 1615 1615 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"), 1617 1617 drivename); 1618 1618 log_to_screen(tmp); … … 1621 1621 for (i = 0; i < 512; i++) { 1622 1622 if (!write(file, "\0", 1)) { 1623 sprintf(tmp, "Warning - unable to write to %s",1623 sprintf(tmp, _("Warning - unable to write to %s"), 1624 1624 drivename); 1625 1625 log_to_screen(tmp); … … 1655 1655 if (current_devno == 5 && previous_devno == 4) { 1656 1656 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.")); 1658 1658 paranoid_free(device_str); 1659 1659 paranoid_free(format); … … 1672 1672 if (system(tmp)) { 1673 1673 log_to_screen 1674 ( "Warning! Unable to make the slice bootable.");1674 (_("Warning! Unable to make the slice bootable.")); 1675 1675 } 1676 1676 } … … 1700 1700 g_partition_table_locked_up++; 1701 1701 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.")); 1703 1703 } 1704 1704 } … … 1773 1773 1774 1774 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"), 1776 1776 partition_name); 1777 1777 log_to_screen(tmp); … … 1810 1810 if (prev_partno >= 4) { 1811 1811 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'")); 1813 1813 paranoid_free(program); 1814 1814 paranoid_free(partition_name); … … 2001 2001 */ 2002 2002 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."), "", 2006 2006 mountlist->entries); 2007 2007 … … 2015 2015 close_progress_form(); 2016 2016 if (retval) { 2017 mvaddstr_and_log_it(g_currentY++, 74, "Failed.");2017 mvaddstr_and_log_it(g_currentY++, 74, _("Failed.")); 2018 2018 log_to_screen 2019 ( "Errors occurred during the partitioning of your hard drives.");2019 (_("Errors occurred during the partitioning of your hard drives.")); 2020 2020 } else { 2021 mvaddstr_and_log_it(g_currentY++, 74, "Done.");2021 mvaddstr_and_log_it(g_currentY++, 74, _("Done.")); 2022 2022 paranoid_system("rm -f /tmp/fdisk*.log 2> /dev/null"); 2023 2023 } … … 2531 2531 return; 2532 2532 } 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, 2534 2534 current_size_of_drive); 2535 2535 log_to_screen(tmp); … … 2550 2550 2551 2551 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."), 2553 2553 drive_name); 2554 2554 log_to_screen(tmp); … … 2580 2580 newsizL = (long) new_size; 2581 2581 } 2582 sprintf(tmp, "Changing %s from %lld KB to %ld KB",2582 sprintf(tmp, _("Changing %s from %lld KB to %ld KB"), 2583 2583 drivemntlist->el[partno]->device, 2584 2584 drivemntlist->el[partno]->size, newsizL); … … 2587 2587 } 2588 2588 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); 2590 2590 log_to_screen(tmp); 2591 2591 paranoid_free(tmp); … … 2628 2628 device); 2629 2629 } 2630 log_to_screen( "Mountlist adjusted to suit current hard drive(s)");2630 log_to_screen(_("Mountlist adjusted to suit current hard drive(s)")); 2631 2631 paranoid_free(drivelist); 2632 2632 } -
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); -
trunk/mondo/mondo/mondorestore/mondo-rstr-compare.c
r278 r507 137 137 if (!(fin = fopen(slice_fname(bigfileno, 0, ARCHIVES_PATH, ""), "r"))) { 138 138 sprintf(tmp_ptr, 139 "Cannot open bigfile %ld (%s)'s info file",139 _("Cannot open bigfile %ld (%s)'s info file"), 140 140 bigfileno + 1, bigfile_fname_ptr); 141 141 log_to_screen(tmp_ptr); … … 151 151 log_msg(2, "biggiestruct.checksum = %s", biggiestruct.checksum); 152 152 153 sprintf(tmp_ptr, "Comparing %s", bigfile_fname_ptr);153 sprintf(tmp_ptr, _("Comparing %s"), bigfile_fname_ptr); 154 154 155 155 if (!g_text_mode) { … … 255 255 mvaddstr_and_log_it(g_currentY, 0, 256 256 "Comparing large files "); 257 open_progress_form( "Comparing large files",258 "I am now comparing the large files",259 "against the filesystem. Please wait.", "",257 open_progress_form(_("Comparing large files"), 258 _("I am now comparing the large files"), 259 _("against the filesystem. Please wait."), "", 260 260 noof_biggiefiles); 261 261 for (bigfileno = 0; bigfileno < noof_biggiefiles; bigfileno++) { … … 434 434 435 435 max_val = atol(tmp); 436 sprintf(progress_str, "Comparing with %s #%d ",436 sprintf(progress_str, _("Comparing with %s #%d "), 437 437 media_descriptor_string(bkpinfo->backup_media_type), 438 438 g_current_media_number); 439 439 440 open_progress_form( "Comparing files",441 "Comparing tarballs against filesystem.",442 "Please wait. This may take some time.",440 open_progress_form(_("Comparing files"), 441 _("Comparing tarballs against filesystem."), 442 _("Please wait. This may take some time."), 443 443 progress_str, max_val); 444 444 … … 477 477 log_msg(2, "OK, I think it's time for another CD..."); 478 478 g_current_media_number++; 479 sprintf(progress_str, "Comparing with %s #%d ",479 sprintf(progress_str, _("Comparing with %s #%d "), 480 480 media_descriptor_string(bkpinfo->backup_media_type), 481 481 g_current_media_number); … … 543 543 noof_changed_files = count_lines_in_file("/tmp/changed.txt"); 544 544 if (noof_changed_files) { 545 sprintf(tmp, "%ld files do not match the backup ",545 sprintf(tmp, _("%ld files do not match the backup "), 546 546 noof_changed_files); 547 547 // mvaddstr_and_log_it( g_currentY++, 0, tmp ); … … 550 550 paranoid_system(command); 551 551 } else { 552 sprintf(tmp, "All files match the backup ");552 sprintf(tmp, _("All files match the backup ")); 553 553 mvaddstr_and_log_it(g_currentY++, 0, tmp); 554 554 log_to_screen(tmp); … … 600 600 while (get_cfg_file_from_archive(bkpinfo)) { 601 601 if (!ask_me_yes_or_no 602 ( "Failed to find config file/archives. Choose another source?"))602 (_("Failed to find config file/archives. Choose another source?"))) 603 603 { 604 604 fatal_error("Unable to find config file/archives. Aborting."); … … 641 641 "...but they were logfiles and temporary files. Your archives are fine."); 642 642 log_to_screen 643 ( "The differences were logfiles and temporary files. Your archives are fine.");643 (_("The differences were logfiles and temporary files. Your archives are fine.")); 644 644 } else { 645 645 q = count_lines_in_file("/tmp/changed.files"); 646 sprintf(tmp, "%ld significant difference%s found.", q,646 sprintf(tmp, _("%ld significant difference%s found."), q, 647 647 (q != 1) ? "s" : ""); 648 648 mvaddstr_and_log_it(g_currentY++, 0, tmp); … … 650 650 651 651 strcpy(tmp, 652 "Type 'less /tmp/changed.files' for a list of non-matching files");652 _("Type 'less /tmp/changed.files' for a list of non-matching files")); 653 653 mvaddstr_and_log_it(g_currentY++, 0, tmp); 654 654 log_to_screen(tmp); … … 660 660 } else { 661 661 log_to_screen 662 ( "No significant differences were found. Your backup is perfect.");662 (_("No significant differences were found. Your backup is perfect.")); 663 663 } 664 664 kill_petris(); -
trunk/mondo/mondo/mondorestore/mondo-rstr-newt.c
r274 r507 82 82 83 83 newtPushHelpLine 84 ( " Add one of the following unallocated RAID partitions to this RAID device.");85 asprintf(&tmp, "%-26s %s", "Device", "Size");84 (_(" Add one of the following unallocated RAID partitions to this RAID device.")); 85 asprintf(&tmp, "%-26s %s", _("Device"), _("Size")); 86 86 headerMsg = newtLabel(1, 1, tmp); 87 87 paranoid_free(tmp); … … 92 92 partitionsListbox); 93 93 i = 7; 94 bOK = newtCompactButton(i, 9, " OK ");95 bCancel = newtCompactButton(i += 9, 9, "Cancel");96 newtOpenWindow(22, 6, 36, 10, "Unallocated RAID partitions");94 bOK = newtCompactButton(i, 9, _(" OK ")); 95 bCancel = newtCompactButton(i += 9, 9, _("Cancel")); 96 newtOpenWindow(22, 6, 36, 10, _("Unallocated RAID partitions")); 97 97 myForm = newtForm(NULL, NULL, 0); 98 98 newtFormAddComponents(myForm, headerMsg, partitionsListbox, bOK, … … 182 182 asprintf(&format_str, "ext2"); 183 183 #endif 184 newtOpenWindow(20, 5, 48, 10, "Add entry");185 label0 = newtLabel(2, 1, "Device: ");186 label1 = newtLabel(2, 2, "Mountpoint:");187 label2 = newtLabel(2, 3, "Size (MB): ");188 label3 = newtLabel(2, 4, "Format: ");184 newtOpenWindow(20, 5, 48, 10, _("Add entry")); 185 label0 = newtLabel(2, 1, _("Device: ")); 186 label1 = newtLabel(2, 2, _("Mountpoint:")); 187 label2 = newtLabel(2, 3, _("Size (MB): ")); 188 label3 = newtLabel(2, 4, _("Format: ")); 189 189 deviceComp = 190 190 newtEntry(14, 1, device_str, 30, (void *) &device_here, 0); … … 195 195 newtEntry(14, 4, format_str, 15, (void *) &format_here, 0); 196 196 sizeComp = newtEntry(14, 3, size_str, 10, (void *) &size_here, 0); 197 bOK = newtButton(5, 6, " OK ");198 bCancel = newtButton(17, 6, "Cancel");197 bOK = newtButton(5, 6, _(" OK ")); 198 bCancel = newtButton(17, 6, _("Cancel")); 199 199 newtPushHelpLine 200 ( "To add an entry to the mountlist, please fill in these fields and then hit 'OK'");200 (_("To add an entry to the mountlist, please fill in these fields and then hit 'OK'")); 201 201 myForm = newtForm(NULL, NULL, 0); 202 202 newtFormAddComponents(myForm, deviceComp, mountpointComp, sizeComp, … … 224 224 if (b_res == bOK) { 225 225 if (device_str[strlen(device_str) - 1] == '/') { 226 popup_and_OK( "You left the device nearly blank!");226 popup_and_OK(_("You left the device nearly blank!")); 227 227 b_res = NULL; 228 228 } 229 229 if (size_of_specific_device_in_mountlist(mountlist, device_str) 230 230 >= 0) { 231 popup_and_OK( "Can't add this - you've got one already!");231 popup_and_OK(_("Can't add this - you've got one already!")); 232 232 b_res = NULL; 233 233 } … … 286 286 287 287 if (popup_and_get_string 288 ("Add variable", "Enter the name of the variable to add", sz_out,288 ("Add variable", _("Enter the name of the variable to add"), sz_out, 289 289 MAX_STR_LEN)) { 290 290 strip_spaces(sz_out); … … 295 295 if (i < items) { 296 296 popup_and_OK 297 ( "No need to add that variable. It is already listed here.");297 (_("No need to add that variable. It is already listed here.")); 298 298 } else { 299 299 strcpy(raidrec->additional_vars.el[items].label, sz_out); … … 500 500 501 501 asprintf(&prompt, 502 "Please enter the RAID level you want. (concat, striped, raid5)");502 _("Please enter the RAID level you want. (concat, striped, raid5)")); 503 503 if (raidrec->raidlevel == -1) { 504 504 asprintf(&tmp, "concat"); … … 556 556 strcpy(personalities, 557 557 last_line_of_file("/tmp/raid-personalities.txt")); 558 asprintf(&prompt, "Please enter the RAID level you want. %s",558 asprintf(&prompt, _("Please enter the RAID level you want. %s"), 559 559 personalities); 560 560 if (raidrec->raid_level == -1) { … … 566 566 out != -1 && out != 0 && out != 1 && out != 4 && out != 5 567 567 && out != 10;) { 568 res = popup_and_get_string( "Specify RAID level", prompt, tmp, 10);568 res = popup_and_get_string(_("Specify RAID level"), prompt, tmp, 10); 569 569 if (!res) { 570 570 return; … … 591 591 } else { 592 592 if (ask_me_yes_or_no 593 ( "You have chosen a RAID personality which is not registered with the kernel. Make another selection?"))593 (_("You have chosen a RAID personality which is not registered with the kernel. Make another selection?"))) 594 594 { 595 595 out = 999; … … 670 670 assert_string_is_neither_NULL_nor_zerolength(raid_device); 671 671 672 asprintf(&tmp, "Delete %s from RAID device %s - are you sure?",672 asprintf(&tmp, _("Delete %s from RAID device %s - are you sure?"), 673 673 disklist->el[currline].device, raid_device); 674 674 if (!ask_me_yes_or_no(tmp)) { … … 718 718 device); 719 719 if (pos >= 0) { 720 asprintf(&tmp, "Cannot delete %s: it is in use by RAID device %s",720 asprintf(&tmp, _("Cannot delete %s: it is in use by RAID device %s"), 721 721 mountlist->el[currline].device, 722 722 raidlist->el[pos].OSSWAP(raid_device, volname)); … … 725 725 return; 726 726 } 727 asprintf(&tmp, "Delete %s - are you sure?",727 asprintf(&tmp, _("Delete %s - are you sure?"), 728 728 mountlist->el[currline].device); 729 729 if (!ask_me_yes_or_no(tmp)) { … … 785 785 return; 786 786 } 787 asprintf(&tmp, "Do you want me to delete %s's partitions, too?", device);787 asprintf(&tmp, _("Do you want me to delete %s's partitions, too?", device)); 788 788 delete_partitions_too = ask_me_yes_or_no(tmp); 789 789 if (delete_partitions_too) { … … 854 854 855 855 av = &raidrec->additional_vars; 856 asprintf(&tmp, "Delete %s - are you sure?", av->el[lino].label);856 asprintf(&tmp, _("Delete %s - are you sure?", av->el[lino].label)); 857 857 if (ask_me_yes_or_no(tmp)) { 858 858 if (!strcmp(av->el[lino].label, "persistent-superblock") 859 859 || !strcmp(av->el[lino].label, "chunk-size")) { 860 860 paranoid_free(tmp); 861 asprintf(&tmp, "%s must not be deleted. It would be bad.",861 asprintf(&tmp, _("%s must not be deleted. It would be bad."), 862 862 av->el[lino].label); 863 863 popup_and_OK(tmp); … … 927 927 warned_already = TRUE; 928 928 asprintf(&tmp, 929 "Too many lines. Displaying first %d entries only. Close a directory to see more.",929 _("Too many lines. Displaying first %d entries only. Close a directory to see more."), 930 930 ARBITRARY_MAXIMUM); 931 931 popup_and_OK(tmp); … … 1072 1072 assert(filelist != NULL); 1073 1073 1074 log_to_screen( "Editing filelist");1074 log_to_screen(_("Editing filelist")); 1075 1075 newtPushHelpLine 1076 ( " Please edit the filelist to your satisfaction, then click OK or Cancel.");1076 (_(" Please edit the filelist to your satisfaction, then click OK or Cancel.")); 1077 1077 j = 4; 1078 bLess = newtCompactButton(j, 17, " Less ");1079 bMore = newtCompactButton(j += 12, 17, " More ");1080 bToggle = newtCompactButton(j += 12, 17, "Toggle");1081 bRegex = newtCompactButton(j += 12, 17, "RegEx");1082 bCancel = newtCompactButton(j += 12, 17, "Cancel");1083 bOK = newtCompactButton(j += 12, 17, " OK ");1078 bLess = newtCompactButton(j, 17, _(" Less ")); 1079 bMore = newtCompactButton(j += 12, 17, _(" More ")); 1080 bToggle = newtCompactButton(j += 12, 17, _("Toggle")); 1081 bRegex = newtCompactButton(j += 12, 17, _("RegEx")); 1082 bCancel = newtCompactButton(j += 12, 17, _("Cancel")); 1083 bOK = newtCompactButton(j += 12, 17, _(" OK ")); 1084 1084 filelistListbox = 1085 1085 newtListbox(2, 1, 15, NEWT_FLAG_SCROLL | NEWT_FLAG_RETURNEXIT); … … 1087 1087 lines_in_flist_window = 1088 1088 redraw_filelist(filelist, keylist, filelistListbox); 1089 newtOpenWindow(1, 3, 77, 18, "Editing filelist");1089 newtOpenWindow(1, 3, 77, 18, _("Editing filelist")); 1090 1090 myForm = newtForm(NULL, NULL, 0); 1091 1091 newtFormAddComponents(myForm, filelistListbox, bLess, bMore, bToggle, … … 1096 1096 finished = 1097 1097 ask_me_yes_or_no 1098 ( "Are you happy with your file selection?");1098 (_("Are you happy with your file selection?")); 1099 1099 } else if (b_res == bCancel) { 1100 1100 finished = TRUE; 1101 1101 } else if (b_res == bRegex) { 1102 popup_and_OK( "I haven't implemented this yet...");1102 popup_and_OK(_("I haven't implemented this yet...")); 1103 1103 } else { 1104 1104 curr_choice = newtListboxGetCurrent(filelistListbox); … … 1236 1236 sprintf(size_str, "%lld", mountlist->el[currline].size / 1024); 1237 1237 newtOpenWindow(20, 5, 48, 10, "Edit entry"); 1238 label0 = newtLabel(2, 1, "Device:");1239 label1 = newtLabel(2, 2, "Mountpoint:");1240 label2 = newtLabel(2, 3, "Size (MB): ");1241 label3 = newtLabel(2, 4, "Format: ");1238 label0 = newtLabel(2, 1, _("Device:")); 1239 label1 = newtLabel(2, 2, _("Mountpoint:")); 1240 label2 = newtLabel(2, 3, _("Size (MB): ")); 1241 label3 = newtLabel(2, 4, _("Format: ")); 1242 1242 deviceComp = 1243 1243 newtEntry(14, 1, device_str, 30, (void *) &device_here, 0); … … 1252 1252 sizeComp = newtEntry(14, 3, size_str, 10, (void *) &size_here, 0); 1253 1253 } 1254 bOK = newtButton(2, 6, " OK ");1255 bCancel = newtButton(14, 6, "Cancel");1254 bOK = newtButton(2, 6, _(" OK ")); 1255 bCancel = newtButton(14, 6, _("Cancel")); 1256 1256 if (strstr(mountlist->el[currline].device, RAID_DEVICE_STUB)) { 1257 1257 b_raid = newtButton(26, 6, "RAID.."); 1258 1258 } 1259 1259 newtPushHelpLine 1260 ( " Edit this partition's mountpoint, size and format; then click 'OK'.");1260 (_(" Edit this partition's mountpoint, size and format; then click 'OK'.")); 1261 1261 myForm = newtForm(NULL, NULL, 0); 1262 1262 newtFormAddComponents(myForm, deviceComp, mountpointComp, sizeComp, … … 1274 1274 && strstr(device_used_to_be, RAID_DEVICE_STUB) 1275 1275 && strcmp(device_str, device_used_to_be)) { 1276 popup_and_OK( "You can't change /dev/mdX to /dev/mdY.");1276 popup_and_OK(_("You can't change /dev/mdX to /dev/mdY.")); 1277 1277 b_res = NULL; 1278 1278 continue; 1279 1279 } else if (b_res == bOK && !strcmp(mountpoint_str, "image") 1280 1280 && strcmp(mountpt_used_to_be, "image")) { 1281 popup_and_OK( "You can't change a regular device to an image.");1281 popup_and_OK(_("You can't change a regular device to an image.")); 1282 1282 b_res = NULL; 1283 1283 continue; … … 1302 1302 */ 1303 1303 popup_and_OK 1304 ( "You cannot edit the RAID settings until you have OK'd your change to the device node.");1304 (_("You cannot edit the RAID settings until you have OK'd your change to the device node.")); 1305 1305 } else { 1306 1306 j = find_raid_device_in_raidlist(raidlist, … … 1309 1309 if (j < 0) { 1310 1310 sprintf(tmp, 1311 "/etc/raidtab does not have an entry for %s; please delete it and add it again",1311 _("/etc/raidtab does not have an entry for %s; please delete it and add it again"), 1312 1312 mountlist->el[currline].device); 1313 1313 popup_and_OK(tmp); 1314 1314 } else { 1315 log_it( "edit_raidlist_entry - calling");1315 log_it(_("edit_raidlist_entry - calling")); 1316 1316 edit_raidlist_entry(mountlist, raidlist, 1317 1317 &raidlist->el[j], currline); … … 1363 1363 else if (strcmp(device_used_to_be, device_str)) { 1364 1364 popup_and_OK 1365 ( "You are renaming a RAID device as another RAID device. I don't like it but I'll allow it.");1365 (_("You are renaming a RAID device as another RAID device. I don't like it but I'll allow it.")); 1366 1366 } 1367 1367 #endif … … 1473 1473 int currline2 = 0; 1474 1474 1475 log_it( "Started edit_raidlist_entry");1475 log_it(_("Started edit_raidlist_entry")); 1476 1476 memcpy((void *) &bkp_raidrec, (void *) raidrec, 1477 1477 sizeof(struct vinum_volume)); 1478 sprintf(title_of_editraidForm_window, "Plexes on %s",1478 sprintf(title_of_editraidForm_window, _("Plexes on %s"), 1479 1479 raidrec->volname); 1480 newtPushHelpLine( " Please select a plex to edit");1480 newtPushHelpLine(_(" Please select a plex to edit")); 1481 1481 newtOpenWindow(13, 5, 54, 15, title_of_editraidForm_window); 1482 1482 for (;;) { … … 1484 1484 char headerstr[MAX_STR_LEN]; 1485 1485 snprintf(headerstr, MAX_STR_LEN, "%-14s %-8s %11s %8s", 1486 "Plex", "Level", "Stripe Size", "Subdisks");1487 1488 bOK = newtCompactButton(2, 13, " OK ");1489 bCancel = newtCompactButton(12, 13, "Cancel");1490 bAdd = newtCompactButton(22, 13, " Add ");1491 bEdit = newtCompactButton(32, 13, " Edit ");1492 bDelete = newtCompactButton(42, 13, "Delete");1486 _("Plex"), _("Level",) _("Stripe Size"), _("Subdisks")); 1487 1488 bOK = newtCompactButton(2, 13, _(" OK ")); 1489 bCancel = newtCompactButton(12, 13, _("Cancel")); 1490 bAdd = newtCompactButton(22, 13, _(" Add ")); 1491 bEdit = newtCompactButton(32, 13, _(" Edit ")); 1492 bDelete = newtCompactButton(42, 13, _("Delete")); 1493 1493 1494 1494 plexesListbox = … … 1550 1550 if (b_res == bDelete) { 1551 1551 char msg[MAX_STR_LEN]; 1552 sprintf(msg, "Are you sure you want to delete %s.p%i?",1552 sprintf(msg, _("Are you sure you want to delete %s.p%i?"), 1553 1553 raidrec->volname, currline2); 1554 1554 if (ask_me_yes_or_no(msg)) { 1555 log_it( "Deleting RAID plex");1555 log_it(_("Deleting RAID plex")); 1556 1556 memcpy((void *) &raidrec->plex[currline2], 1557 1557 (void *) &raidrec->plex[raidrec->plexes - 1], … … 1627 1627 for (;;) { 1628 1628 log_msg(2, "Main loop"); 1629 sprintf(title_of_editraidForm_window, "Edit %s",1629 sprintf(title_of_editraidForm_window, _("Edit %s"), 1630 1630 raidrec->raid_device); 1631 1631 strcpy(sz_raid_level, … … 1633 1633 strcpy(sz_data_disks, 1634 1634 number_of_disks_as_string(raidrec->data_disks.entries, 1635 "data"));1635 _("data"))); 1636 1636 strcpy(sz_spare_disks, 1637 1637 number_of_disks_as_string(raidrec->spare_disks.entries, 1638 "spare"));1638 _("spare"))); 1639 1639 strcpy(sz_parity_disks, 1640 1640 number_of_disks_as_string(raidrec->parity_disks.entries, 1641 "parity"));1641 _("parity"))); 1642 1642 strcpy(sz_failed_disks, 1643 1643 number_of_disks_as_string(raidrec->failed_disks.entries, 1644 "failed"));1644 _("failed"))); 1645 1645 bSelectData = newtButton(1, 1, sz_data_disks); 1646 1646 bSelectSpare = newtButton(20, 1, sz_spare_disks); … … 1648 1648 bSelectFailed = newtButton(20, 5, sz_failed_disks); 1649 1649 bChangeRaid = newtButton(1, 9, sz_raid_level); 1650 bOK = newtButton(16 + (raidrec->raid_level == -1), 9, " OK ");1651 bCancel = newtButton(28, 9, "Cancel");1650 bOK = newtButton(16 + (raidrec->raid_level == -1), 9, _(" OK ")); 1651 bCancel = newtButton(28, 9, _("Cancel")); 1652 1652 bAdditional = 1653 1653 newtCompactButton(1, 13, 1654 "Additional settings and information");1654 _("Additional settings and information")); 1655 1655 newtPushHelpLine 1656 ( " Edit the RAID device's settings to your heart's content, then hit OK/Cancel.");1656 (_(" Edit the RAID device's settings to your heart's content, then hit OK/Cancel.")); 1657 1657 editraidForm = newtForm(NULL, NULL, 0); 1658 1658 newtFormAddComponents(editraidForm, bSelectData, bSelectParity, … … 1663 1663 choose_raid_level(raidrec); 1664 1664 } else if (b_res == bSelectData) { 1665 select_raid_disks(mountlist, raidlist, raidrec, "data",1665 select_raid_disks(mountlist, raidlist, raidrec, _("data"), 1666 1666 &raidrec->data_disks); 1667 1667 } else if (b_res == bSelectSpare) { 1668 select_raid_disks(mountlist, raidlist, raidrec, "spare",1668 select_raid_disks(mountlist, raidlist, raidrec, _("spare"), 1669 1669 &raidrec->spare_disks); 1670 1670 } else if (b_res == bSelectParity) { 1671 select_raid_disks(mountlist, raidlist, raidrec, "parity",1671 select_raid_disks(mountlist, raidlist, raidrec, _("parity"), 1672 1672 &raidrec->parity_disks); 1673 1673 } else if (b_res == bSelectFailed) { 1674 select_raid_disks(mountlist, raidlist, raidrec, "failed",1674 select_raid_disks(mountlist, raidlist, raidrec, _("failed"), 1675 1675 &raidrec->failed_disks); 1676 1676 } else if (b_res == bAdditional) { … … 1753 1753 raidlist->el[currline].volname, currline2); 1754 1754 newtPushHelpLine 1755 ( " Please select a subdisk to edit, or edit this plex's parameters");1755 (_(" Please select a subdisk to edit, or edit this plex's parameters")); 1756 1756 newtOpenWindow(13, 3, 54, 18, title_of_editraidForm_window); 1757 1757 for (;;) { … … 1759 1759 char headerstr[MAX_STR_LEN]; 1760 1760 char tmp[64]; 1761 snprintf(headerstr, MAX_STR_LEN, "%-24s %s", "Subdisk", "Device");1761 snprintf(headerstr, MAX_STR_LEN, "%-24s %s", _("Subdisk"), _("Device")); 1762 1762 1763 1763 … … 1773 1773 break; 1774 1774 default: 1775 sprintf(tmp, "unknown (%i)", raidrec->raidlevel);1775 sprintf(tmp, _("unknown (%i)"), raidrec->raidlevel); 1776 1776 break; 1777 1777 } 1778 bLevel = newtCompactButton(2, 2, " RAID level ");1778 bLevel = newtCompactButton(2, 2, _(" RAID level ")); 1779 1779 sLevel = newtLabel(19, 2, tmp); 1780 1780 1781 1781 if (raidrec->raidlevel >= 0) { 1782 1782 sprintf(tmp, "%ik", raidrec->stripesize); 1783 bStripeSize = newtCompactButton(2, 4, " Stripe size ");1783 bStripeSize = newtCompactButton(2, 4, _(" Stripe size ")); 1784 1784 } else { 1785 1785 strcpy(tmp, "N/A"); 1786 bStripeSize = newtLabel(2, 4, "Stripe size:");1786 bStripeSize = newtLabel(2, 4, _("Stripe size:")); 1787 1787 } 1788 1788 sStripeSize = newtLabel(19, 4, tmp); 1789 1789 1790 bOK = newtCompactButton(2, 16, " OK ");1791 bCancel = newtCompactButton(12, 16, "Cancel");1792 bAdd = newtCompactButton(22, 16, " Add ");1793 bEdit = newtCompactButton(32, 16, " Edit ");1794 bDelete = newtCompactButton(42, 16, "Delete");1790 bOK = newtCompactButton(2, 16, _(" OK ")); 1791 bCancel = newtCompactButton(12, 16, _("Cancel")); 1792 bAdd = newtCompactButton(22, 16, _(" Add ")); 1793 bEdit = newtCompactButton(32, 16, _(" Edit ")); 1794 bDelete = newtCompactButton(42, 16, _("Delete")); 1795 1795 1796 1796 … … 1878 1878 sprintf(tmp, "%i", raidrec->stripesize); 1879 1879 if (popup_and_get_string 1880 ( "Stripe size",1881 "Please enter the stripe size in kilobytes.", tmp, 20)) {1880 (_("Stripe size"), 1881 _("Please enter the stripe size in kilobytes."), tmp, 20)) { 1882 1882 raidrec->stripesize = atoi(tmp); 1883 1883 } … … 1930 1930 1931 1931 strcpy(sz_out, raidrec->additional_vars.el[lino].value); 1932 sprintf(header, "Edit %s", raidrec->additional_vars.el[lino].label);1933 sprintf(comment, "Please set %s's value (currently '%s')",1932 sprintf(header, _("Edit %s"), raidrec->additional_vars.el[lino].label); 1933 sprintf(comment, _("Please set %s's value (currently '%s')"), 1934 1934 raidrec->additional_vars.el[lino].label, sz_out); 1935 1935 if (popup_and_get_string(header, comment, sz_out, MAX_STR_LEN)) { … … 1993 1993 strcpy(flaws_str_C, "xxxxxxxxx"); 1994 1994 if (mountlist->entries > ARBITRARY_MAXIMUM) { 1995 log_to_screen( "Arbitrary limits suck, man!");1995 log_to_screen(_("Arbitrary limits suck, man!")); 1996 1996 finish(1); 1997 1997 } 1998 1998 newtPushHelpLine 1999 ( " Please edit the mountlist to your satisfaction, then click OK or Cancel.");1999 (_(" Please edit the mountlist to your satisfaction, then click OK or Cancel.")); 2000 2000 i = 4; 2001 bAdd = newtCompactButton(i, 17, " Add ");2002 bEdit = newtCompactButton(i += 11, 17, " Edit ");2003 bDelete = newtCompactButton(i += 12, 17, "Delete");2004 bReload = newtCompactButton(i += 12, 17, "Reload");2005 bCancel = newtCompactButton(i += 12, 17, "Cancel");2006 bOK = newtCompactButton(i += 12, 17, " OK ");2007 sprintf(tmp, "%-24s %-24s %-8s %s", "Device", "Mountpoint", "Format",2008 "Size (MB)");2001 bAdd = newtCompactButton(i, 17, _(" Add ")); 2002 bEdit = newtCompactButton(i += 11, 17, _(" Edit ")); 2003 bDelete = newtCompactButton(i += 12, 17, _("Delete")); 2004 bReload = newtCompactButton(i += 12, 17, _("Reload")); 2005 bCancel = newtCompactButton(i += 12, 17, _("Cancel")); 2006 bOK = newtCompactButton(i += 12, 17, _(" OK ")); 2007 sprintf(tmp, "%-24s %-24s %-8s %s", _("Device"), _("Mountpoint"), _("Format"), 2008 _("Size (MB)")); 2009 2009 headerMsg = newtLabel(2, 1, tmp); 2010 2010 flawsLabelA = newtLabel(2, 13, flaws_str_A); … … 2014 2014 newtListbox(2, 2, 10, NEWT_FLAG_SCROLL | NEWT_FLAG_RETURNEXIT); 2015 2015 redraw_mountlist(mountlist, keylist, partitionsListbox); 2016 newtOpenWindow(1, 3, 77, 18, "Editing mountlist");2016 newtOpenWindow(1, 3, 77, 18, _("Editing mountlist")); 2017 2017 myForm = newtForm(NULL, NULL, 0); 2018 2018 newtFormAddComponents(myForm, headerMsg, partitionsListbox, … … 2031 2031 finished = 2032 2032 ask_me_yes_or_no 2033 ( "Your mountlist might not work. Continue anyway?");2033 (_("Your mountlist might not work. Continue anyway?")); 2034 2034 } else { 2035 2035 finished = 2036 2036 ask_me_yes_or_no 2037 ( "Are you sure you want to save your mountlist and continue? (No changes will be made to your partition table at this time.)");2037 (_("Are you sure you want to save your mountlist and continue? (No changes will be made to your partition table at this time.)")); 2038 2038 } 2039 2039 } else if (b_res == bCancel) { 2040 2040 finished = TRUE; 2041 2041 } else if (b_res == bReload) { 2042 if (ask_me_yes_or_no( "Reload original mountlist?")) {2042 if (ask_me_yes_or_no(_("Reload original mountlist?"))) { 2043 2043 /* 2044 2044 This would be really dumb. RAIDTAB_FNAME is #define'd. --- Hugo, 2003/04/24 … … 2058 2058 i < mountlist->entries && keylist[i] != curr_choice; i++); 2059 2059 if (i == mountlist->entries && mountlist->entries > 0) { 2060 log_to_screen( "I don't know what that button does!");2060 log_to_screen(_("I don't know what that button does!")); 2061 2061 } else { 2062 2062 currline = i; … … 2076 2076 } else { 2077 2077 popup_and_OK 2078 ( "Please add an entry. Then press ENTER to edit it.");2078 (_("Please add an entry. Then press ENTER to edit it.")); 2079 2079 } 2080 2080 } … … 2086 2086 newtPopHelpLine(); 2087 2087 if (b_res == bOK) { 2088 log_it( "You pushed 'OK'. I shall now continue.");2088 log_it(_("You pushed 'OK'. I shall now continue.")); 2089 2089 return (0); 2090 2090 } else { … … 2165 2165 sprintf(title_of_window, "Additional variables"); 2166 2166 newtPushHelpLine 2167 ( " Edit the additional fields to your heart's content, then click OK or Cancel.");2168 headerMsg = newtLabel(1, 1, "Label Value");2167 (_(" Edit the additional fields to your heart's content, then click OK or Cancel.")); 2168 headerMsg = newtLabel(1, 1, _("Label Value")); 2169 2169 varsListbox = 2170 2170 newtListbox(1, 2, 6, NEWT_FLAG_SCROLL | NEWT_FLAG_RETURNEXIT); 2171 2171 i = 1; 2172 bAdd = newtCompactButton(i, 9, " Add ");2173 bEdit = newtCompactButton(i += 8, 9, " Edit ");2174 bDelete = newtCompactButton(i += 9, 9, "Delete");2175 bOK = newtCompactButton(i += 9, 9, " OK ");2176 bCancel = newtCompactButton(i += 9, 9, "Cancel");2172 bAdd = newtCompactButton(i, 9, _(" Add ")); 2173 bEdit = newtCompactButton(i += 8, 9, _(" Edit ")); 2174 bDelete = newtCompactButton(i += 9, 9, _("Delete")); 2175 bOK = newtCompactButton(i += 9, 9, _(" OK ")); 2176 bCancel = newtCompactButton(i += 9, 9, _("Cancel")); 2177 2177 newtOpenWindow(17, 7, 46, 10, title_of_window); 2178 2178 myForm = newtForm(NULL, NULL, 0); … … 2327 2327 2328 2328 if (popup_and_get_string 2329 ( "ISO Mode - device", "On what device do the ISO files live?",2329 (_("ISO Mode - device"), _("On what device do the ISO files live?"), 2330 2330 isodir_device, MAX_STR_LEN / 4)) { 2331 2331 if (popup_and_get_string 2332 ( "ISO Mode - format",2333 "What is the disk format of the device? (Hit ENTER if you don't know.)",2332 (_("ISO Mode - format"), 2333 _("What is the disk format of the device? (Hit ENTER if you don't know.)"), 2334 2334 isodir_format, 16)) { 2335 2335 if (popup_and_get_string 2336 ( "ISO Mode - path",2337 "At what path on this device can the ISO files be found?",2336 (_("ISO Mode - path"), 2337 _("At what path on this device can the ISO files be found?"), 2338 2338 isodir_path, MAX_STR_LEN / 4)) { 2339 2339 strip_spaces(isodir_device); … … 2433 2433 2434 2434 newtPushHelpLine 2435 ( "This is where I nuke your hard drives. Mhahahahaha. No-one can stop Mojo Jojo!");2436 newtOpenWindow(24, 3, 32, 13, "Nuking");2437 b1 = newtButton(7, 1, "Slowly");2438 b2 = newtButton(7, 5, "Medium");2439 b3 = newtButton(7, 9, "Quickly");2435 (_("This is where I nuke your hard drives. Mhahahahaha. No-one can stop Mojo Jojo!")); 2436 newtOpenWindow(24, 3, 32, 13, _("Nuking")); 2437 b1 = newtButton(7, 1, _("Slowly")); 2438 b2 = newtButton(7, 5, _("Medium")); 2439 b3 = newtButton(7, 9, _("Quickly")); 2440 2440 myForm = newtForm(NULL, NULL, 0); 2441 2441 newtFormAddComponents(myForm, b1, b2, b3, NULL); … … 2802 2802 iamhere("Post-malloc"); 2803 2803 strcpy(help_text, 2804 " Edit this RAID device's list of partitions. Choose OK or Cancel when done.");2805 sprintf(header_text, "%-24s %s", "Device", "Index");2806 sprintf(title_of_window, "%s contains...", raidrec->raid_device);2804 _(" Edit this RAID device's list of partitions. Choose OK or Cancel when done.")); 2805 sprintf(header_text, "%-24s %s", _("Device"), _("Index")); 2806 sprintf(title_of_window, _("%s contains..."), raidrec->raid_device); 2807 2807 newtPushHelpLine(help_text); 2808 2808 for (b_res = (newtComponent) 12345; b_res != bOK && b_res != bCancel;) { … … 2812 2812 redraw_disklist(disklist, keylist, partitionsListbox); 2813 2813 i = 1; 2814 bAdd = newtCompactButton(i, 9, " Add ");2815 bDelete = newtCompactButton(i += 8, 9, "Delete");2816 bOK = newtCompactButton(i += 9, 9, " OK ");2817 bCancel = newtCompactButton(i += 9, 9, "Cancel");2814 bAdd = newtCompactButton(i, 9, _(" Add ")); 2815 bDelete = newtCompactButton(i += 8, 9, _("Delete")); 2816 bOK = newtCompactButton(i += 9, 9, _(" OK ")); 2817 bCancel = newtCompactButton(i += 9, 9, _("Cancel")); 2818 2818 newtOpenWindow(21, 7, 38, 10, title_of_window); 2819 2819 myForm = newtForm(NULL, NULL, 0); … … 2834 2834 i++); 2835 2835 if (i == disklist->entries && disklist->entries > 0) { 2836 log_to_screen( "I don't know what that button does!");2836 log_to_screen(_("I don't know what that button does!")); 2837 2837 } else { 2838 2838 currline = i; 2839 2839 if (b_res == bAdd) { 2840 log_it( "Making list of unallocated RAID slices");2840 log_it(_("Making list of unallocated RAID slices")); 2841 2841 make_list_of_unallocated_raid_partitions 2842 2842 (unallocated_raid_partitions, mountlist_dontedit, … … 2844 2844 if (unallocated_raid_partitions->entries <= 0) { 2845 2845 popup_and_OK 2846 ( "There are no unallocated partitions marked for RAID.");2846 (_("There are no unallocated partitions marked for RAID.")); 2847 2847 } else { 2848 2848 log_it 2849 ( "Done. The user may add one or more of the above to RAID device");2849 (_("Done. The user may add one or more of the above to RAID device")); 2850 2850 add_disklist_entry(disklist, raidrec->raid_device, 2851 2851 unallocated_raid_partitions); 2852 log_it( "I have finished adding a disklist entry.");2852 log_it(_("I have finished adding a disklist entry.")); 2853 2853 redraw_disklist(disklist, keylist, 2854 2854 partitionsListbox); … … 2859 2859 redraw_disklist(disklist, keylist, partitionsListbox); 2860 2860 } else { 2861 sprintf(tmp, "%s's index is %d. What should it be?",2861 sprintf(tmp, _("%s's index is %d. What should it be?"), 2862 2862 raidrec->raid_device, 2863 2863 disklist->el[currline].index); 2864 2864 sprintf(sz_res, "%d", disklist->el[currline].index); 2865 if (popup_and_get_string( "Set index", tmp, sz_res, 10)) {2865 if (popup_and_get_string(_("Set index"), tmp, sz_res, 10)) { 2866 2866 disklist->el[currline].index = atoi(sz_res); 2867 2867 } … … 2920 2920 for (output = 'z'; !strchr("AICE", output); output = tmp[0]) { 2921 2921 printf 2922 ( "Which mode - (A)utomatic, (I)nteractive, \n(C)ompare only, or (E)xit to shell?\n--> ");2922 (_("Which mode - (A)utomatic, (I)nteractive, \n(C)ompare only, or (E)xit to shell?\n--> ")); 2923 2923 fgets(tmp, MAX_STR_LEN - 1, stdin); 2924 2924 } … … 2927 2927 2928 2928 newtPushHelpLine 2929 ( " Do you want to 'nuke' your system, restore interactively, or just compare?");2930 newtOpenWindow(24, 3, 32, 17, "How should I restore?");2931 b1 = newtButton(7, 1, "Automatically");2932 b2 = newtButton(7, 5, "Interactively");2933 b3 = newtButton(7, 9, "Compare only!");2934 b4 = newtButton(7, 13, "Exit to shell");2929 (_(" Do you want to 'nuke' your system, restore interactively, or just compare?")); 2930 newtOpenWindow(24, 3, 32, 17, _("How should I restore?")); 2931 b1 = newtButton(7, 1, _("Automatically")); 2932 b2 = newtButton(7, 5, _("Interactively")); 2933 b3 = newtButton(7, 9, _("Compare only!")); 2934 b4 = newtButton(7, 13, _("Exit to shell")); 2935 2935 myForm = newtForm(NULL, NULL, 0); 2936 2936 newtFormAddComponents(myForm, b1, b2, b3, b4, NULL); -
trunk/mondo/mondo/mondorestore/mondo-rstr-newt.h
r59 r507 25 25 #endif /*__FreeBSD__*/ 26 26 27 #define NO_FLAWS_DETECTED "No flaws detected in mountlist at this time. Hit 'OK' to proceed."27 #define NO_FLAWS_DETECTED _("No flaws detected in mountlist at this time. Hit 'OK' to proceed.") 28 28 29 29 -
trunk/mondo/mondo/mondorestore/mondo-rstr-tools.c
r426 r507 225 225 226 226 asprintf(&question, 227 "Should I restore the image of %s ?", incoming);227 _("Should I restore the image of %s ?", incoming)); 228 228 229 229 if (ask_me_yes_or_no(question)) { … … 337 337 while (get_cfg_file_from_archive(bkpinfo)) { 338 338 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?"))) 340 340 { 341 341 fatal_error("Could not find config file/archives. Aborting."); … … 441 441 442 442 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")); 444 444 already_mounted = TRUE; 445 445 } else { … … 458 458 if (run_program_and_log_output(mount_isodir_command, FALSE)) { 459 459 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.")); 461 461 return (1); 462 462 } 463 463 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.")); 465 465 } 466 466 if (!IS_THIS_A_STREAMING_BACKUP(bkpinfo->backup_media_type)) { … … 473 473 if (i < 0) { 474 474 popup_and_OK 475 ( "Cannot find ISO images in the directory you specified.");475 (_("Cannot find ISO images in the directory you specified.")); 476 476 retval = 1; 477 477 } … … 599 599 these_failed[0] = '\0'; 600 600 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."), 605 605 "", mountlist->entries); 606 606 … … 610 610 "Again with the /proc - why is this in your mountlist?"); 611 611 } else if (is_this_device_mounted(mountlist->el[lino].device)) { 612 sprintf(tmp, "%s is already mounted",612 sprintf(tmp, _("%s is already mounted"), 613 613 mountlist->el[lino].device); 614 614 log_to_screen(tmp); … … 639 639 if (g_partition_table_locked_up > 0) { 640 640 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")); 642 642 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")); 644 644 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?"), 648 648 these_failed); 649 649 if (!ask_me_yes_or_no(tmp)) { 650 650 retval = 0; 651 651 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.")); 654 654 } else { 655 mvaddstr_and_log_it(g_currentY++, 74, "Failed.");655 mvaddstr_and_log_it(g_currentY++, 74, _("Failed.")); 656 656 log_to_screen 657 ( "Unable to mount some or all of your partitions.");657 (_("Unable to mount some or all of your partitions.")); 658 658 } 659 659 } 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.")); 662 662 } 663 663 run_program_and_log_output("df -P -m", 3); … … 1322 1322 if (am_I_in_disaster_recovery_mode() 1323 1323 && 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?"))) 1325 1325 { 1326 1326 // sprintf(command, "cp -f tmp/mountlist.txt /tmp"); … … 1348 1348 1349 1349 case 0: 1350 log_to_screen( "Pre-processing filelist");1350 log_to_screen(("Pre-processing filelist")); 1351 1351 if (!does_file_exist(g_biggielist_txt)) { 1352 1352 sprintf(command, "> %s", g_biggielist_txt); … … 1360 1360 1361 1361 default: 1362 open_evalcall_form( "Pre-processing filelist");1362 open_evalcall_form(_("Pre-processing filelist")); 1363 1363 while (!waitpid(pid, (int *) 0, WNOHANG)) { 1364 1364 usleep(100000); … … 1373 1373 unlink(g_filelist_full); 1374 1374 if (g_text_mode) { 1375 printf( "Restore which directory? --> ");1375 printf(_("Restore which directory? --> ")); 1376 1376 fgets(tmp, sizeof(tmp), stdin); 1377 1377 toggle_path_selection(filelist, tmp, TRUE); … … 1506 1506 else { 1507 1507 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.")); 1509 1509 res = run_lilo(offer_to_hack_scripts); 1510 1510 } … … 1512 1512 retval += res; 1513 1513 if (res) { 1514 log_to_screen( "Your boot loader returned an error");1514 log_to_screen(_("Your boot loader returned an error")); 1515 1515 } else { 1516 log_to_screen( "Your boot loader ran OK");1516 log_to_screen(_("Your boot loader ran OK")); 1517 1517 } 1518 1518 paranoid_free(device); … … 1595 1595 } 1596 1596 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?"))) 1598 1598 /* interactive mode */ 1599 1599 { 1600 1600 mvaddstr_and_log_it(g_currentY, 1601 1601 0, 1602 "Modifying fstab and grub.conf, and running GRUB... ");1602 _("Modifying fstab and grub.conf, and running GRUB... ")); 1603 1603 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"), 1606 1606 boot_device, MAX_STR_LEN / 4); 1607 1607 sprintf(command, "stabgrub-me %s", boot_device); … … 1609 1609 if (res) { 1610 1610 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.")); 1612 1612 newtSuspend(); 1613 1613 system("chroot " MNT_RESTORING); 1614 1614 newtResume(); 1615 popup_and_OK( "Thank you.");1615 popup_and_OK(_("Thank you.")); 1616 1616 } else { 1617 1617 done = TRUE; 1618 1618 } 1619 popup_and_OK( "You will now edit fstab and grub.conf");1619 popup_and_OK(_("You will now edit fstab and grub.conf")); 1620 1620 if (!g_text_mode) { 1621 1621 newtSuspend(); … … 1634 1634 mvaddstr_and_log_it(g_currentY, 1635 1635 0, 1636 "Running GRUB... ");1636 _("Running GRUB... ")); 1637 1637 iamhere(command); 1638 1638 res = run_program_and_log_output(command, 1); 1639 1639 if (res) { 1640 1640 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.")); 1642 1642 newtSuspend(); 1643 1643 system("chroot " MNT_RESTORING); 1644 1644 newtResume(); 1645 popup_and_OK( "Thank you.");1645 popup_and_OK(_("Thank you.")); 1646 1646 } 1647 1647 } 1648 1648 if (res) { 1649 mvaddstr_and_log_it(g_currentY++, 74, "Failed.");1649 mvaddstr_and_log_it(g_currentY++, 74, _("Failed.")); 1650 1650 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.")); 1652 1652 log_msg(1, "Type:-"); 1653 1653 log_msg(1, " mount-me"); … … 1660 1660 "If you're really stuck, please e-mail the mailing list."); 1661 1661 } else { 1662 mvaddstr_and_log_it(g_currentY++, 74, "Done.");1662 mvaddstr_and_log_it(g_currentY++, 74, _("Done.")); 1663 1663 } 1664 1664 paranoid_free(rootdev); … … 1698 1698 strcpy(editor, find_my_editor()); 1699 1699 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?"))) 1701 1701 1702 1702 /* interactive mode */ … … 1704 1704 mvaddstr_and_log_it(g_currentY, 1705 1705 0, 1706 "Modifying fstab and elilo.conf... ");1706 _("Modifying fstab and elilo.conf... ")); 1707 1707 sprintf(command, "stabelilo-me"); 1708 1708 res = run_program_and_log_output(command, 3); 1709 1709 if (res) { 1710 1710 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.")); 1712 1712 for (done = FALSE; !done;) { 1713 1713 if (!g_text_mode) { … … 1723 1723 } 1724 1724 // newtCls(); 1725 if (ask_me_yes_or_no( "Edit them again?")) {1725 if (ask_me_yes_or_no(_("Edit them again?"))) { 1726 1726 continue; 1727 1727 } … … 1729 1729 } 1730 1730 } else { 1731 log_to_screen( "elilo.conf and fstab were modified OK");1731 log_to_screen(_("elilo.conf and fstab were modified OK")); 1732 1732 } 1733 1733 } else … … 1773 1773 strcpy(editor, find_my_editor()); 1774 1774 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?"))) 1776 1776 1777 1777 /* interactive mode */ … … 1779 1779 mvaddstr_and_log_it(g_currentY, 1780 1780 0, 1781 "Modifying fstab and lilo.conf, and running LILO... ");1781 _("Modifying fstab and lilo.conf, and running LILO... ")); 1782 1782 sprintf(command, "stablilo-me"); 1783 1783 res = run_program_and_log_output(command, 3); 1784 1784 if (res) { 1785 1785 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.")); 1787 1787 for (done = FALSE; !done;) { 1788 1788 if (!g_text_mode) { … … 1797 1797 } 1798 1798 // newtCls(); 1799 if (ask_me_yes_or_no( "Edit them again?")) {1799 if (ask_me_yes_or_no(_("Edit them again?"))) { 1800 1800 continue; 1801 1801 } … … 1811 1811 done = 1812 1812 ask_me_yes_or_no 1813 ( "LILO failed. Re-edit system files?");1813 (_("LILO failed. Re-edit system files?")); 1814 1814 } else { 1815 1815 done = TRUE; … … 1817 1817 } 1818 1818 } else { 1819 log_to_screen( "lilo.conf and fstab were modified OK");1819 log_to_screen(_("lilo.conf and fstab were modified OK")); 1820 1820 } 1821 1821 } else … … 1824 1824 mvaddstr_and_log_it(g_currentY, 1825 1825 0, 1826 "Running LILO... ");1826 _("Running LILO... ")); 1827 1827 res = 1828 1828 run_program_and_log_output("chroot " MNT_RESTORING " lilo -L", … … 1834 1834 } 1835 1835 if (res) { 1836 mvaddstr_and_log_it(g_currentY++, 74, "Failed.");1836 mvaddstr_and_log_it(g_currentY++, 74, _("Failed.")); 1837 1837 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.")); 1839 1839 } else { 1840 mvaddstr_and_log_it(g_currentY++, 74, "Done.");1840 mvaddstr_and_log_it(g_currentY++, 74, _("Done.")); 1841 1841 } 1842 1842 } … … 1886 1886 1887 1887 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?"))) 1889 1889 /* interactive mode */ 1890 1890 { 1891 1891 mvaddstr_and_log_it(g_currentY, 0, 1892 "Modifying fstab and restoring MBR... ");1892 _("Modifying fstab and restoring MBR... ")); 1893 1893 for (done = FALSE; !done;) { 1894 1894 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")); 1896 1896 if (!g_text_mode) { 1897 1897 newtSuspend(); … … 1904 1904 // newtCls(); 1905 1905 } 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"), 1908 1908 boot_device, MAX_STR_LEN / 4); 1909 1909 sprintf(command, "stabraw-me %s", boot_device); 1910 1910 res = run_program_and_log_output(command, 3); 1911 1911 if (res) { 1912 done = ask_me_yes_or_no( "Modifications failed. Re-try?");1912 done = ask_me_yes_or_no(_("Modifications failed. Re-try?")); 1913 1913 } else { 1914 1914 done = TRUE; … … 1919 1919 { 1920 1920 mvaddstr_and_log_it(g_currentY, 0, 1921 "Restoring MBR... ");1921 _("Restoring MBR... ")); 1922 1922 res = run_program_and_log_output(command, 3); 1923 1923 } 1924 1924 if (res) { 1925 mvaddstr_and_log_it(g_currentY++, 74, "Failed.");1925 mvaddstr_and_log_it(g_currentY++, 74, _("Failed.")); 1926 1926 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.")); 1928 1928 } else { 1929 mvaddstr_and_log_it(g_currentY++, 74, "Done.");1929 mvaddstr_and_log_it(g_currentY++, 74, _("Done.")); 1930 1930 } 1931 1931 paranoid_free(command); … … 2067 2067 { 2068 2068 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")); 2070 2070 paranoid_MR_finish(254); 2071 2071 } … … 2089 2089 return; 2090 2090 } 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."), 2094 2094 "", 20); 2095 2095 for (i = 0; i < 20; i++) { 2096 2096 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); 2098 2098 update_progress_form(tmp); 2099 2099 sleep(1); … … 2151 2151 2152 2152 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."), 2157 2157 "", mountlist->entries); 2158 2158 chdir("/"); … … 2187 2187 continue; 2188 2188 } 2189 sprintf(tmp, "Unmounting device %s ", mountlist->el[lino].device);2189 sprintf(tmp, _("Unmounting device %s "), mountlist->el[lino].device); 2190 2190 2191 2191 update_progress_form(tmp); … … 2206 2206 res = run_program_and_log_output(command, 3); 2207 2207 } else { 2208 strcat(tmp, "...not mounted anyway :-) OK");2208 strcat(tmp, _("...not mounted anyway :-) OK")); 2209 2209 res = 0; 2210 2210 } 2211 2211 g_current_progress++; 2212 2212 if (res) { 2213 strcat(tmp, "...Failed");2213 strcat(tmp, _("...Failed")); 2214 2214 retval++; 2215 2215 log_to_screen(tmp); … … 2220 2220 close_progress_form(); 2221 2221 if (retval) { 2222 mvaddstr_and_log_it(g_currentY++, 74, "Failed.");2222 mvaddstr_and_log_it(g_currentY++, 74, _("Failed.")); 2223 2223 } else { 2224 mvaddstr_and_log_it(g_currentY++, 74, "Done.");2224 mvaddstr_and_log_it(g_currentY++, 74, _("Done.")); 2225 2225 } 2226 2226 if (retval) { 2227 log_to_screen( "Unable to unmount some of your partitions.");2227 log_to_screen(_("Unable to unmount some of your partitions.")); 2228 2228 } else { 2229 log_to_screen( "All partitions were unmounted OK.");2229 log_to_screen(_("All partitions were unmounted OK.")); 2230 2230 } 2231 2231 free(mountlist); … … 2311 2311 malloc_string(tmp); 2312 2312 log_msg(2, "gcffa --- starting"); 2313 log_to_screen( "I'm thinking...");2313 log_to_screen(_("I'm thinking...")); 2314 2314 sprintf(mountpt, "%s/mount.bootdisk", bkpinfo->tmpdir); 2315 2315 device[0] = '\0'; … … 2423 2423 2424 2424 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")); 2426 2426 return (1); 2427 2427 } … … 2504 2504 log_msg(1, "%s not found", cfg_file); 2505 2505 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")); 2507 2507 return (1); 2508 2508 } 2509 2509 2510 log_to_screen( "Recovered mondo-restore.cfg");2510 log_to_screen(_("Recovered mondo-restore.cfg")); 2511 2511 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...")); 2513 2513 } 2514 2514 /* start SAH */ … … 2580 2580 while (unfinished_mdstat_devices > 0) { 2581 2581 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); 2583 2583 return; 2584 2584 } … … 2586 2586 if (mdstat->el[i].progress < wait_for_percentage) { 2587 2587 unfinished_mdstat_devices++; 2588 sprintf(screen_message, "Sync'ing /dev/md%d",2588 sprintf(screen_message, _("Sync'ing /dev/md%d"), 2589 2589 mdstat->el[i].md); 2590 2590 open_evalcall_form(screen_message);
Note:
See TracChangeset
for help on using the changeset viewer.