Changeset 507 in MondoRescue for trunk/mondo/mondo/mondoarchive/main.c
- Timestamp:
- Apr 30, 2006, 2:04:16 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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 }
Note:
See TracChangeset
for help on using the changeset viewer.