This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
- version 2 as ammended with additional clauses defined in the
+ version 2 as amended with additional clauses defined in the
file LICENSE in the main source directory.
This program is distributed in the hope that it will be useful,
{
fprintf(stderr, _(
"Copyright (C) 2001-2005 Kern Sibbald.\n"
-"\nVersion: " VERSION " (" BDATE ")\n\n"
+"\nVersion: %s (%s)\n\n"
"Usage: bscan [ options ] <bacula-archive>\n"
" -b bootstrap specify a bootstrap file\n"
" -c <file> specify configuration file\n"
" -v verbose\n"
" -V <Volumes> specify Volume names (separated by |)\n"
" -w <dir> specify working directory (default from conf file)\n"
-" -? print this message\n\n"));
+" -? print this message\n\n"), VERSION, BDATE);
exit(1);
}
struct stat stat_buf;
char *VolumeName = NULL;
+ setlocale(LC_ALL, "");
+ bindtextdomain("bacula", LOCALEDIR);
+ textdomain("bacula");
+
my_name_is(argc, argv, "bscan");
init_msg(NULL, NULL);
}
do_scan();
- printf("Records %sadded or updated in the catalog:\n%7d Media\n%7d Pool\n%7d Job\n%7d File\n",
- update_db?"":"would have been ",
- num_media, num_pools, num_jobs, num_files);
+ if (update_db) {
+ printf("Records added or updated in the catalog:\n%7d Media\n%7d Pool\n%7d Job\n%7d File\n",
+ num_media, num_pools, num_jobs, num_files);
+ }
+ else {
+ printf("Records would have been added or updated in the catalog:\n%7d Media\n%7d Pool\n%7d Job\n%7d File\n",
+ num_media, num_pools, num_jobs, num_files);
+ }
free_jcr(bjcr);
term_dev(dev);
if (showProgress) {
int pct = (mr.VolBytes * 100) / currentVolumeSize;
if (pct != last_pct) {
- fprintf(stdout, "done: %d%%\n", pct);
+ fprintf(stdout, _("done: %d%%\n"), pct);
fflush(stdout);
last_pct = pct;
}
update_db = save_update_db;
jr.PoolId = pr.PoolId;
+#ifdef xxx
/* Set start positions into JCR */
if (dev->is_tape()) {
/*
dcr->StartBlock = (uint32_t)dev->file_addr;
dcr->StartFile = (uint32_t)(dev->file_addr >> 32);
}
+#endif
mjcr->start_time = jr.StartTime;
mjcr->JobLevel = jr.JobLevel;
offline_dev(dev);
}
force_close_device(dev);
- fprintf(stderr, "Mount Volume \"%s\" on device %s and press return when ready: ",
+ fprintf(stderr, _("Mount Volume \"%s\" on device %s and press return when ready: "),
dcr->VolumeName, dev->print_name());
getchar();
return true;