[GRASS-SVN] r59731 - in grass/branches/releasebranch_7_0/vector: v.build.polylines v.category v.edit v.external v.extract v.in.ascii v.in.db v.kernel v.lidar.correction v.lrs/v.lrs.segment v.lrs/v.lrs.where v.net.distance v.out.ascii v.out.ogr v.out.postgis v.out.pov v.overlay v.sample v.segment v.surf.idw v.voronoi v.what.rast3

svn_grass at osgeo.org svn_grass at osgeo.org
Mon Apr 14 13:21:43 PDT 2014


Author: neteler
Date: 2014-04-14 13:21:43 -0700 (Mon, 14 Apr 2014)
New Revision: 59731

Modified:
   grass/branches/releasebranch_7_0/vector/v.build.polylines/main.c
   grass/branches/releasebranch_7_0/vector/v.category/main.c
   grass/branches/releasebranch_7_0/vector/v.edit/main.c
   grass/branches/releasebranch_7_0/vector/v.edit/select.c
   grass/branches/releasebranch_7_0/vector/v.external/list.c
   grass/branches/releasebranch_7_0/vector/v.extract/main.c
   grass/branches/releasebranch_7_0/vector/v.in.ascii/points.c
   grass/branches/releasebranch_7_0/vector/v.in.db/main.c
   grass/branches/releasebranch_7_0/vector/v.kernel/main.c
   grass/branches/releasebranch_7_0/vector/v.lidar.correction/main.c
   grass/branches/releasebranch_7_0/vector/v.lrs/v.lrs.segment/main.c
   grass/branches/releasebranch_7_0/vector/v.lrs/v.lrs.where/main.c
   grass/branches/releasebranch_7_0/vector/v.net.distance/main.c
   grass/branches/releasebranch_7_0/vector/v.out.ascii/main.c
   grass/branches/releasebranch_7_0/vector/v.out.ogr/main.c
   grass/branches/releasebranch_7_0/vector/v.out.postgis/main.c
   grass/branches/releasebranch_7_0/vector/v.out.pov/main.c
   grass/branches/releasebranch_7_0/vector/v.overlay/area_area.c
   grass/branches/releasebranch_7_0/vector/v.sample/main.c
   grass/branches/releasebranch_7_0/vector/v.segment/main.c
   grass/branches/releasebranch_7_0/vector/v.surf.idw/main.c
   grass/branches/releasebranch_7_0/vector/v.surf.idw/read_sites.c
   grass/branches/releasebranch_7_0/vector/v.voronoi/main.c
   grass/branches/releasebranch_7_0/vector/v.voronoi/sw_main.c
   grass/branches/releasebranch_7_0/vector/v.what.rast3/main.c
Log:
Enable plural forms for translatable messages of vector modules (backport from trunk, r59712)

Modified: grass/branches/releasebranch_7_0/vector/v.build.polylines/main.c
===================================================================
--- grass/branches/releasebranch_7_0/vector/v.build.polylines/main.c	2014-04-14 07:28:39 UTC (rev 59730)
+++ grass/branches/releasebranch_7_0/vector/v.build.polylines/main.c	2014-04-14 20:21:43 UTC (rev 59731)
@@ -223,9 +223,13 @@
 	polyline++;
     }
 
-    G_verbose_message(_("%d lines or boundaries found in input vector map"),
+    G_verbose_message(_n("%d line or boundaries found in input vector map",
+                         "%d lines or boundaries found in input vector map",
+                         nlines),
 		      nlines, Vect_get_name(&map), Vect_get_mapset(&map));
-    G_verbose_message(_("%d polylines stored in output vector map"),
+    G_verbose_message(_n("%d polyline stored in output vector map",
+                         "%d polylines stored in output vector map",
+                         polyline),
 		      polyline, Vect_get_name(&Out), Vect_get_mapset(&Out));
 
     /* Copy (all linked) tables if needed */

Modified: grass/branches/releasebranch_7_0/vector/v.category/main.c
===================================================================
--- grass/branches/releasebranch_7_0/vector/v.category/main.c	2014-04-14 07:28:39 UTC (rev 59730)
+++ grass/branches/releasebranch_7_0/vector/v.category/main.c	2014-04-14 20:21:43 UTC (rev 59731)
@@ -214,7 +214,9 @@
 	Clist->field = atoi(field_opt->answer);
 	ret = Vect_str_to_cat_list(id_opt->answer, Clist);
 	if (ret > 0) {
-	    G_warning(_("%d errors in id option"), ret);
+	    G_warning(_n("%d error in id option",
+                         "%d errors in id option",
+                         ret), ret);
 	}
     }
     else {
@@ -373,7 +375,9 @@
 		new_centr++;
 	    }
 	    if (new_centr > 0) 
-		G_message(_("%d new centroids placed in output map"), new_centr);
+		G_message(_n("%d new centroid placed in output map",
+                             "%d new centroids placed in output map",
+                             new_centr), new_centr);
 	}
 	break;
 
@@ -774,7 +778,9 @@
         for(i = 1; i < nfields; i++)
 	    G_important_message(_("Categories copied from layer %d to layer %d"),
 		                  fields[0], fields[i]);
-    G_done_msg(_("%d features modified."), nmodified);
+    G_done_msg(_n("%d feature modified.",
+                  "%d features modified.",
+                  nmodified), nmodified);
     Vect_close(&In);
 
     exit(EXIT_SUCCESS);

Modified: grass/branches/releasebranch_7_0/vector/v.edit/main.c
===================================================================
--- grass/branches/releasebranch_7_0/vector/v.edit/main.c	2014-04-14 07:28:39 UTC (rev 59730)
+++ grass/branches/releasebranch_7_0/vector/v.edit/main.c	2014-04-14 20:21:43 UTC (rev 59731)
@@ -268,7 +268,9 @@
 	    int iline;
 	    struct ilist *List_added;
 	    
-	    G_message(_("%d features added"), ret);
+	    G_message(_n("%d feature added",
+                         "%d features added",
+                         ret), ret);
 	    
 	    List_added = Vect_new_list();
 	    for (iline = num_lines + 1; iline <= Vect_get_num_lines(&Map); iline++)
@@ -286,14 +288,18 @@
 		int nclosed;
 
 		nclosed = close_lines(&Map, GV_BOUNDARY, thresh[THRESH_SNAP]);
-		G_message(_("%d boundaries closed"), nclosed);
+		G_message(_n("%d boundary closed",
+                             "%d boundaries closed",
+                             nclosed), nclosed);
 	    }
 	    Vect_destroy_list(List_added);
 	}
 	break;
     case MODE_DEL:
 	ret = Vedit_delete_lines(&Map, List);
-	G_message(_("%d features deleted"), ret);
+	G_message(_n("%d feature deleted",
+                     "%d features deleted",
+                     ret), ret);
 	break;
     case MODE_MOVE:
 	move_x = atof(params.move->answers[0]);
@@ -302,7 +308,9 @@
 	G_verbose_message(_("Threshold value for snapping is %.2f"),
 			  thresh[THRESH_SNAP]);
 	ret = Vedit_move_lines(&Map, BgMap, nbgmaps, List, move_x, move_y, move_z, snap, thresh[THRESH_SNAP]);
-	G_message(_("%d features moved"), ret);
+	G_message(_n("%d feature moved",
+                     "%d features moved",
+                     ret), ret);
 	break;
     case MODE_VERTEX_MOVE:
 	move_x = atof(params.move->answers[0]);
@@ -311,15 +319,21 @@
 	G_verbose_message(_("Threshold value for snapping is %.2f"),
 			  thresh[THRESH_SNAP]);
 	ret = Vedit_move_vertex(&Map, BgMap, nbgmaps, List, coord, thresh[THRESH_COORDS], thresh[THRESH_SNAP], move_x, move_y, move_z, move_first, snap);
-	G_message(_("%d vertices moved"), ret);
+	G_message(_n("%d vertex moved",
+                     "%d vertices moved",
+                     ret), ret);
 	break;
     case MODE_VERTEX_ADD:
 	ret = Vedit_add_vertex(&Map, List, coord, thresh[THRESH_COORDS]);
-	G_message(_("%d vertices added"), ret);
+	G_message(_n("%d vertex added",
+                     "%d vertices added",
+                     ret), ret);
 	break;
     case MODE_VERTEX_DELETE:
 	ret = Vedit_remove_vertex(&Map, List, coord, thresh[THRESH_COORDS]);
-	G_message(_("%d vertices removed"), ret);
+	G_message(_n("%d vertex removed",
+                     "%d vertices removed",
+                     ret), ret);
 	break;
     case MODE_BREAK:
 	if (params.coord->answer) {
@@ -329,28 +343,38 @@
 	else {
 	    ret = Vect_break_lines_list(&Map, List, NULL, GV_LINES, NULL);
 	}
-	G_message(_("%d lines broken"), ret);
+	G_message(_n("%d line broken",
+                     "%d lines broken",
+                     ret), ret);
 	break;
     case MODE_CONNECT:
 	G_verbose_message(_("Threshold value for snapping is %.2f"),
 			  thresh[THRESH_SNAP]);
 	ret = Vedit_connect_lines(&Map, List, thresh[THRESH_SNAP]);
-	G_message(_("%d lines connected"), ret);
+	G_message(_n("%d line connected",
+                     "%d lines connected",
+                     ret), ret);
 	break;
     case MODE_MERGE:
 	ret = Vedit_merge_lines(&Map, List);
-	G_message(_("%d lines merged"), ret);
+	G_message(_n("%d line merged",
+                     "%d lines merged",
+                     ret), ret);
 	break;
     case MODE_SELECT:
 	ret = print_selected(List);
 	break;
     case MODE_CATADD:
 	ret = Vedit_modify_cats(&Map, List, layer, 0, Clist);
-	G_message(_("%d features modified"), ret);
+	G_message(_n("%d feature modified",
+                     "%d features modified",
+                     ret), ret);
 	break;
     case MODE_CATDEL:
 	ret = Vedit_modify_cats(&Map, List, layer, 1, Clist);
-	G_message(_("%d features modified"), ret);
+	G_message(_n("%d feature modified",
+                     "%d features modified",
+                     ret), ret);
 	break;
     case MODE_COPY:
 	if (BgMap && BgMap[0]) {
@@ -365,7 +389,9 @@
 	else {
 	    ret = Vedit_copy_lines(&Map, NULL, List);
 	}
-	G_message(_("%d features copied"), ret);
+	G_message(_n("%d feature copied",
+                     "%d features copied",
+                     ret), ret);
 	break;
     case MODE_SNAP:
 	G_verbose_message(_("Threshold value for snapping is %.2f"),
@@ -374,7 +400,9 @@
 	break;
     case MODE_FLIP:
 	ret = Vedit_flip_lines(&Map, List);
-	G_message(_("%d lines flipped"), ret);
+	G_message(_n("%d line flipped",
+                     "%d lines flipped",
+                     ret), ret);
 	break;
     case MODE_NONE:
 	break;
@@ -393,14 +421,18 @@
 	ret = Vedit_bulk_labeling(&Map, List,
 				  x1, y1, x2, y2, start, step);
 	
-	G_message(_("%d lines labeled"), ret);
+	G_message(_n("%d line labeled",
+                     "%d lines labeled",
+                     ret), ret);
 	break;
     }
     case MODE_CHTYPE:
 	ret = Vedit_chtype_lines(&Map, List);
 	
 	if (ret > 0) {
-	    G_message(_("%d features converted"), ret);
+	    G_message(_n("%d feature converted",
+                         "%d features converted",
+                         ret), ret);
 	}
 	else {
 	    G_message(_("No feature modified"));
@@ -417,7 +449,9 @@
 	    
 	    ret += Vedit_delete_area_centroid(&Map, List->value[i]);
 	}
-	G_message(_("%d areas removed"), ret);
+	G_message(_n("%d area removed",
+                     "%d areas removed",
+                     ret), ret);
 	break;
     }
     default:

Modified: grass/branches/releasebranch_7_0/vector/v.edit/select.c
===================================================================
--- grass/branches/releasebranch_7_0/vector/v.edit/select.c	2014-04-14 07:28:39 UTC (rev 59730)
+++ grass/branches/releasebranch_7_0/vector/v.edit/select.c	2014-04-14 20:21:43 UTC (rev 59731)
@@ -173,7 +173,10 @@
 	reverse_selection(Map, type, &List);
     }
 
-    G_message(_("%d of %d features selected from vector map <%s>"),
+    G_message(_n("%d of %d feature selected from vector map <%s>",
+                 "%d of %d features selected from vector map <%s>",
+                 Vect_get_num_lines(Map)
+    ),
 	      List->n_values,
 	      Vect_get_num_lines(Map), Vect_get_full_name(Map));
 

Modified: grass/branches/releasebranch_7_0/vector/v.external/list.c
===================================================================
--- grass/branches/releasebranch_7_0/vector/v.external/list.c	2014-04-14 07:28:39 UTC (rev 59730)
+++ grass/branches/releasebranch_7_0/vector/v.external/list.c	2014-04-14 20:21:43 UTC (rev 59731)
@@ -176,7 +176,9 @@
     ntables = PQntuples(res);
     G_debug(3, "   nrows = %d", ntables);
     if (fd)
-	G_message(_("PostGIS database <%s> contains %d feature table(s):"),
+	G_message(_n("PostGIS database <%s> contains %d feature table:",
+                     "PostGIS database <%s> contains %d feature tables:",
+                     ntables),
 		  PQdb(conn), ntables);
     
     /* report also schemas */
@@ -261,7 +263,9 @@
     nlayers = OGR_DS_GetLayerCount(Ogr_ds);
 
     if (fd)
-	G_message(_("Data source <%s> (format '%s') contains %d layers:"),
+	G_message(_n("Data source <%s> (format '%s') contains %d layer:",
+                     "Data source <%s> (format '%s') contains %d layers:",
+                     nlayers),
 		  dsn, OGR_Dr_GetName(OGR_DS_GetDriver(Ogr_ds)), nlayers);
     
 

Modified: grass/branches/releasebranch_7_0/vector/v.extract/main.c
===================================================================
--- grass/branches/releasebranch_7_0/vector/v.extract/main.c	2014-04-14 07:28:39 UTC (rev 59730)
+++ grass/branches/releasebranch_7_0/vector/v.extract/main.c	2014-04-14 20:21:43 UTC (rev 59731)
@@ -263,7 +263,9 @@
 	if (ncats == -1)
 		G_fatal_error(_("Unable select records from table <%s>"),
 			      Fi->table);
-	G_verbose_message(_("%d categories loaded"), ncats);
+	G_verbose_message(_n("%d category loaded",
+                             "%d categories loaded",
+                             ncats), ncats);
 	    
 	db_close_database(driver);
 	db_shutdown_driver(driver);

Modified: grass/branches/releasebranch_7_0/vector/v.in.ascii/points.c
===================================================================
--- grass/branches/releasebranch_7_0/vector/v.in.ascii/points.c	2014-04-14 07:28:39 UTC (rev 59730)
+++ grass/branches/releasebranch_7_0/vector/v.in.ascii/points.c	2014-04-14 20:21:43 UTC (rev 59731)
@@ -262,7 +262,9 @@
     G_free(tmp_token);
 
     if (region_flag)
-	G_message(_("Skipping %d of %d rows falling outside of current region"),
+	G_message(_n("Skipping %d of %d row falling outside of current region",
+                     "Skipping %d of %d rows falling outside of current region",
+                     row - 1),
 		  skipped, row - 1);
 
     return 0;

Modified: grass/branches/releasebranch_7_0/vector/v.in.db/main.c
===================================================================
--- grass/branches/releasebranch_7_0/vector/v.in.db/main.c	2014-04-14 07:28:39 UTC (rev 59730)
+++ grass/branches/releasebranch_7_0/vector/v.in.db/main.c	2014-04-14 20:21:43 UTC (rev 59731)
@@ -301,7 +301,9 @@
     Vect_build(&Map);
     Vect_close(&Map);
 
-    G_done_msg(_("%d points written to vector map."), count);
+    G_done_msg(_n("%d point written to vector map.",
+                  "%d points written to vector map.",
+                  count), count);
 
     return (EXIT_SUCCESS);
 }

Modified: grass/branches/releasebranch_7_0/vector/v.kernel/main.c
===================================================================
--- grass/branches/releasebranch_7_0/vector/v.kernel/main.c	2014-04-14 07:28:39 UTC (rev 59730)
+++ grass/branches/releasebranch_7_0/vector/v.kernel/main.c	2014-04-14 20:21:43 UTC (rev 59731)
@@ -91,6 +91,7 @@
     CELL *mask = NULL;
     DCELL *output_cell = NULL;
     double sigma, dmax, segmax, netmax, multip;
+    char *tmpstr1, *tmpstr2;
 
     double **coordinate;
     double sigmaOptimal;
@@ -295,8 +296,13 @@
     G_get_window(&window);
 
     G_verbose_message(_("Standard deviation: %f"), sigma);
-    G_verbose_message(_("Output raster map: res: %f\trows: %d\tcols: %d"),
-                      window.ew_res, window.rows, window.cols);
+    G_asprintf(&tmpstr1, _n("%d row", "%d rows", window.rows), window.rows);
+    G_asprintf(&tmpstr2, _n("%d column", "%d columns", window.cols), window.cols);
+    /* GTC First argument is resolution, second - number of rows as a text, third - number of columns as a text. */
+    G_verbose_message(_("Output raster map: resolution: %f\t%s\t%s"),
+                      window.ew_res, tmpstr1, tmpstr2);
+    G_free(tmpstr1);
+    G_free(tmpstr2); 
     
     /* Open input vector */
     Vect_set_open_level(2);
@@ -334,7 +340,9 @@
 	}
 
 	if (notreachable > 0)
-	    G_warning(_("%d points outside threshold"), notreachable);
+	    G_warning(_n("%d point outside threshold",
+                         "%d points outside threshold",
+                         notreachable), notreachable);
     }
     else {
 	/* check and open the name of output map */
@@ -377,7 +385,9 @@
 	}
 
 	G_message(_("Number of input points: %d."), npoints);
-	G_message(_("%d distances read from the map."), ndists);
+	G_message(_n("%d distance read from the map.",
+                     "%d distances read from the map.",
+                     ndists), ndists);
 
 	if (ndists == 0)
 	    G_fatal_error(_("Distances between all points are beyond %e (4 * "

Modified: grass/branches/releasebranch_7_0/vector/v.lidar.correction/main.c
===================================================================
--- grass/branches/releasebranch_7_0/vector/v.lidar.correction/main.c	2014-04-14 07:28:39 UTC (rev 59730)
+++ grass/branches/releasebranch_7_0/vector/v.lidar.correction/main.c	2014-04-14 20:21:43 UTC (rev 59731)
@@ -271,8 +271,12 @@
     P_get_edge(P_BILINEAR, &dims, stepE, stepN);
     P_set_dim(&dims, stepE, stepN, &nsplx_adj, &nsply_adj);
 
-    G_verbose_message(_("adjusted EW splines %d"), nsplx_adj);
-    G_verbose_message(_("adjusted NS splines %d"), nsply_adj);
+    G_verbose_message(_n("adjusted EW spline %d",
+                         "adjusted EW splines %d",
+                         nsplx_adj), nsplx_adj);
+    G_verbose_message(_n("adjusted NS spline %d",
+                         "adjusted NS splines %d",
+                         nsply_adj), nsply_adj);
 
     /* calculate number of subregions */
     edgeE = dims.ew_size - dims.overlap - 2 * dims.edge_v;

Modified: grass/branches/releasebranch_7_0/vector/v.lrs/v.lrs.segment/main.c
===================================================================
--- grass/branches/releasebranch_7_0/vector/v.lrs/v.lrs.segment/main.c	2014-04-14 07:28:39 UTC (rev 59730)
+++ grass/branches/releasebranch_7_0/vector/v.lrs/v.lrs.segment/main.c	2014-04-14 20:21:43 UTC (rev 59731)
@@ -63,6 +63,7 @@
     dbDriver *rsdriver;
     dbHandle rshandle;
     dbString rsstmt;
+    char *tmpstr1;
 
     G_gisinit(argv[0]);
 
@@ -349,12 +350,30 @@
     if (file_opt->answer)
 	fclose(in_file);
 
-    G_message(_("[%d] points read from input"), points_read);
-    G_message(_("[%d] points written to output map (%d lost)"),
-	      points_written, points_read - points_written);
-    G_message(_("[%d] lines read from input"), lines_read);
-    G_message(_("[%d] lines written to output map (%d lost)"),
-	      lines_written, lines_read - lines_written);
+    G_message(_n("[%d] point read from input",
+                 "[%d] points read from input",
+                 points_read), points_read);
+    G_asprintf(&tmpstr1, _n("%d lost", "%d lost", 
+                            points_read - points_written), 
+               points_read - points_written);
+    /* GTC %s will be replaced with a message about lost points. */
+    G_message(_n("[%d] point written to output map (%s)",
+                 "[%d] points written to output map (%s)",
+                 points_written),
+	      points_written, tmpstr1);
+    G_free(tmpstr1);
+    G_message(_n("[%d] line read from input",
+                 "[%d] lines read from input",
+                 lines_read), lines_read);
+    G_asprintf(&tmpstr1, _n("%d lost", "%d lost",
+                            lines_read - lines_written),
+               lines_read - lines_written);
+    /* GTC %s will be replaced with a message about lost lines. */
+    G_message(_n("[%d] line written to output map (%s)",
+                 "[%d] lines written to output map (%s)",
+                 lines_written),
+	      lines_written, tmpstr1);
+    G_free(tmpstr1);
 
     exit(EXIT_SUCCESS);
 }

Modified: grass/branches/releasebranch_7_0/vector/v.lrs/v.lrs.where/main.c
===================================================================
--- grass/branches/releasebranch_7_0/vector/v.lrs/v.lrs.where/main.c	2014-04-14 07:28:39 UTC (rev 59730)
+++ grass/branches/releasebranch_7_0/vector/v.lrs/v.lrs.where/main.c	2014-04-14 20:21:43 UTC (rev 59731)
@@ -217,14 +217,24 @@
     Vect_close(&LMap);
     Vect_close(&PMap);
 
-    G_message(_("[%d] points read from input"), n_points);
-    G_message(_("[%d] positions found"), n_found);
+    G_message(_n("[%d] point read from input",
+                 "[%d] points read from input",
+                 n_points), n_points);
+    G_message(_n("[%d] position found",
+                 "[%d] positions found",
+                 n_found), n_found);
     if (n_outside)
-	G_message(_("[%d] points outside threshold"), n_outside);
+	G_message(_n("[%d] point outside threshold",
+                     "[%d] points outside threshold",
+                     n_outside), n_outside);
     if (n_no_record)
-	G_message(_("[%d] points - no record found"), n_no_record);
+	G_message(_n("[%d] point - no record found",
+                     "[%d] points - no record found",
+                     n_no_record), n_no_record);
     if (n_many_records)
-	G_message(_("[%d] points - too many records found"), n_many_records);
+	G_message(_n("[%d] point - too many records found",
+                     "[%d] points - too many records found",
+                     n_many_records), n_many_records);
 
     exit(EXIT_SUCCESS);
 }

Modified: grass/branches/releasebranch_7_0/vector/v.net.distance/main.c
===================================================================
--- grass/branches/releasebranch_7_0/vector/v.net.distance/main.c	2014-04-14 07:28:39 UTC (rev 59730)
+++ grass/branches/releasebranch_7_0/vector/v.net.distance/main.c	2014-04-14 20:21:43 UTC (rev 59731)
@@ -351,7 +351,9 @@
     G_free(prev);
 
     if (from_nr)
-	G_warning(_("%d 'from' features were not reachable"), from_nr);
+	G_warning(_n("%d 'from' feature was not reachable",
+                     "%d 'from' features were not reachable",
+                     from_nr), from_nr);
 
     exit(EXIT_SUCCESS);
 }

Modified: grass/branches/releasebranch_7_0/vector/v.out.ascii/main.c
===================================================================
--- grass/branches/releasebranch_7_0/vector/v.out.ascii/main.c	2014-04-14 07:28:39 UTC (rev 59730)
+++ grass/branches/releasebranch_7_0/vector/v.out.ascii/main.c	2014-04-14 20:21:43 UTC (rev 59731)
@@ -104,7 +104,10 @@
             G_fatal_error(_("Layer <%s> not found"), field_name);
         ret = Vect_str_to_cat_list(cats, clist);
         if (ret > 0)
-            G_fatal_error(_("%d errors in <%s> option"), ret, "cats");
+            G_fatal_error(_n("%d error in <%s> option",
+                             "%d errors in <%s> option",
+                             ret),
+                          ret, "cats");
     }
 
     if (strcmp(output, "-") != 0) {

Modified: grass/branches/releasebranch_7_0/vector/v.out.ogr/main.c
===================================================================
--- grass/branches/releasebranch_7_0/vector/v.out.ogr/main.c	2014-04-14 07:28:39 UTC (rev 59730)
+++ grass/branches/releasebranch_7_0/vector/v.out.ogr/main.c	2014-04-14 20:21:43 UTC (rev 59731)
@@ -288,39 +288,62 @@
 
     /* check what users wants to export and what's present in the map */
     if (Vect_get_num_primitives(&In, GV_POINT) > 0 && !(otype & GV_POINTS))
-	G_warning(_("%d point(s) found, but not requested to be exported. "
-		    "Verify 'type' parameter."), Vect_get_num_primitives(&In,
-									 GV_POINT));
+	G_warning(_n("%d point found, but not requested to be exported. "
+		     "Verify 'type' parameter.",
+                     "%d points found, but not requested to be exported. "
+                     "Verify 'type' parameter.",
+                     Vect_get_num_primitives(&In, GV_POINT)),
+                  Vect_get_num_primitives(&In, GV_POINT));
 
     if (Vect_get_num_primitives(&In, GV_LINE) > 0 && !(otype & GV_LINES))
-	G_warning(_("%d line(s) found, but not requested to be exported. "
-		    "Verify 'type' parameter."), Vect_get_num_primitives(&In,
-									 GV_LINE));
+	G_warning(_n("%d line found, but not requested to be exported. "
+		     "Verify 'type' parameter.",
+                     "%d line(s) found, but not requested to be exported. "
+                     "Verify 'type' parameter.",
+                     Vect_get_num_primitives(&In, GV_LINE)),
+                  Vect_get_num_primitives(&In, GV_LINE));
 
     if (Vect_get_num_primitives(&In, GV_BOUNDARY) > 0 &&
 	!(otype & GV_BOUNDARY) && !(otype & GV_AREA))
-	G_warning(_("%d boundary(ies) found, but not requested to be exported. "
-		   "Verify 'type' parameter."), Vect_get_num_primitives(&In,
-									GV_BOUNDARY));
+	G_warning(_n("%d boundary found, but not requested to be exported. "
+		     "Verify 'type' parameter.",
+                     "%d boundaries found, but not requested to be exported. "
+                     "Verify 'type' parameter.",
+                     Vect_get_num_primitives(&In, GV_BOUNDARY)),
+                  Vect_get_num_primitives(&In, GV_BOUNDARY));
 
     if (Vect_get_num_primitives(&In, GV_CENTROID) > 0 &&
 	!(otype & GV_CENTROID) && !(otype & GV_AREA))
-	G_warning(_("%d centroid(s) found, but not requested to be exported. "
-		    "Verify 'type' parameter."), Vect_get_num_primitives(&In,
-									 GV_CENTROID));
+	G_warning(_n("%d centroid found, but not requested to be exported. "
+		     "Verify 'type' parameter.",
+                     "%d centroids found, but not requested to be exported. "
+                     "Verify 'type' parameter.",
+                     Vect_get_num_primitives(&In, GV_CENTROID)),
+                  Vect_get_num_primitives(&In, GV_CENTROID));
 
     if (Vect_get_num_areas(&In) > 0 && !(otype & GV_AREA))
-	G_warning(_("%d area(s) found, but not requested to be exported. "
-		    "Verify 'type' parameter."), Vect_get_num_areas(&In));
+	G_warning(_n("%d area found, but not requested to be exported. "
+		     "Verify 'type' parameter.",
+                     "%d areas found, but not requested to be exported. "
+                     "Verify 'type' parameter.",
+                     Vect_get_num_areas(&In)),
+                  Vect_get_num_areas(&In));
 
     if (Vect_get_num_primitives(&In, GV_FACE) > 0 && !(otype & GV_FACE))
-	G_warning(_("%d face(s) found, but not requested to be exported. "
-		    "Verify 'type' parameter."), Vect_get_num_primitives(&In,
-									 GV_FACE));
+	G_warning(_n("%d face found, but not requested to be exported. "
+		     "Verify 'type' parameter.",
+                     "%d faces found, but not requested to be exported. "
+                     "Verify 'type' parameter.",
+                     Vect_get_num_primitives(&In, GV_FACE)),
+                  Vect_get_num_primitives(&In, GV_FACE));
 
     if (Vect_get_num_volumes(&In) > 0 && !(otype & GV_VOLUME))
-	G_warning(_("%d volume(s) found, but not requested to be exported. "
-		    "Verify 'type' parameter."), Vect_get_num_volumes(&In));
+	G_warning(_n("%d volume found, but not requested to be exported. "
+		     "Verify 'type' parameter.",
+                     "%d volumes found, but not requested to be exported. "
+                     "Verify 'type' parameter.",
+                     Vect_get_num_volumes(&In)),
+                  Vect_get_num_volumes(&In));
 
     /* warn and eventually abort if there is nothing to be exported */
     num_to_export = 0;
@@ -665,7 +688,10 @@
     
     /* Lines (run always to count features of different type) */
     if (otype & (GV_POINTS | GV_LINES | GV_KERNEL | GV_FACE)) {
-        G_message(_("Exporting %d features..."), Vect_get_num_primitives(&In, otype));
+        G_message(_n("Exporting %d feature...",
+                     "Exporting %d features...",
+                     Vect_get_num_primitives(&In, otype)),
+                 Vect_get_num_primitives(&In, otype));
 
         n_feat += export_lines(&In, field, otype, flags.multi->answer ? TRUE : FALSE,
                                donocat, ftype == GV_BOUNDARY ? TRUE : FALSE,
@@ -677,7 +703,9 @@
 
     /* Areas (run always to count features of different type) */
     if (Vect_get_num_areas(&In) > 0 && (otype & GV_AREA)) {
-	G_message(_("Exporting %d areas (may take some time)..."),
+	G_message(_n("Exporting %d area (may take some time)...",
+                     "Exporting %d areas (may take some time)...",
+                     Vect_get_num_areas(&In)),
 		  Vect_get_num_areas(&In));
 
         n_feat += export_areas(&In, field, flags.multi->answer ? TRUE : FALSE, donocat, 
@@ -694,7 +722,10 @@
        which output format would know the difference?
      */
     if (Vect_get_num_volumes(&In) > 0 && (otype & GV_VOLUME)) {
-	G_message(_("Exporting %d volumes..."), Vect_get_num_volumes(&In));
+	G_message(_n("Exporting %d volume...",
+                     "Exporting %d volumes...",
+                     Vect_get_num_volumes(&In)),
+                  Vect_get_num_volumes(&In));
 	G_warning(_("Export of volumes not implemented yet. Skipping."));
     }
 
@@ -712,13 +743,20 @@
 
     /* Summary */
     if (n_nocat > 0)
-	G_important_message(_("%d features without category were written"), n_nocat);
+	G_important_message(_n("%d feature without category was written",
+                               "%d features without category were written",
+                               n_nocat), n_nocat);
     if (n_noatt > 0)
-	G_important_message(_("%d features without attributes were written"), n_noatt);
+	G_important_message(_n("%d feature without attributes was written",
+                               "%d features without attributes were written",
+                               n_noatt), n_noatt);
 
     if (n_nocatskip > 0)
-	G_warning(_("%d features without category were skipped. "
-                    "Features without category are written only when -%c flag is given."),
+	G_warning(_n("%d feature without category was skipped. "
+                     "Features without category are written only when -%c flag is given.",
+                     "%d features without category were skipped. "
+                     "Features without category are written only when -%c flag is given.",
+                     n_nocatskip),
 		  n_nocatskip, flags.cat->key);
 
     /* Enable this? May be confusing that for area type are not
@@ -731,7 +769,9 @@
 
     if (n_feat < 1)
         G_warning(_("Output layer is empty, no features written"));
-    G_done_msg(_("%d features (%s type) written to <%s> (%s format)."), n_feat,
+    G_done_msg(_n("%d feature (%s type) written to <%s> (%s format).",
+                  "%d features (%s type) written to <%s> (%s format).",
+                  n_feat), n_feat,
                OGRGeometryTypeToName(wkbtype),
 	       options.layer->answer, options.format->answer);
 

Modified: grass/branches/releasebranch_7_0/vector/v.out.postgis/main.c
===================================================================
--- grass/branches/releasebranch_7_0/vector/v.out.postgis/main.c	2014-04-14 07:28:39 UTC (rev 59730)
+++ grass/branches/releasebranch_7_0/vector/v.out.postgis/main.c	2014-04-14 20:21:43 UTC (rev 59731)
@@ -164,11 +164,15 @@
                       Vect_get_name(&Out));
 
     if (!flags.topo->answer) 
-        G_done_msg(_("%d features (%s type) written to <%s>."),
+        G_done_msg(_n("%d feature (%s type) written to <%s>.",
+                      "%d features (%s type) written to <%s>.",
+                      Vect_sfa_get_num_features(&Out)),
                    Vect_sfa_get_num_features(&Out), Vect_get_finfo_geometry_type(&Out),
                    Vect_get_name(&Out));
     else
-        G_done_msg(_("%d primitives written to <%s>."),
+        G_done_msg(_n("%d primitive written to <%s>.",
+                      "%d primitives written to <%s>.",
+                      Vect_get_num_lines(&Out)),
                    Vect_get_num_lines(&Out), 
                    Vect_get_name(&Out));
     

Modified: grass/branches/releasebranch_7_0/vector/v.out.pov/main.c
===================================================================
--- grass/branches/releasebranch_7_0/vector/v.out.pov/main.c	2014-04-14 07:28:39 UTC (rev 59730)
+++ grass/branches/releasebranch_7_0/vector/v.out.pov/main.c	2014-04-14 20:21:43 UTC (rev 59731)
@@ -214,7 +214,9 @@
     Vect_close(&In);
 
     /* Summary */
-    G_done_msg(_("%d features written."), count);
+    G_done_msg(_n("%d feature written.",
+                  "%d features written.",
+                  count), count);
 
     exit(EXIT_SUCCESS);
 }

Modified: grass/branches/releasebranch_7_0/vector/v.overlay/area_area.c
===================================================================
--- grass/branches/releasebranch_7_0/vector/v.overlay/area_area.c	2014-04-14 07:28:39 UTC (rev 59730)
+++ grass/branches/releasebranch_7_0/vector/v.overlay/area_area.c	2014-04-14 20:21:43 UTC (rev 59731)
@@ -96,7 +96,9 @@
 	Vect_destroy_boxlist(boxlist);
 	Vect_destroy_list(reflist);
 
-	G_verbose_message(_("%d boundaries snapped"), snapped_lines);
+	G_verbose_message(_n("%d boundary snapped",
+                             "%d boundaries snapped",
+                             snapped_lines), snapped_lines);
     }
 
     /* same procedure like for v.in.ogr:

Modified: grass/branches/releasebranch_7_0/vector/v.sample/main.c
===================================================================
--- grass/branches/releasebranch_7_0/vector/v.sample/main.c	2014-04-14 07:28:39 UTC (rev 59730)
+++ grass/branches/releasebranch_7_0/vector/v.sample/main.c	2014-04-14 20:21:43 UTC (rev 59731)
@@ -147,7 +147,9 @@
     if (nrecords < 0)
 	G_fatal_error(_("Unable to select data from table"));
 
-    G_verbose_message(_("%d records selected from table"), nrecords);
+    G_verbose_message(_n("%d record selected from table",
+                         "%d records selected from table",
+                         nrecords), nrecords);
 
     db_close_database_shutdown_driver(Driver);
 

Modified: grass/branches/releasebranch_7_0/vector/v.segment/main.c
===================================================================
--- grass/branches/releasebranch_7_0/vector/v.segment/main.c	2014-04-14 07:28:39 UTC (rev 59730)
+++ grass/branches/releasebranch_7_0/vector/v.segment/main.c	2014-04-14 20:21:43 UTC (rev 59731)
@@ -52,6 +52,7 @@
     struct Map_info In, Out;
     struct line_cats *LCats, *SCats;
     struct line_pnts *LPoints, *SPoints, *PlPoints;
+    char *tmpstr1;
 
     G_gisinit(argv[0]);
 
@@ -248,13 +249,29 @@
 
     Vect_build(&Out);
 
-    G_message(_("%d points read from input"), points_read);
-    G_message(_("%d points written to output map (%d lost)"),
-	      points_written, points_read - points_written);
-    G_message(_("%d lines read from input"), lines_read);
-    G_message(_("%d lines written to output map (%d lost)"),
-	      lines_written, lines_read - lines_written);
-
+    G_message(_n("%d point read from input",
+                 "%d points read from input",
+                 points_read), points_read);
+    /* GTC Number of lost points */
+    G_asprintf(&tmpstr1, _n("%d lost", "%d lost", points_read - points_written), points_read - points_written);
+    /* GTC %s is replaced with message indicating number of lost points. */
+    G_message(_n("%d point written to output map (%s)",
+                 "%d points written to output map (%s)",
+                 points_written),
+                 points_written, tmpstr1);
+    G_free(tmpstr1);
+    G_message(_n("%d line read from input",
+                 "%d lines read from input",
+                 lines_read), lines_read);
+    /* GTC Number of lost lines */
+    G_asprintf(&tmpstr1, _n("%d lost", "%d lost", lines_read - lines_written), lines_read - lines_written);
+    /* GTC %s is replaced with message indicating number of lost lines. */
+    G_message(_n("%d line written to output map (%s)",
+                 "%d lines written to output map (%s)",
+                 lines_written),
+                 lines_written, tmpstr1);
+    G_free(tmpstr1);
+    
     /* Free, close ... */
     Vect_close(&In);
     Vect_close(&Out);

Modified: grass/branches/releasebranch_7_0/vector/v.surf.idw/main.c
===================================================================
--- grass/branches/releasebranch_7_0/vector/v.surf.idw/main.c	2014-04-14 07:28:39 UTC (rev 59730)
+++ grass/branches/releasebranch_7_0/vector/v.surf.idw/main.c	2014-04-14 20:21:43 UTC (rev 59731)
@@ -79,6 +79,7 @@
     struct cell_list **search_list = NULL, **search_list_start = NULL;
     int max_radius, radius;
     int searchallpoints = 0;
+    char *tmpstr1, *tmpstr2;
 
     G_gisinit(argv[0]);
 
@@ -254,8 +255,15 @@
 
     fd = Rast_open_new(parm.output->answer, DCELL_TYPE);
 
-    G_important_message(_("Interpolating raster map <%s> (%d rows, %d cols)... "),
-			parm.output->answer, window.rows, window.cols);
+    /* GTC Count of window rows */
+    G_asprintf(&tmpstr1, _n("%d row", "%d rows", window.rows), window.rows);
+    /* GTC Count of window columns */
+    G_asprintf(&tmpstr2, _n("%d column", "%d columns", window.cols), window.cols);
+    /* GTC First argument is map name, second - message about number of rows, third - columns. */
+    G_important_message(_("Interpolating raster map <%s> (%s, %s)..."),
+			parm.output->answer, tmpstr1, tmpstr2);
+    G_free(tmpstr1);
+    G_free(tmpstr2);
 
     north = window.north + window.ns_res / 2.0;
     for (row = 0; row < window.rows; row++) {

Modified: grass/branches/releasebranch_7_0/vector/v.surf.idw/read_sites.c
===================================================================
--- grass/branches/releasebranch_7_0/vector/v.surf.idw/read_sites.c	2014-04-14 07:28:39 UTC (rev 59730)
+++ grass/branches/releasebranch_7_0/vector/v.surf.idw/read_sites.c	2014-04-14 20:21:43 UTC (rev 59731)
@@ -65,7 +65,7 @@
 	if (nrec < 0)
 	    G_fatal_error(_("Unable to select data from table"));
 
-	G_verbose_message(_("%d records selected from table"), nrec);
+	G_verbose_message(_n("One record selected from table", "%d records selected from table", nrec), nrec);
 
 	db_close_database_shutdown_driver(Driver);
     }
@@ -118,5 +118,5 @@
     Vect_set_release_support(&Map);
     Vect_close(&Map);
 
-    G_message(_("%ld points loaded"), npoints);
+    G_message(_n("%ld point loaded", "%ld points loaded", npoints), npoints);
 }

Modified: grass/branches/releasebranch_7_0/vector/v.voronoi/main.c
===================================================================
--- grass/branches/releasebranch_7_0/vector/v.voronoi/main.c	2014-04-14 07:28:39 UTC (rev 59730)
+++ grass/branches/releasebranch_7_0/vector/v.voronoi/main.c	2014-04-14 20:21:43 UTC (rev 59731)
@@ -220,7 +220,9 @@
     plot = 0;
     debug = 0;
 
-    G_message(_("Voronoi triangulation for %d points..."), nsites);
+    G_message(_n("Voronoi triangulation for %d point...",
+                 "Voronoi triangulation for %d points...",
+                 nsites), nsites);
     voronoi(nextone);
     G_message(_("Writing edges..."));
     vo_write();

Modified: grass/branches/releasebranch_7_0/vector/v.voronoi/sw_main.c
===================================================================
--- grass/branches/releasebranch_7_0/vector/v.voronoi/sw_main.c	2014-04-14 07:28:39 UTC (rev 59730)
+++ grass/branches/releasebranch_7_0/vector/v.voronoi/sw_main.c	2014-04-14 20:21:43 UTC (rev 59731)
@@ -185,7 +185,9 @@
     if (nsites < 2) {
 	const char *name = Vect_get_full_name(&In);
 	Vect_close(&In);
-	G_fatal_error(_("Found %d points/centroids in <%s>, but at least 2 are needed"),
+	G_fatal_error(_n("Found %d point/centroid in <%s>, but at least 2 are needed",
+                         "Found %d points/centroids in <%s>, but at least 2 are needed",
+                         nsites),
 	              nsites, name);
     }
 
@@ -463,7 +465,9 @@
     if (nsites < 2) {
 	const char *name = Vect_get_full_name(&In);
 	Vect_close(&In);
-	G_fatal_error(_("Found %d vertices in <%s>, but at least 2 are needed"),
+	G_fatal_error(_n("Found %d vertex in <%s>, but at least 2 are needed",
+                         "Found %d vertices in <%s>, but at least 2 are needed",
+                         nsites),
 	              nsites, name);
     }
 

Modified: grass/branches/releasebranch_7_0/vector/v.what.rast3/main.c
===================================================================
--- grass/branches/releasebranch_7_0/vector/v.what.rast3/main.c	2014-04-14 07:28:39 UTC (rev 59730)
+++ grass/branches/releasebranch_7_0/vector/v.what.rast3/main.c	2014-04-14 20:21:43 UTC (rev 59731)
@@ -209,11 +209,14 @@
 
     /* Report number of points not used */
     if (outside_cnt)
-	G_warning(_("%d points outside current region were skipped"),
-		  outside_cnt);
+	G_warning(_n("%d point outside current region was skipped",
+                     "%d points outside current region were skipped",
+                     outside_cnt), outside_cnt);
 
     if (nocat_cnt)
-	G_warning(_("%d points without category were skipped"), nocat_cnt);
+	G_warning(_n("%d point without category was skipped", 
+                     "%d points without category were skipped",
+                     nocat_cnt), nocat_cnt);
 
     /* Extract raster values from file and store in cache */
     G_debug(1, "Extracting raster values");
@@ -320,15 +323,27 @@
     db_free_string(&stmt);
 
     /* Report */
-    G_verbose_message(_("%d categories loaded from table"), select);
-    G_verbose_message(_("%d categories loaded from vector"), point_cnt);
-    G_verbose_message(_("%d categories from vector missing in table"), norec_cnt);
+    G_verbose_message(_n("%d category loaded from table",
+                         "%d categories loaded from table",
+                         select), select);
+    G_verbose_message(_n("%d category loaded from vector",
+                         "%d categories loaded from vector",
+                         point_cnt), point_cnt);
+    G_verbose_message(_n("%d category from vector missing in table",
+                         "%d categories from vector missing in table",
+                         norec_cnt), norec_cnt);
     if (dupl_cnt > 0)
-	G_message(_("%d duplicate categories in vector"), dupl_cnt);
+	G_message(_n("%d duplicate category in vector",
+                     "%d duplicate categories in vector",
+                     dupl_cnt), dupl_cnt);
     if (upderr_cnt > 0)
-	G_warning(_("%d update errors"), upderr_cnt);
+	G_warning(_n("%d update error",
+                     "%d update errors",
+                     upderr_cnt), upderr_cnt);
 
-    G_done_msg(_("%d records updated."), update_cnt);
+    G_done_msg(_n("%d record updated.",
+                  "%d records updated.",
+                  update_cnt), update_cnt);
         
     exit(EXIT_SUCCESS);
 }



More information about the grass-commit mailing list