Changeset 497 in MondoRescue for branches/stable/mondo/mondo/common/libmondo-devices.c
- Timestamp:
- Apr 28, 2006, 12:34:03 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/stable/mondo/mondo/common/libmondo-devices.c
r305 r497 352 352 && !does_file_exist("/tmp/mountlist.txt.sample")) { 353 353 log_to_screen 354 ( "Using /dev/root is stupid of you but I'll forgive you.");354 (_("Using /dev/root is stupid of you but I'll forgive you.")); 355 355 is_this_a_ramdisk = FALSE; 356 356 } … … 380 380 switch (bt) { 381 381 case none: 382 strcpy(output, "none");382 strcpy(output, _("none")); 383 383 break; 384 384 case iso: 385 strcpy(output, "iso");385 strcpy(output, _("iso")); 386 386 break; 387 387 case cdr: 388 strcpy(output, "cdr");388 strcpy(output, _("cdr")); 389 389 break; 390 390 case cdrw: 391 strcpy(output, "cdrw");391 strcpy(output, _("cdrw")); 392 392 break; 393 393 case cdstream: 394 strcpy(output, "cdstream");394 strcpy(output, _("cdstream")); 395 395 break; 396 396 case nfs: 397 strcpy(output, "nfs");397 strcpy(output, _("nfs")); 398 398 break; 399 399 case tape: 400 strcpy(output, "tape");400 strcpy(output, _("tape")); 401 401 break; 402 402 case udev: 403 strcpy(output, "udev");403 strcpy(output, _("udev")); 404 404 break; 405 405 default: 406 strcpy(output, "default");406 strcpy(output, _("default")); 407 407 } 408 408 return (output); … … 695 695 if (!dev[0] || (res = mount_CDROM_here(dev, mountpoint))) { 696 696 if (!popup_and_get_string 697 ( "CD-ROM device", "Please enter your CD-ROM's /dev device",697 (_("CD-ROM device"), _("Please enter your CD-ROM's /dev device"), 698 698 dev, MAX_STR_LEN / 4)) { 699 699 res = 1; … … 703 703 } 704 704 if (res) { 705 log_msg(1, "mount failed");705 log_msg(1, _("mount failed")); 706 706 } else { 707 log_msg(1, "mount succeeded with %s", dev);707 log_msg(1, _("mount succeeded with %s"), dev); 708 708 } 709 709 paranoid_free(dev); … … 1772 1772 } 1773 1773 if (res) { 1774 log_to_screen( "WARNING - failed to unmount CD-ROM drive");1774 log_to_screen(_("WARNING - failed to unmount CD-ROM drive")); 1775 1775 } 1776 1776 if (!bkpinfo->please_dont_eject) { … … 1780 1780 } 1781 1781 if (res) { 1782 log_to_screen( "WARNING - failed to eject CD-ROM disk");1782 log_to_screen(_("WARNING - failed to eject CD-ROM disk")); 1783 1783 } 1784 1784 popup_and_OK(request); … … 1841 1841 which_backup_media_type(bkpinfo->restore_data); 1842 1842 if (bkpinfo->backup_media_type == none) { 1843 log_to_screen( "User has chosen not to backup the PC");1843 log_to_screen(_("User has chosen not to backup the PC")); 1844 1844 finish(1); 1845 1845 } 1846 1846 if (bkpinfo->backup_media_type == tape && bkpinfo->restore_data) { 1847 popup_and_OK( "Please remove CD/floppy from drive(s)");1847 popup_and_OK(_("Please remove CD/floppy from drive(s)")); 1848 1848 } 1849 1849 log_msg(3, "media type = %s", … … 1880 1880 if (archiving_to_media) { 1881 1881 if (ask_me_yes_or_no 1882 ( "Is your computer a laptop, or does the CD writer incorporate BurnProof technology?"))1882 (_("Is your computer a laptop, or does the CD writer incorporate BurnProof technology?"))) 1883 1883 { 1884 1884 bkpinfo->manual_cd_tray = TRUE; … … 1886 1886 if ((bkpinfo->compression_level = 1887 1887 which_compression_level()) == -1) { 1888 log_to_screen( "User has chosen not to backup the PC");1888 log_to_screen(_("User has chosen not to backup the PC")); 1889 1889 finish(1); 1890 1890 } 1891 sprintf(comment, "What speed is your %s (re)writer?",1891 sprintf(comment, _("What speed is your %s (re)writer?"), 1892 1892 media_descriptor_string(bkpinfo->backup_media_type)); 1893 1893 if (bkpinfo->backup_media_type == dvd) { … … 1903 1903 } 1904 1904 if (bkpinfo->backup_media_type != dvd) { 1905 if (!popup_and_get_string( "Speed", comment, tmp, 4)) {1906 log_to_screen( "User has chosen not to backup the PC");1905 if (!popup_and_get_string(_("Speed"), comment, tmp, 4)) { 1906 log_to_screen(_("User has chosen not to backup the PC")); 1907 1907 finish(1); 1908 1908 } … … 1910 1910 bkpinfo->cdrw_speed = atoi(tmp); // if DVD then this shouldn't ever be used anyway :) 1911 1911 sprintf(comment, 1912 "How much data (in Megabytes) will each %s store?",1912 _("How much data (in Megabytes) will each %s store?"), 1913 1913 media_descriptor_string(bkpinfo->backup_media_type)); 1914 1914 if (!popup_and_get_string("Size", comment, sz_size, 5)) { 1915 log_to_screen( "User has chosen not to backup the PC");1915 log_to_screen(_("User has chosen not to backup the PC")); 1916 1916 finish(1); 1917 1917 } … … 1920 1920 } 1921 1921 if (bkpinfo->media_size[0] <= 0) { 1922 log_to_screen( "User has chosen not to backup the PC");1922 log_to_screen(_("User has chosen not to backup the PC")); 1923 1923 finish(1); 1924 1924 } … … 1941 1941 bkpinfo->media_device); 1942 1942 sprintf(comment, 1943 "Please specify your %s drive's /dev entry",1943 _("Please specify your %s drive's /dev entry"), 1944 1944 media_descriptor_string(bkpinfo-> 1945 1945 backup_media_type)); 1946 1946 if (!popup_and_get_string 1947 ( "Device?", comment, bkpinfo->media_device,1947 (_("Device?"), comment, bkpinfo->media_device, 1948 1948 MAX_STR_LEN / 4)) { 1949 log_to_screen( "User has chosen not to backup the PC");1949 log_to_screen(_("User has chosen not to backup the PC")); 1950 1950 finish(1); 1951 1951 } … … 1960 1960 if (bkpinfo->media_device[0]) { 1961 1961 sprintf(tmp, 1962 "I think I've found your %s burner at SCSI node %s; am I right on the money?",1962 _("I think I've found your %s burner at SCSI node %s; am I right on the money?"), 1963 1963 media_descriptor_string(bkpinfo-> 1964 1964 backup_media_type), … … 1970 1970 if (!bkpinfo->media_device[0]) { 1971 1971 if (g_kernel_version < 2.6) { 1972 i = popup_and_get_string( "Device node?",1973 "What is the SCSI node of your CD (re)writer, please?",1972 i = popup_and_get_string(_("Device node?"), 1973 _("What is the SCSI node of your CD (re)writer, please?"), 1974 1974 bkpinfo->media_device, 1975 1975 MAX_STR_LEN / 4); 1976 1976 } else { 1977 i = popup_and_get_string( "/dev entry?",1978 "What is the /dev entry of your CD (re)writer, please?",1977 i = popup_and_get_string(_("/dev entry?"), 1978 _("What is the /dev entry of your CD (re)writer, please?"), 1979 1979 bkpinfo->media_device, 1980 1980 MAX_STR_LEN / 4); 1981 1981 } 1982 1982 if (!i) { 1983 log_to_screen( "User has chosen not to backup the PC");1983 log_to_screen(_("User has chosen not to backup the PC")); 1984 1984 finish(1); 1985 1985 } … … 1994 1994 case udev: 1995 1995 if (!ask_me_yes_or_no 1996 ( "This option is for advanced users only. Are you sure?")) {1997 log_to_screen( "User has chosen not to backup the PC");1996 (_("This option is for advanced users only. Are you sure?"))) { 1997 log_to_screen(_("User has chosen not to backup the PC")); 1998 1998 finish(1); 1999 1999 } … … 2001 2001 2002 2002 if (find_tape_device_and_size(bkpinfo->media_device, sz_size)) { 2003 log_msg(3, "Ok, using vanilla scsi tape.");2003 log_msg(3, _("Ok, using vanilla scsi tape.")); 2004 2004 strcpy(bkpinfo->media_device, VANILLA_SCSI_TAPE); 2005 2005 if ((fin = fopen(bkpinfo->media_device, "r"))) { … … 2019 2019 } 2020 2020 sprintf(tmp, 2021 "I think I've found your tape streamer at %s; am I right on the money?",2021 _("I think I've found your tape streamer at %s; am I right on the money?"), 2022 2022 bkpinfo->media_device); 2023 2023 } 2024 2024 if (bkpinfo->media_device[0]) { 2025 2025 sprintf(tmp, 2026 "I think I've found your tape streamer at %s; am I right on the money?",2026 _("I think I've found your tape streamer at %s; am I right on the money?"), 2027 2027 bkpinfo->media_device); 2028 2028 if (!ask_me_yes_or_no(tmp)) { … … 2032 2032 if (!bkpinfo->media_device[0]) { 2033 2033 if (!popup_and_get_string 2034 ( "Device name?",2035 "What is the /dev entry of your tape streamer?",2034 (_("Device name?"), 2035 _("What is the /dev entry of your tape streamer?"), 2036 2036 bkpinfo->media_device, MAX_STR_LEN / 4)) { 2037 log_to_screen( "User has chosen not to backup the PC");2037 log_to_screen(_("User has chosen not to backup the PC")); 2038 2038 finish(1); 2039 2039 } … … 2041 2041 sprintf(tmp, "ls -l %s", bkpinfo->media_device); 2042 2042 if (run_program_and_log_output(tmp, FALSE)) { 2043 log_to_screen( "User has not specified a valid /dev entry");2043 log_to_screen(_("User has not specified a valid /dev entry")); 2044 2044 finish(1); 2045 2045 } … … 2069 2069 if ((bkpinfo->compression_level = 2070 2070 which_compression_level()) == -1) { 2071 log_to_screen( "User has chosen not to backup the PC");2071 log_to_screen(_("User has chosen not to backup the PC")); 2072 2072 finish(1); 2073 2073 } … … 2090 2090 { 2091 2091 if (!popup_and_get_string 2092 ( "NFS dir.",2093 "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.)",2092 (_("NFS dir."), 2093 _("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.)"), 2094 2094 bkpinfo->nfs_mount, MAX_STR_LEN / 4)) { 2095 log_to_screen( "User has chosen not to backup the PC");2095 log_to_screen(_("User has chosen not to backup the PC")); 2096 2096 finish(1); 2097 2097 } … … 2099 2099 if ((bkpinfo->compression_level = 2100 2100 which_compression_level()) == -1) { 2101 log_to_screen( "User has chosen not to backup the PC");2101 log_to_screen(_("User has chosen not to backup the PC")); 2102 2102 finish(1); 2103 2103 } … … 2114 2114 2115 2115 sprintf(comment, 2116 "How much data (in Megabytes) will each media store?");2117 if (!popup_and_get_string( "Size", comment, sz_size, 5)) {2118 log_to_screen( "User has chosen not to backup the PC");2116 _("How much data (in Megabytes) will each media store?")); 2117 if (!popup_and_get_string(_("Size"), comment, sz_size, 5)) { 2118 log_to_screen(_("User has chosen not to backup the PC")); 2119 2119 finish(1); 2120 2120 } … … 2123 2123 } 2124 2124 if (bkpinfo->media_size[0] <= 0) { 2125 log_to_screen( "User has chosen not to backup the PC");2125 log_to_screen(_("User has chosen not to backup the PC")); 2126 2126 finish(1); 2127 2127 } … … 2130 2130 system("umount /tmp/isodir 2> /dev/null"); 2131 2131 if (!popup_and_get_string 2132 ( "NFS share", "Which remote NFS share should I mount?",2132 (_("NFS share"), _("Which remote NFS share should I mount?"), 2133 2133 bkpinfo->nfs_mount, MAX_STR_LEN)) { 2134 log_to_screen( "User has chosen not to backup the PC");2134 log_to_screen(_("User has chosen not to backup the PC")); 2135 2135 finish(1); 2136 2136 } … … 2149 2149 if (!is_this_device_mounted(bkpinfo->nfs_mount)) { 2150 2150 popup_and_OK 2151 ( "Please mount that partition before you try to backup to or restore from it.");2151 (_("Please mount that partition before you try to backup to or restore from it.")); 2152 2152 finish(1); 2153 2153 } 2154 2154 strcpy(tmp, bkpinfo->nfs_remote_dir); 2155 2155 if (!popup_and_get_string 2156 ( "Directory", "Which directory within that mountpoint?", tmp,2156 (_("Directory"), _("Which directory within that mountpoint?"), tmp, 2157 2157 MAX_STR_LEN)) { 2158 log_to_screen( "User has chosen not to backup the PC");2158 log_to_screen(_("User has chosen not to backup the PC")); 2159 2159 finish(1); 2160 2160 } … … 2167 2167 strcpy(tmp, bkpinfo->nfs_remote_dir); 2168 2168 sprintf(prompt, 2169 "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.",2169 _("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."), 2170 2170 bkpinfo->nfs_remote_dir, bkpinfo->isodir); 2171 2171 if (!popup_and_get_string 2172 ( "Directory", prompt, tmp, MAX_STR_LEN)) {2173 log_to_screen( "User has chosen not to backup the PC");2172 (_("Directory"), prompt, tmp, MAX_STR_LEN)) { 2173 log_to_screen(_("User has chosen not to backup the PC")); 2174 2174 finish(1); 2175 2175 } … … 2181 2181 } 2182 2182 if (!popup_and_get_string 2183 ( "Prefix.",2184 "Please enter the prefix that will be prepended to your ISO filename. Example: machine1 to obtain machine1-[1-9]*.iso files",2183 (_("Prefix."), 2184 _("Please enter the prefix that will be prepended to your ISO filename. Example: machine1 to obtain machine1-[1-9]*.iso files"), 2185 2185 bkpinfo->prefix, MAX_STR_LEN / 4)) { 2186 log_to_screen( "User has chosen not to backup the PC");2186 log_to_screen(_("User has chosen not to backup the PC")); 2187 2187 finish(1); 2188 2188 } … … 2200 2200 if (!bkpinfo->disaster_recovery) { 2201 2201 if (!popup_and_get_string 2202 ( "Storage dir.",2203 "Please enter the full path that contains your ISO images. Example: /mnt/raid0_0",2202 (_("Storage dir."), 2203 _("Please enter the full path that contains your ISO images. Example: /mnt/raid0_0"), 2204 2204 bkpinfo->isodir, MAX_STR_LEN / 4)) { 2205 log_to_screen( "User has chosen not to backup the PC");2205 log_to_screen(_("User has chosen not to backup the PC")); 2206 2206 finish(1); 2207 2207 } … … 2209 2209 if ((bkpinfo->compression_level = 2210 2210 which_compression_level()) == -1) { 2211 log_to_screen( "User has chosen not to backup the PC");2211 log_to_screen(_("User has chosen not to backup the PC")); 2212 2212 finish(1); 2213 2213 } 2214 2214 if (!popup_and_get_string 2215 ( "ISO size.",2216 "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.",2215 (_("ISO size."), 2216 _("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."), 2217 2217 sz_size, 16)) { 2218 log_to_screen( "User has chosen not to backup the PC");2218 log_to_screen(_("User has chosen not to backup the PC")); 2219 2219 finish(1); 2220 2220 } … … 2223 2223 } 2224 2224 if (!popup_and_get_string 2225 ( "Prefix.",2226 "Please enter the prefix that will be prepended to your ISO filename. Example: machine1 to obtain machine1-[1-9]*.iso files",2225 (_("Prefix."), 2226 _("Please enter the prefix that will be prepended to your ISO filename. Example: machine1 to obtain machine1-[1-9]*.iso files"), 2227 2227 bkpinfo->prefix, MAX_STR_LEN / 4)) { 2228 2228 log_to_screen("User has chosen not to backup the PC"); … … 2259 2259 #ifdef __FreeBSD__ 2260 2260 if (!popup_and_get_string 2261 ( "Boot device",2262 "What is your boot device? (e.g. /dev/ad0)",2261 (_("Boot device"), 2262 _("What is your boot device? (e.g. /dev/ad0)"), 2263 2263 bkpinfo->boot_device, MAX_STR_LEN / 4)) { 2264 log_to_screen( "User has chosen not to backup the PC");2264 log_to_screen(_("User has chosen not to backup the PC")); 2265 2265 finish(1); 2266 2266 } … … 2268 2268 #else 2269 2269 if (!popup_and_get_string 2270 ( "Boot device",2271 "What is your boot device? (e.g. /dev/hda)",2270 (_("Boot device"), 2271 _("What is your boot device? (e.g. /dev/hda)"), 2272 2272 bkpinfo->boot_device, MAX_STR_LEN / 4)) { 2273 log_to_screen( "User has chosen not to backup the PC");2273 log_to_screen(_("User has chosen not to backup the PC")); 2274 2274 finish(1); 2275 2275 } … … 2291 2291 if (i == 'U') { 2292 2292 if (ask_me_yes_or_no 2293 ( "Unidentified boot loader. Shall I restore it byte-for-byte at restore time and hope for the best?"))2293 (_("Unidentified boot loader. Shall I restore it byte-for-byte at restore time and hope for the best?"))) 2294 2294 { 2295 2295 i = 'R'; // raw 2296 2296 } else { 2297 2297 log_to_screen 2298 ( "I cannot find your boot loader. Please run mondoarchive with parameters.");2298 (_("I cannot find your boot loader. Please run mondoarchive with parameters.")); 2299 2299 finish(1); 2300 2300 } … … 2304 2304 strcpy(bkpinfo->include_paths, "/"); 2305 2305 if (!popup_and_get_string 2306 ( "Backup paths",2307 "Please enter paths which you want me to backup. The default is '/' (i.e. everything).",2306 (_("Backup paths"), 2307 _("Please enter paths which you want me to backup. The default is '/' (i.e. everything)."), 2308 2308 bkpinfo->include_paths, MAX_STR_LEN)) { 2309 log_to_screen( "User has chosen not to backup the PC");2309 log_to_screen(_("User has chosen not to backup the PC")); 2310 2310 finish(1); 2311 2311 } … … 2323 2323 if (strlen(tmp) > 2) { 2324 2324 if (!popup_and_get_string 2325 ( "NTFS partitions",2326 "Please enter/confirm the NTFS partitions you wish to backup as well.",2325 (_("NTFS partitions"), 2326 _("Please enter/confirm the NTFS partitions you wish to backup as well."), 2327 2327 tmp, MAX_STR_LEN / 4)) { 2328 log_to_screen( "User has chosen not to backup the PC");2328 log_to_screen(_("User has chosen not to backup the PC")); 2329 2329 finish(1); 2330 2330 } … … 2334 2334 2335 2335 if (!popup_and_get_string 2336 ( "Exclude paths",2337 "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.",2336 (_("Exclude paths"), 2337 _("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."), 2338 2338 bkpinfo->exclude_paths, MAX_STR_LEN)) { 2339 log_to_screen( "User has chosen not to backup the PC");2339 log_to_screen(_("User has chosen not to backup the PC")); 2340 2340 finish(1); 2341 2341 } … … 2344 2344 bkpinfo->verify_data = 2345 2345 ask_me_yes_or_no 2346 ( "Will you want to verify your backups after Mondo has created them?");2346 (_("Will you want to verify your backups after Mondo has created them?")); 2347 2347 2348 2348 #ifndef __FreeBSD__ 2349 2349 if (!ask_me_yes_or_no 2350 ( "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."))2350 (_("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."))) 2351 2351 #endif 2352 2352 { … … 2355 2355 2356 2356 if (!ask_me_yes_or_no 2357 ( "Are you sure you want to proceed? Hit 'no' to abort.")) {2358 log_to_screen( "User has chosen not to backup the PC");2357 (_("Are you sure you want to proceed? Hit 'no' to abort."))) { 2358 log_to_screen(_("User has chosen not to backup the PC")); 2359 2359 finish(1); 2360 2360 }
Note:
See TracChangeset
for help on using the changeset viewer.