Index: /trunk/gsdl/bin/script/buildcol.pl
===================================================================
--- /trunk/gsdl/bin/script/buildcol.pl	(revision 5093)
+++ /trunk/gsdl/bin/script/buildcol.pl	(revision 5094)
@@ -131,5 +131,5 @@
 
 my $options = { 'name' => "buildcol.pl",
-		'desc' => "PERL script used to build a greenstone collection from GML documents.",
+		'desc' => "{buildcol.desc}",
 		'args' => $arguments };
 
@@ -143,5 +143,5 @@
     print STDERR "<Info>\n";
     print STDERR "  <Name>$options->{'name'}</Name>\n";
-    print STDERR "  <Desc>$options->{'desc'}</Desc>\n";
+    print STDERR "  <Desc>" . &lookup_string($options->{'desc'}) . "</Desc>\n";
     print STDERR "  <Arguments>\n";
     if (defined($options->{'args'})) {
@@ -167,5 +167,6 @@
 
     # Produce the usage information using the data structure above
-    print STDERR " usage: $programname [options] collection-name\n\n";
+    print STDERR " " . &lookup_string("{common.usage}") . ": $programname";
+    print STDERR " " . &lookup_string("{buildcol.params}") . "\n\n";
 
     # Display the program options, if there are some
@@ -174,9 +175,15 @@
 	local $optiondescoffset = $descoffset + 2;  # 2 spaces between options & descriptions
 
-	print STDERR " options:\n";
+	print STDERR " " . &lookup_string("{common.options}") . ":\n";
 
 	# Display the program options
 	&PrintUsage::print_options_txt($language, $programargs, $optiondescoffset);
     }
+}
+
+
+sub lookup_string
+{
+    return &PrintUsage::lookup_string($language, shift(@_));
 }
 
@@ -269,5 +276,6 @@
     my $close_out = 0;
     if ($out !~ /^(STDERR|STDOUT)$/i) {
-	open (OUT, ">$out") || die "Couldn't open output file $out\n";
+	open (OUT, ">$out") ||
+	    die &lookup_string("{common.cannot_open_output_file}") . " $out\n";
 	$out = "buildcol::OUT";
 	$close_out = 1;
@@ -287,5 +295,6 @@
     # this could potentially create a situation where the faillog keeps being added 
     # to over multiple builds (if the import process is being skipped)
-    open (FAILLOG, ">>$faillog") || die "Couldn't open fail log $faillog\n";
+    open (FAILLOG, ">>$faillog")
+	|| die &lookup_string("{common.cannot_open_fail_log}") . " $faillog\n";
     $faillog = 'buildcol::FAILLOG';
     $faillog->autoflush(1);
@@ -362,7 +371,7 @@
 	
     } else {
-	die "Couldn't find the configuration file $configfilename\n";
-    }
-        
+	die &lookup_string("{common.cannot_find_cfg_file}") . " $configfilename\n";
+    }
+
     #set the text index
     if ($buildtype eq "mgpp") {
@@ -394,5 +403,6 @@
     # update the archive cache if needed
     if ($cachedir) {
-	print $out "Updating archive cache\n" if ($verbosity >= 1);
+	print $out &lookup_string("{buildcol.updating_archive_cache}") . "\n"
+	    if ($verbosity >= 1);
 
 	$cachedir =~ s/[\\\/]+$//;
@@ -455,5 +465,5 @@
 	$builder->make_infodatabase();
     } else {
-	die "unknown mode: $mode\n";
+	die &lookup_string("{buildcol.unknown_mode}") . " $mode\n";
     }
 
@@ -462,5 +472,6 @@
     
     if (($realbuilddir ne $builddir) && !$debug) {
-	print $out "Copying back the cached build\n" if ($verbosity >= 1);
+	print $out &lookup_string("{buildcol.copying_back_cached_build}") . "\n"
+	    if ($verbosity >= 1);
 	&util::rm_r ($builddir);
 	&util::cp_r ($realbuilddir, $builddir);
@@ -476,6 +487,6 @@
     my $image_script = &util::filename_cat ($ENV{'GSDLHOME'}, "bin", "script", "gimp", "title_icon-1.2.pl");
     if (!-e $image_script) {
-	print $out "WARNING: Image making script ($image_script) could not be found\n";
-	print $out "         Default images will not be generated\n\n";
+	print $out &lookup_string("{buildcol.no_image_script}") . ": $image_script.";
+	print $out &lookup_string("{buildcol.no_default_images}") . "\n\n";
 	return;
     }
@@ -492,6 +503,6 @@
     # to be changed when the config file format changes)
     if (!open (CFGFILE, $configfilename)) {
-	print $out "WARNING: Couldn't open config file ($configfilename)\n";
-	print $out "         for updating so collection images may not be linked correctly\n";
+	print $out &lookup_string("{buildcol.cannot_open_cfg_file}") . ": $configfilename\n";
+	print $out &lookup_string("{buildcol.unlinked_col_images}") . "\n";
 	return;
     }
@@ -515,6 +526,6 @@
 
     if (!open (CFGFILE, ">$configfilename")) {
-	print $out "WARNING: Couldn't open config file ($configfilename)\n";
-	print $out "         for updating so collection images may not be linked correctly\n";
+	print $out &lookup_string("{buildcol.cannot_open_cfg_file}") . ": $configfilename\n";
+	print $out &lookup_string("{buildcol.unlinked_col_images}") . "\n";
 	return;
     }
