Explorar el Código

v.vol.rst: translate error/warning messages

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@60669 15284696-431f-4ddb-bdfa-cd5b030d7da7
Huidae Cho hace 11 años
padre
commit
657e07c4b0

+ 3 - 2
vector/v.vol.rst/dataoct.c

@@ -29,6 +29,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <grass/gis.h>
+#include <grass/glocale.h>
 #include "dataoct.h"
 #include "externs.h"
 #include "user.h"
@@ -192,7 +193,7 @@ struct octdata **oct_divide_data(struct octdata *data)
 
     if ((data->n_cols <= 1) || (data->n_rows <= 1)) {
 	clean_fatal_error
-	    ("Points are too concentrated -- please increase DMIN");
+	    (_("Points are too concentrated -- please increase DMIN"));
     }
 
     if (data->n_cols % 2 == 0) {
@@ -240,7 +241,7 @@ struct octdata **oct_divide_data(struct octdata *data)
     for (i = 0; i < data->n_points; i++) {
 	comp = oct_compare(data->points + i, data);
 	if ((comp < 1) || (comp > NUMLEAFS)) {
-	    clean_fatal_error("Point out of range");
+	    clean_fatal_error(_("Point out of range"));
 	}
 	oct_add_data(data->points + i, datas[comp]);
     }

+ 19 - 19
vector/v.vol.rst/main.c

@@ -491,8 +491,8 @@ int main(int argc, char *argv[])
 	(cellinp != NULL || outz != NULL || cellout != NULL ||
 	 gradient != NULL || aspect1 != NULL || aspect2 != NULL ||
 	 ncurv != NULL || gcurv != NULL || mcurv != NULL || devi != NULL))
-	G_fatal_error("Crossvalidation cannot be computed simultanuously "
-                      "with output grids or devi file");
+	G_fatal_error(_("Crossvalidation cannot be computed simultanuously "
+                      "with output grids or devi file"));
 
     z_orig_in = z_orig;
     tb_res_in = tb_res;
@@ -507,46 +507,46 @@ int main(int argc, char *argv[])
     /***************        KMAX2 = GRADPARAM1*npmax;***************/
     az = (double *)G_malloc(sizeof(double) * (n_cols + 1));
     if (!az)
-	G_fatal_error("Not enough memory for az");
+	G_fatal_error(_("Not enough memory for az"));
     adx = (double *)G_malloc(sizeof(double) * (n_cols + 1));
     if (!adx)
-	G_fatal_error("Not enough memory for adx");
+	G_fatal_error(_("Not enough memory for adx"));
     ady = (double *)G_malloc(sizeof(double) * (n_cols + 1));
     if (!ady)
-	G_fatal_error("Not enough memory for ady");
+	G_fatal_error(_("Not enough memory for ady"));
     adxx = (double *)G_malloc(sizeof(double) * (n_cols + 1));
     if (!adxx)
-	G_fatal_error("Not enough memory for adxx");
+	G_fatal_error(_("Not enough memory for adxx"));
     adyy = (double *)G_malloc(sizeof(double) * (n_cols + 1));
     if (!adyy)
-	G_fatal_error("Not enough memory for adyy");
+	G_fatal_error(_("Not enough memory for adyy"));
     adxy = (double *)G_malloc(sizeof(double) * (n_cols + 1));
     if (!adxy)
-	G_fatal_error("Not enough memory for adxy");
+	G_fatal_error(_("Not enough memory for adxy"));
     adz = (double *)G_malloc(sizeof(double) * (n_cols + 1));
     if (!adz)
-	G_fatal_error("Not enough memory for adz");
+	G_fatal_error(_("Not enough memory for adz"));
     adxz = (double *)G_malloc(sizeof(double) * (n_cols + 1));
     if (!adxz)
-	G_fatal_error("Not enough memory for adxz");
+	G_fatal_error(_("Not enough memory for adxz"));
     adyz = (double *)G_malloc(sizeof(double) * (n_cols + 1));
     if (!adyz)
-	G_fatal_error("Not enough memory for adyz");
+	G_fatal_error(_("Not enough memory for adyz"));
     adzz = (double *)G_malloc(sizeof(double) * (n_cols + 1));
     if (!adzz)
-	G_fatal_error("Not enough memory for adzz");
+	G_fatal_error(_("Not enough memory for adzz"));
 
 
     if ((data =
 	 data_new(x_orig, y_orig, z_orig, n_rows, n_cols, n_levs, 0)) == NULL)
-	G_fatal_error("Unable to create octdata");
+	G_fatal_error(_("Unable to create octdata"));
     if ((functions =
 	 OT_functions_new(oct_compare, oct_divide_data, oct_add_data,
 			  oct_intersect, oct_division_check,
 			  oct_get_points)) == NULL)
-	G_fatal_error("Unable to create octfunc");
+	G_fatal_error(_("Unable to create octfunc"));
     if ((tree = OT_tree_new(data, NULL, NULL, functions, 0)) == NULL)
-	G_fatal_error("Unable to create octtree");
+	G_fatal_error(_("Unable to create octtree"));
 
     root = tree;
 
@@ -555,7 +555,7 @@ int main(int argc, char *argv[])
      */
     if (TESTOUT) {
 	if ((fd4 = fopen("testout", "w+")) == NULL)
-	    G_fatal_error("Unable to open testout");
+	    G_fatal_error(_("Unable to open testout"));
     }
 
     Vect_set_open_level(1);
@@ -621,12 +621,12 @@ int main(int argc, char *argv[])
 	    fdcout = Rast_open_fp_new(cellout);
 	    zero_array_cell = (FCELL *) G_malloc(sizeof(FCELL) * n_cols);
 	    if (!zero_array_cell)
-		clean_fatal_error("Not enough memory for zero_array_cell\n");
+		clean_fatal_error(_("Not enough memory for zero_array_cell"));
 	    for (i = 0; i < n_cols; i++)
 		zero_array_cell[i] = 0;
 	    Tmp_file_cell = G_tempfile();
 	    if (NULL == (Tmp_fd_cell = fopen(Tmp_file_cell, "w+"))) {
-		sprintf(msg, "Can't open temp file [%s] ", Tmp_file_cell);
+		sprintf(msg, _("Unable to open temp file '%s'"), Tmp_file_cell);
 		clean_fatal_error(msg);
 	    }
 	    /* filling temp file with zeroes */
@@ -637,7 +637,7 @@ int main(int argc, char *argv[])
 		    clean_fatal_error(_("Not enough disk space - cannot write temp files"));
 	    }
 	} else
-	  G_warning("Unable to create cellout raster map without cellinp");
+	  G_warning(_("Unable to create cellout raster map without cellinp"));
 	ertot = 0.;
         
 	out_cond1 = (outz != NULL) || (gradient != NULL) || (aspect1 != NULL)

+ 45 - 45
vector/v.vol.rst/user1.c

@@ -109,7 +109,7 @@ int INPUT(struct Map_info *In, char *column, char *scol, char *wheresql)
 	G_fatal_error(_("Column type of wcolumn is not supported (must be integer or double)"));
 
     if (nrec < 0)
-	G_fatal_error("Unable to select data from table");
+	G_fatal_error(_("Unable to select data from table"));
     G_message("%d records selected from table", nrec);
 
     if (scol != NULL) {
@@ -120,10 +120,10 @@ int INPUT(struct Map_info *In, char *column, char *scol, char *wheresql)
 	sctype = cvarr.ctype;
 
 	if (sctype == -1)
-	    G_fatal_error("Cannot read column type of smooth column");
+	    G_fatal_error(_("Cannot read column type of smooth column"));
 	if (sctype == DB_C_TYPE_DATETIME)
 	    G_fatal_error
-		("Column type of smooth column (datetime) is not supported");
+		(_("Column type of smooth column (datetime) is not supported"));
 	if (sctype != DB_C_TYPE_INT && sctype != DB_C_TYPE_DOUBLE)
 	    G_fatal_error(_("Column type of smooth column is not supported (must be integer or double)"));
     }
@@ -137,7 +137,7 @@ int INPUT(struct Map_info *In, char *column, char *scol, char *wheresql)
 	int ival, type, ret;
 
 	if (-1 == (type = Vect_read_next_line(In, Points, Cats)))
-	    G_fatal_error("Unable to read vector map");
+	    G_fatal_error(_("Unable to read vector map"));
 
 	if (type == -2)
 	    break;		/* EOF */
@@ -147,7 +147,7 @@ int INPUT(struct Map_info *In, char *column, char *scol, char *wheresql)
 
 	Vect_cat_get(Cats, 1, &cat);
 	if (cat < 0) {
-	    G_warning("Point without category");
+	    G_warning(_("Point without category"));
 	    continue;
 	}
 
@@ -205,13 +205,13 @@ int INPUT(struct Map_info *In, char *column, char *scol, char *wheresql)
 	    ((c1 >= 0) && (c2 >= 0) && (c3 >= 0) && (c4 >= 0) && (c5 >= 0) &&
 	     (c6 >= 0))) {
 	    if (!OUTRANGE) {
-		G_warning("some points outside of region -- will ignore...");
+		G_warning(_("Some points outside of region -- will ignore..."));
 	    }
 	    OUTRANGE++;
 	}
 	else {
 	    if (!(point = point_new(x, y, z, w, sm))) {
-		clean_fatal_error("Cannot allocate memory for point");
+		clean_fatal_error(_("Cannot allocate memory for point"));
 	    }
 
 	    a = OT_insert_oct(point, root);
@@ -219,7 +219,7 @@ int INPUT(struct Map_info *In, char *column, char *scol, char *wheresql)
 		NPOINT++;
 	    }
 	    if (a < 0) {
-		G_warning("Can't insert %lf,%lf,%lf,%lf,%lf a=%d\n", x, y, z,
+		G_warning(_("Can't insert %lf,%lf,%lf,%lf,%lf a=%d"), x, y, z,
 			  w, sm, a);
 		return -1;
 	    }
@@ -266,7 +266,7 @@ int INPUT(struct Map_info *In, char *column, char *scol, char *wheresql)
 
 	if (!once) {
 	    once = 1;
-	    G_warning("strip exists with insufficient data");
+	    G_warning(_("Strip exists with insufficient data"));
 	}
     }
 
@@ -275,7 +275,7 @@ int INPUT(struct Map_info *In, char *column, char *scol, char *wheresql)
 			    ((struct octdata *)(root->data))->y_orig,
 			    ((struct octdata *)(root->data))->z_orig, nz);
     if (!totsegm)
-	clean_fatal_error("Zero segments!");
+	clean_fatal_error(_("Zero segments!"));
 
     ((struct octdata *)(root->data))->x_orig = 0;
     ((struct octdata *)(root->data))->y_orig = 0;
@@ -305,17 +305,17 @@ int INPUT(struct Map_info *In, char *column, char *scol, char *wheresql)
     fprintf(stderr, "\n");
     if (OUTRANGE > 0)
 	G_warning
-	    ("There are points outside specified 2D/3D region--ignored %d points (total points: %d)",
+	    (_("There are points outside specified 2D/3D region--ignored %d points (total points: %d)"),
 	     OUTRANGE, k);
     if (NPOINT > 0)
 	G_warning
-	    ("Points are more dense than specified 'DMIN'--ignored %d points (remain %d)",
+	    (_("Points are more dense than specified 'DMIN'--ignored %d points (remain %d)"),
 	     NPOINT, k - NPOINT);
     NPOINT = k - NPOINT - NPT - OUTRANGE;
     if (NPOINT < KMIN) {
 	if (NPOINT != 0) {
 	    G_warning
-		("%d points given for interpolation (after thinning) is less than given NPMIN=%d",
+		(_("%d points given for interpolation (after thinning) is less than given NPMIN=%d"),
 		 NPOINT, KMIN);
 	    KMIN = NPOINT;
 	}
@@ -335,7 +335,7 @@ int INPUT(struct Map_info *In, char *column, char *scol, char *wheresql)
 
     if (NPOINT < KMAXPOINTS && KMAX != KMAXPOINTS)
 	G_warning
-	    ("There is less than %d points for interpolation, no segmentation is necessary, to run the program faster, set segmax=%d (see manual)",
+	    (_("There is less than %d points for interpolation, no segmentation is necessary, to run the program faster, set segmax=%d (see manual)"),
 	     KMAXPOINTS, KMAXPOINTS);
 
     deltx = xmax - xmin;
@@ -361,7 +361,7 @@ int INPUT(struct Map_info *In, char *column, char *scol, char *wheresql)
     if (maskmap != NULL) {
 	mapsetm = G_find_raster2(maskmap, "");
 	if (!mapsetm) {
-	    sprintf(buf, "mask raster map [%s] not found\n", maskmap);
+	    sprintf(buf, _("Mask raster map [%s] not found"), maskmap);
 	    clean_fatal_error(buf);
 	}
 	bitmask = BM_create(nsizc, nsizr);
@@ -377,7 +377,7 @@ int INPUT(struct Map_info *In, char *column, char *scol, char *wheresql)
 		    BM_set(bitmask, j, irev, 1);
 	    }
 	}
-	G_message("bitmap mask created");
+	G_message("Bitmap mask created");
     }
 
     return 1;
@@ -417,7 +417,7 @@ int OUTGR()
     current_region.top = nsizl * tb_res_in + z_orig_in;
 
     if (!(data = (float *)G_malloc(sizeof(float) * nsizr * nsizc * nsizl))) {
-	clean_fatal_error("Error: out of memory");
+	clean_fatal_error(_("Out of memory"));
     }
 
   /*** Write elevation results ***/
@@ -425,7 +425,7 @@ int OUTGR()
 
 	cf1 = Rast3d_open_new_opt_tile_size(outz, RASTER3D_USE_CACHE_DEFAULT, &current_region, FCELL_TYPE, 32); 
 	if (cf1 == NULL) {
-	    sprintf(buff, "Can't open %s for writing ", outz);
+	    sprintf(buff, _("Unable to open %s for writing"), outz);
 	    clean_fatal_error(buff);
 	}
 
@@ -436,7 +436,7 @@ int OUTGR()
 	read_val =
 	    fread(data, sizeof(float), nsizr * nsizc * nsizl, Tmp_fd_z);
 	if (read_val < 0)
-	    clean_fatal_error("Cannot read data from temp file");
+	    clean_fatal_error(_("Unable to read data from temp file"));
 
 	cnt = 0;
 	for (iarc = 0; iarc < nsizl; iarc++) {
@@ -452,7 +452,7 @@ int OUTGR()
 			Rast3d_set_null_value(&value, 1, FCELL_TYPE);
 		    if (Rast3d_put_float(cf1, x, y, iarc, value) == 0) {
 			sprintf(buff,
-				"Error writing cell (%d,%d,%d) with value %f",
+				_("Error writing cell (%d,%d,%d) with value %f"),
 				x, y, iarc, value);
 			clean_fatal_error(buff);
 		    }
@@ -465,7 +465,7 @@ int OUTGR()
 
 	/* Close the file */
 	if (Rast3d_close(cf1) == 0) {
-	    sprintf(buff, "Error closing output file %s ", outz);
+	    sprintf(buff, _("Error closing output file %s"), outz);
 	    clean_fatal_error(buff);
 	} else
             G_message(_("3D raster map <%s> created"), outz);
@@ -476,7 +476,7 @@ int OUTGR()
 
 	cf2 = Rast3d_open_new_opt_tile_size(gradient, RASTER3D_USE_CACHE_DEFAULT, &current_region, FCELL_TYPE, 32); 
 	if (cf2 == NULL) {
-	    sprintf(buff, "Can't open %s for writing ", gradient);
+	    sprintf(buff, _("Unable to open %s for writing"), gradient);
 	    clean_fatal_error(buff);
 	}
 
@@ -487,7 +487,7 @@ int OUTGR()
 	read_val =
 	    fread(data, sizeof(float), nsizr * nsizc * nsizl, Tmp_fd_dx);
 	if (read_val < 0)
-	    clean_fatal_error("Cannot read data from temp file");
+	    clean_fatal_error(_("Unable to read data from temp file"));
 
 	cnt = 0;
 	for (iarc = 0; iarc < nsizl; iarc++) {
@@ -503,7 +503,7 @@ int OUTGR()
 			Rast3d_set_null_value(&value, 1, FCELL_TYPE);
 		    if (Rast3d_put_float(cf2, x, y, iarc, value) == 0) {
 			sprintf(buff,
-				"Error writing cell (%d,%d,%d) with value %f",
+				_("Error writing cell (%d,%d,%d) with value %f"),
 				x, y, iarc, value);
 			clean_fatal_error(buff);
 		    }
@@ -516,7 +516,7 @@ int OUTGR()
 
 	/* Close the file */
 	if (Rast3d_close(cf2) == 0) {
-	    sprintf(buff, "Error closing output file %s ", gradient);
+	    sprintf(buff, _("Error closing output file %s"), gradient);
 	    clean_fatal_error(buff);
 	} else
             G_message(_("3D raster map <%s> created"), gradient);
@@ -527,7 +527,7 @@ int OUTGR()
 
 	cf3 = Rast3d_open_new_opt_tile_size(aspect1, RASTER3D_USE_CACHE_DEFAULT, &current_region, FCELL_TYPE, 32); 
 	if (cf3 == NULL) {
-	    sprintf(buff, "Can't open %s for writing ", aspect1);
+	    sprintf(buff, _("Unable to open %s for writing"), aspect1);
 	    clean_fatal_error(buff);
 	}
 
@@ -538,7 +538,7 @@ int OUTGR()
 	read_val =
 	    fread(data, sizeof(float), nsizr * nsizc * nsizl, Tmp_fd_dy);
 	if (read_val < 0)
-	    clean_fatal_error("Cannot read data from temp file");
+	    clean_fatal_error(_("Unable to read data from temp file"));
 
 	cnt = 0;
 	for (iarc = 0; iarc < nsizl; iarc++) {
@@ -554,7 +554,7 @@ int OUTGR()
 			Rast3d_set_null_value(&value, 1, FCELL_TYPE);
 		    if (Rast3d_put_float(cf3, x, y, iarc, value) == 0) {
 			sprintf(buff,
-				"Error writing cell (%d,%d,%d) with value %f",
+				_("Error writing cell (%d,%d,%d) with value %f"),
 				x, y, iarc, value);
 			clean_fatal_error(buff);
 		    }
@@ -567,7 +567,7 @@ int OUTGR()
 
 	/* Close the file */
 	if (Rast3d_close(cf3) == 0) {
-	    sprintf(buff, "Error closing output file %s ", aspect1);
+	    sprintf(buff, _("Error closing output file %s"), aspect1);
 	    clean_fatal_error(buff);
 	} else
             G_message(_("3D raster map <%s> created"), aspect1);
@@ -578,7 +578,7 @@ int OUTGR()
 
 	cf4 = Rast3d_open_new_opt_tile_size(aspect2, RASTER3D_USE_CACHE_DEFAULT, &current_region, FCELL_TYPE, 32); 
 	if (cf4 == NULL) {
-	    sprintf(buff, "Can't open %s for writing ", aspect2);
+	    sprintf(buff, _("Unable to open %s for writing"), aspect2);
 	    clean_fatal_error(buff);
 	}
 
@@ -589,7 +589,7 @@ int OUTGR()
 	read_val =
 	    fread(data, sizeof(float), nsizr * nsizc * nsizl, Tmp_fd_dz);
 	if (read_val < 0)
-	    clean_fatal_error("Cannot read data from temp file");
+	    clean_fatal_error(_("Unable to read data from temp file"));
 
 	cnt = 0;
 	for (iarc = 0; iarc < nsizl; iarc++) {
@@ -605,7 +605,7 @@ int OUTGR()
 			Rast3d_set_null_value(&value, 1, FCELL_TYPE);
 		    if (Rast3d_put_float(cf4, x, y, iarc, value) == 0) {
 			sprintf(buff,
-				"Error writing cell (%d,%d,%d) with value %f",
+				_("Error writing cell (%d,%d,%d) with value %f"),
 				x, y, iarc, value);
 			clean_fatal_error(buff);
 		    }
@@ -618,7 +618,7 @@ int OUTGR()
 
 	/* Close the file */
 	if (Rast3d_close(cf4) == 0) {
-	    sprintf(buff, "Error closing output file %s ", aspect2);
+	    sprintf(buff, _("Error closing output file %s"), aspect2);
 	    clean_fatal_error(buff);
 	} else
             G_message(_("3D raster map <%s> created"), aspect2);
@@ -629,7 +629,7 @@ int OUTGR()
 
 	cf5 = Rast3d_open_new_opt_tile_size(ncurv, RASTER3D_USE_CACHE_DEFAULT, &current_region, FCELL_TYPE, 32); 
 	if (cf5 == NULL) {
-	    sprintf(buff, "Can't open %s for writing ", ncurv);
+	    sprintf(buff, _("Unable to open %s for writing"), ncurv);
 	    clean_fatal_error(buff);
 	}
 
@@ -640,7 +640,7 @@ int OUTGR()
 	read_val =
 	    fread(data, sizeof(float), nsizr * nsizc * nsizl, Tmp_fd_xx);
 	if (read_val < 0)
-	    clean_fatal_error("Cannot read data from temp file");
+	    clean_fatal_error(_("Unable to read data from temp file"));
 
 	cnt = 0;
 	for (iarc = 0; iarc < nsizl; iarc++) {
@@ -656,7 +656,7 @@ int OUTGR()
 			Rast3d_set_null_value(&value, 1, FCELL_TYPE);
 		    if (Rast3d_put_float(cf5, x, y, iarc, value) == 0) {
 			sprintf(buff,
-				"Error writing cell (%d,%d,%d) with value %f",
+				_("Error writing cell (%d,%d,%d) with value %f"),
 				x, y, iarc, value);
 			clean_fatal_error(buff);
 		    }
@@ -669,7 +669,7 @@ int OUTGR()
 
 	/* Close the file */
 	if (Rast3d_close(cf5) == 0) {
-	    sprintf(buff, "Error closing output file %s ", ncurv);
+	    sprintf(buff, _("Error closing output file %s"), ncurv);
 	    clean_fatal_error(buff);
 	} else
             G_message(_("3D raster map <%s> created"), ncurv);
@@ -680,7 +680,7 @@ int OUTGR()
 
 	cf6 = Rast3d_open_new_opt_tile_size(gcurv, RASTER3D_USE_CACHE_DEFAULT, &current_region, FCELL_TYPE, 32); 
 	if (cf6 == NULL) {
-	    sprintf(buff, "Can't open %s for writing ", gcurv);
+	    sprintf(buff, _("Unable to open %s for writing"), gcurv);
 	    clean_fatal_error(buff);
 	}
 
@@ -691,7 +691,7 @@ int OUTGR()
 	read_val =
 	    fread(data, sizeof(float), nsizr * nsizc * nsizl, Tmp_fd_yy);
 	if (read_val < 0)
-	    clean_fatal_error("Cannot read data from temp file");
+	    clean_fatal_error(_("Unable to read data from temp file"));
 
 	cnt = 0;
 	for (iarc = 0; iarc < nsizl; iarc++) {
@@ -707,7 +707,7 @@ int OUTGR()
 			Rast3d_set_null_value(&value, 1, FCELL_TYPE);
 		    if (Rast3d_put_float(cf6, x, y, iarc, value) == 0) {
 			sprintf(buff,
-				"Error writing cell (%d,%d,%d) with value %f",
+				_("Error writing cell (%d,%d,%d) with value %f"),
 				x, y, iarc, value);
 			clean_fatal_error(buff);
 		    }
@@ -720,7 +720,7 @@ int OUTGR()
 
 	/* Close the file */
 	if (Rast3d_close(cf6) == 0) {
-	    sprintf(buff, "Error closing output file %s ", gcurv);
+	    sprintf(buff, _("Error closing output file %s"), gcurv);
 	    clean_fatal_error(buff);
 	} else
             G_message(_("3D raster map <%s> created"), gcurv);
@@ -731,7 +731,7 @@ int OUTGR()
 
 	cf7 = Rast3d_open_new_opt_tile_size(mcurv, RASTER3D_USE_CACHE_DEFAULT, &current_region, FCELL_TYPE, 32); 
 	if (cf7 == NULL) {
-	    sprintf(buff, "Can't open %s for writing ", mcurv);
+	    sprintf(buff, _("Unable to open %s for writing"), mcurv);
 	    clean_fatal_error(buff);
 	}
 
@@ -742,7 +742,7 @@ int OUTGR()
 	read_val =
 	    fread(data, sizeof(float), nsizr * nsizc * nsizl, Tmp_fd_xy);
 	if (read_val < 0)
-	    clean_fatal_error("Cannot read data from temp file");
+	    clean_fatal_error(_("Unable to read data from temp file"));
 
 	cnt = 0;
 	for (iarc = 0; iarc < nsizl; iarc++) {
@@ -758,7 +758,7 @@ int OUTGR()
 			Rast3d_set_null_value(&value, 1, FCELL_TYPE);
 		    if (Rast3d_put_float(cf7, x, y, iarc, value) == 0) {
 			sprintf(buff,
-				"Error writing cell (%d,%d,%d) with value %f",
+				_("Error writing cell (%d,%d,%d) with value %f"),
 				x, y, iarc, value);
 			clean_fatal_error(buff);
 		    }
@@ -771,7 +771,7 @@ int OUTGR()
 
 	/* Close the file */
 	if (Rast3d_close(cf7) == 0) {
-	    sprintf(buff, "Error closing output file %s ", mcurv);
+	    sprintf(buff, _("Error closing output file %s"), mcurv);
 	    clean_fatal_error(buff);
 	} else
             G_message(_("3D raster map <%s> created"), mcurv);

+ 6 - 5
vector/v.vol.rst/user2.c

@@ -30,6 +30,7 @@
 #include <math.h>
 #include <stdlib.h>
 #include <grass/gis.h>
+#include <grass/glocale.h>
 
 #include "oct.h"
 #include "surf.h"
@@ -117,7 +118,7 @@ int interp_call(struct octtree *root, struct octtree *tree)
 		(points =
 		 (struct quadruple *)G_malloc(sizeof(struct quadruple) *
 					      (KMAX2 + 1))))
-		clean_fatal_error("Not enough memory for points");
+		clean_fatal_error(_("Not enough memory for points"));
 	}
 
 	/*           if(!(point=(struct point_3d*)G_malloc(sizeof(struct point_3d)*(KMAX2+1))))
@@ -206,13 +207,13 @@ int interp_call(struct octtree *root, struct octtree *tree)
 		    (A =
 		     (double *)G_malloc(sizeof(double) *
 					((KMAX2 + 1) * (KMAX2 + 2) + 1)))) {
-		    clean_fatal_error("Cannot allocate A");
+		    clean_fatal_error(_("Cannot allocate A"));
 		}
 		if (!(b = (double *)G_malloc(sizeof(double) * (KMAX2 + 2)))) {
-		    clean_fatal_error("Cannot allocate b");
+		    clean_fatal_error(_("Cannot allocate b"));
 		}
 		if (!(w = (double *)G_malloc(sizeof(double) * (KMAX2 + 1)))) {
-		    clean_fatal_error("Cannot allocate w");
+		    clean_fatal_error(_("Cannot allocate w"));
 		}
 	    }
 	}
@@ -222,7 +223,7 @@ int interp_call(struct octtree *root, struct octtree *tree)
 	if (!
 	    (point =
 	     (struct point_3d *)G_malloc(sizeof(struct point_3d) * (npt))))
-	    clean_fatal_error("Not enough memory for points");
+	    clean_fatal_error(_("Not enough memory for points"));
 
 	/* cv stuff */
 

+ 13 - 12
vector/v.vol.rst/user3.c

@@ -35,6 +35,7 @@
 #include <grass/raster.h>
 #include <grass/vector.h>
 #include <grass/dbmi.h>
+#include <grass/glocale.h>
 
 #include "oct.h"
 #include "surf.h"
@@ -268,15 +269,15 @@ COGRR1(double x_or, double y_or, double z_or, int n_rows, int n_cols,
 
     if (!w2) {
 	if (!(w2 = (double *)G_malloc(sizeof(double) * (KMAX2 + 1))))
-	    clean_fatal_error("Cannot allocate w2");
+	    clean_fatal_error(_("Cannot allocate w2"));
     }
     if (!wz2) {
 	if (!(wz2 = (double *)G_malloc(sizeof(double) * (KMAX2 + 1))))
-	    clean_fatal_error("Cannot allocate wz2");
+	    clean_fatal_error(_("Cannot allocate wz2"));
     }
     if (!wz1) {
 	if (!(wz1 = (double *)G_malloc(sizeof(double) * (KMAX2 + 1))))
-	    clean_fatal_error("Cannot allocate wz1");
+	    clean_fatal_error(_("Cannot allocate wz1"));
     }
 
     if (cell == NULL)
@@ -536,7 +537,7 @@ COGRR1(double x_or, double y_or, double z_or, int n_rows, int n_cols,
 			|| (ncurv != NULL) || (gcurv != NULL) ||
 			(mcurv != NULL))
 			if (!(secpar_loop(ngstc, nszc, l)))
-			    clean_fatal_error("Secpar_loop failed");
+			    clean_fatal_error(_("Secpar_loop failed"));
 		    if ((cellinp != NULL) && (cellout != NULL) &&
 			(i == ngstl)) {
 			zero_array_cell[l - 1] = (FCELL) (wwcell);
@@ -574,7 +575,7 @@ COGRR1(double x_or, double y_or, double z_or, int n_rows, int n_cols,
 			 (zero_array_cell + ind1, sizeof(FCELL),
 			  nszc - ngstc + 1, Tmp_fd_cell)))
 			clean_fatal_error
-			    ("Not enough disk space--cannot write files");
+			    (_("Not enough disk space--cannot write files"));
 		}
 		if (outz != NULL) {
 		    G_fseek(Tmp_fd_z, (off_t)(offset2 * sizeof(float)), 0);
@@ -583,7 +584,7 @@ COGRR1(double x_or, double y_or, double z_or, int n_rows, int n_cols,
 			 (zero_array1 + ind1, sizeof(float), nszc - ngstc + 1,
 			  Tmp_fd_z)))
 			clean_fatal_error
-			    ("Not enough disk space--cannot write files");
+			    (_("Not enough disk space--cannot write files"));
 		}
 		if (gradient != NULL) {
 		    G_fseek(Tmp_fd_dx, (off_t)(offset2 * sizeof(float)), 0);
@@ -592,7 +593,7 @@ COGRR1(double x_or, double y_or, double z_or, int n_rows, int n_cols,
 			 (zero_array2 + ind1, sizeof(float), nszc - ngstc + 1,
 			  Tmp_fd_dx)))
 			clean_fatal_error
-			    ("Not enough disk space--cannot write files");
+			    (_("Not enough disk space--cannot write files"));
 		}
 		if (aspect1 != NULL) {
 		    G_fseek(Tmp_fd_dy, (off_t)(offset2 * sizeof(float)), 0);
@@ -601,7 +602,7 @@ COGRR1(double x_or, double y_or, double z_or, int n_rows, int n_cols,
 			 (zero_array3 + ind1, sizeof(float), nszc - ngstc + 1,
 			  Tmp_fd_dy)))
 			clean_fatal_error
-			    ("Not enough disk space--cannot write files");
+			    (_("Not enough disk space--cannot write files"));
 		}
 		if (aspect2 != NULL) {
 		    G_fseek(Tmp_fd_dz, (off_t)(offset2 * sizeof(float)), 0);
@@ -610,7 +611,7 @@ COGRR1(double x_or, double y_or, double z_or, int n_rows, int n_cols,
 			 (zero_array4 + ind1, sizeof(float), nszc - ngstc + 1,
 			  Tmp_fd_dz)))
 			clean_fatal_error
-			    ("Not enough disk space--cannot write files");
+			    (_("Not enough disk space--cannot write files"));
 		}
 		if (ncurv != NULL) {
 		    G_fseek(Tmp_fd_xx, (off_t)(offset2 * sizeof(float)), 0);
@@ -619,7 +620,7 @@ COGRR1(double x_or, double y_or, double z_or, int n_rows, int n_cols,
 			 (zero_array5 + ind1, sizeof(float), nszc - ngstc + 1,
 			  Tmp_fd_xx)))
 			clean_fatal_error
-			    ("Not enough disk space--cannot write files");
+			    (_("Not enough disk space--cannot write files"));
 		}
 		if (gcurv != NULL) {
 		    G_fseek(Tmp_fd_yy, (off_t)(offset2 * sizeof(float)), 0);
@@ -628,7 +629,7 @@ COGRR1(double x_or, double y_or, double z_or, int n_rows, int n_cols,
 			 (zero_array6 + ind1, sizeof(float), nszc - ngstc + 1,
 			  Tmp_fd_yy)))
 			clean_fatal_error
-			    ("Not enough disk space--cannot write files");
+			    (_("Not enough disk space--cannot write files"));
 		}
 		if (mcurv != NULL) {
 		    G_fseek(Tmp_fd_xy, (off_t)(offset2 * sizeof(float)), 0);
@@ -637,7 +638,7 @@ COGRR1(double x_or, double y_or, double z_or, int n_rows, int n_cols,
 			 (zero_array7 + ind1, sizeof(float), nszc - ngstc + 1,
 			  Tmp_fd_xy)))
 			clean_fatal_error
-			    ("Not enough disk space--cannot write files");
+			    (_("Not enough disk space--cannot write files"));
 		}
 
 	    }

+ 2 - 1
vector/v.vol.rst/vector.c

@@ -34,6 +34,7 @@
 #include <grass/gis.h>
 #include <grass/vector.h>
 #include <grass/dbmi.h>
+#include <grass/glocale.h>
 
 #include "oct.h"
 #include "surf.h"
@@ -76,7 +77,7 @@ int point_save(double xmm, double ymm, double zmm, double err)
     if (db_execute_immediate(driver, &sql) != DB_OK) {
 	db_close_database(driver);
 	db_shutdown_driver(driver);
-	G_fatal_error("Cannot insert new row: %s", db_get_string(&sql));
+	G_fatal_error(_("Cannot insert new row: %s"), db_get_string(&sql));
     }
     count++;