[GRASS-SVN] r59255 - in grass/trunk: display/d.linegraph display/d.rast.num display/d.vect raster/r.clump raster/r.contour raster/r.cost raster/r.fill.dir raster/r.out.ppm raster/r.out.ppm3 raster/r.resamp.bspline raster/r.resamp.rst raster/r.stream.extract raster/r.surf.idw raster/r.surf.idw2 raster/r.texture raster/r.thin raster/r.watershed/ram raster/r.watershed/seg raster/simwe/simlib
svn_grass at osgeo.org
svn_grass at osgeo.org
Sat Mar 15 04:51:01 PDT 2014
Author: marisn
Date: 2014-03-15 04:51:01 -0700 (Sat, 15 Mar 2014)
New Revision: 59255
Modified:
grass/trunk/display/d.linegraph/main.c
grass/trunk/display/d.rast.num/main.c
grass/trunk/display/d.vect/area.c
grass/trunk/display/d.vect/lines.c
grass/trunk/display/d.vect/main.c
grass/trunk/raster/r.clump/main.c
grass/trunk/raster/r.contour/cont.c
grass/trunk/raster/r.cost/main.c
grass/trunk/raster/r.fill.dir/dopolys.c
grass/trunk/raster/r.out.ppm/main.c
grass/trunk/raster/r.out.ppm3/main.c
grass/trunk/raster/r.resamp.bspline/crosscorr.c
grass/trunk/raster/r.resamp.rst/main.c
grass/trunk/raster/r.stream.extract/del_streams.c
grass/trunk/raster/r.surf.idw/main.c
grass/trunk/raster/r.surf.idw2/main.c
grass/trunk/raster/r.texture/main.c
grass/trunk/raster/r.thin/io.c
grass/trunk/raster/r.thin/thin_lines.c
grass/trunk/raster/r.watershed/ram/do_cum.c
grass/trunk/raster/r.watershed/seg/init_vars.c
grass/trunk/raster/simwe/simlib/input.c
Log:
Expose plural forms for translations
Modified: grass/trunk/display/d.linegraph/main.c
===================================================================
--- grass/trunk/display/d.linegraph/main.c 2014-03-14 18:41:06 UTC (rev 59254)
+++ grass/trunk/display/d.linegraph/main.c 2014-03-15 11:51:01 UTC (rev 59255)
@@ -306,12 +306,19 @@
}
}
if ((i > 0) && (in[0].num_pnts != in[i].num_pnts)) {
- G_warning(_("Y input file <%s> contains %s data points than the X input file"),
- in[i].name,
- ((in[i].num_pnts < in[0].num_pnts) ? "fewer" : "more"));
-
+ if (in[i].num_pnts < in[0].num_pnts) {
+ G_warning(_("Y input file <%s> contains fewer data points than the X input file"),
+ in[i].name);
+ }
+ else {
+ G_warning(_("Y input file <%s> contains more data points than the X input file"),
+ in[i].name);
+ }
+
if (in[i].num_pnts > in[0].num_pnts)
- G_message(_("The last %d point(s) will be ignored"),
+ G_message(_n("The last point will be ignored",
+ "The last %d points will be ignored",
+ (in[i].num_pnts - in[0].num_pnts)),
(in[i].num_pnts - in[0].num_pnts));
}
}
Modified: grass/trunk/display/d.rast.num/main.c
===================================================================
--- grass/trunk/display/d.rast.num/main.c 2014-03-14 18:41:06 UTC (rev 59254)
+++ grass/trunk/display/d.rast.num/main.c 2014-03-15 11:51:01 UTC (rev 59255)
@@ -172,11 +172,13 @@
/* number of rows and cols in window */
if ((nrows > 75) || (ncols > 75)) {
- G_warning(_("Current region size: %d rows X %d cols\n"
+ /* GTC %s will be replaced by strings "X rows" and "Y cols" */
+ G_warning(_("Current region size: %s X %s\n"
"Your current region setting may be too large. "
"Cells displayed on your graphics window may be too "
"small for cell category number to be visible."),
- nrows, ncols);
+ _n("%d row", "%d rows", nrows),
+ _n("%d col", "%d cols", ncols));
}
if ((nrows > 200) || (ncols > 200)) {
G_fatal_error(_("Aborting (region larger then 200 rows X 200 cols is not allowed)"));
Modified: grass/trunk/display/d.vect/area.c
===================================================================
--- grass/trunk/display/d.vect/area.c 2014-03-14 18:41:06 UTC (rev 59254)
+++ grass/trunk/display/d.vect/area.c 2014-03-15 11:51:01 UTC (rev 59255)
@@ -233,8 +233,10 @@
}
if ((colors || cvarr_rgb) && get_num_color_rules_skipped() > 0)
- G_warning(_("%d invalid color rules for areas skipped"),
- get_num_color_rules_skipped());
+ G_warning(_n("%d invalid color rule for areas skipped",
+ "%d invalid color rules for areas skipped",
+ get_num_color_rules_skipped()),
+ get_num_color_rules_skipped());
Vect_destroy_line_struct(Points);
Vect_destroy_line_struct(APoints);
Modified: grass/trunk/display/d.vect/lines.c
===================================================================
--- grass/trunk/display/d.vect/lines.c 2014-03-14 18:41:06 UTC (rev 59254)
+++ grass/trunk/display/d.vect/lines.c 2014-03-15 11:51:01 UTC (rev 59255)
@@ -166,19 +166,21 @@
}
if ((colors || cvarr_rgb) && get_num_color_rules_skipped() > 0)
- G_warning(_("%d invalid color rules for lines skipped"),
- get_num_color_rules_skipped());
+ G_warning(_n("%d invalid color rule for lines skipped",
+ "%d invalid color rules for lines skipped",
+ get_num_color_rules_skipped()),
+ get_num_color_rules_skipped());
if (n_points > 0)
- G_verbose_message(_("%d points plotted"), n_points);
+ G_verbose_message(_n("%d point plotted", "%d points plotted", n_points), n_points);
if (n_lines > 0)
- G_verbose_message(_("%d lines plotted"), n_lines);
+ G_verbose_message(_n("%d line plotted", "%d lines plotted", n_lines), n_lines);
if (n_centroids > 0)
- G_verbose_message(_("%d centroids plotted"), n_centroids);
+ G_verbose_message(_n("%d centroid plotted", "%d centroids plotted", n_centroids), n_centroids);
if (n_boundaries > 0)
- G_verbose_message(_("%d boundaries plotted"), n_boundaries);
+ G_verbose_message(_n("%d boundary plotted", "%d boundaries plotted", n_boundaries), n_boundaries);
if (n_faces > 0)
- G_verbose_message(_("%d faces plotted"), n_faces);
+ G_verbose_message(_n("%d face plotted", "%d faces plotted", n_faces), n_faces);
Vect_destroy_line_struct(Points);
Vect_destroy_cats_struct(Cats);
Modified: grass/trunk/display/d.vect/main.c
===================================================================
--- grass/trunk/display/d.vect/main.c 2014-03-14 18:41:06 UTC (rev 59254)
+++ grass/trunk/display/d.vect/main.c 2014-03-15 11:51:01 UTC (rev 59255)
@@ -386,7 +386,7 @@
chcat = 1;
ret = Vect_str_to_cat_list(cat_opt->answer, Clist);
if (ret > 0)
- G_warning(_("%d errors in cat option"), ret);
+ G_warning(_n("%d error in cat option", "%d errors in cat option", ret), ret);
}
type = Vect_option_to_types(type_opt);
Modified: grass/trunk/raster/r.clump/main.c
===================================================================
--- grass/trunk/raster/r.clump/main.c 2014-03-14 18:41:06 UTC (rev 59254)
+++ grass/trunk/raster/r.clump/main.c 2014-03-15 11:51:01 UTC (rev 59255)
@@ -107,7 +107,7 @@
Rast_command_history(&hist);
Rast_write_history(OUTPUT, &hist);
- G_done_msg(_("%d clumps."), range.max);
+ G_done_msg(_n("%d clump.", "%d clumps.", range.max), range.max);
exit(EXIT_SUCCESS);
}
Modified: grass/trunk/raster/r.contour/cont.c
===================================================================
--- grass/trunk/raster/r.contour/cont.c 2014-03-14 18:41:06 UTC (rev 59254)
+++ grass/trunk/raster/r.contour/cont.c 2014-03-15 11:51:01 UTC (rev 59255)
@@ -79,7 +79,8 @@
ncrossing = 0;
- G_message(_("Writing vector contours (total levels %d)..."), nlevels);
+ G_message(_n("Writing vector contour (one level)...",
+ "Writing vector contours (total levels %d)...", nlevels), nlevels);
for (n = 0; n < nlevels; n++) {
level = levels[n];
@@ -209,7 +210,9 @@
} /* for levels */
if (ncrossing > 0) {
- G_warning(_("%d crossings founds"), ncrossing);
+ G_warning(_n("%d crossing found",
+ "%d crossings found",
+ ncrossing), ncrossing);
}
Vect_destroy_line_struct(Points);
Modified: grass/trunk/raster/r.cost/main.c
===================================================================
--- grass/trunk/raster/r.cost/main.c 2014-03-14 18:41:06 UTC (rev 59254)
+++ grass/trunk/raster/r.cost/main.c 2014-03-15 11:51:01 UTC (rev 59255)
@@ -578,7 +578,7 @@
if (npoints < 1)
G_fatal_error(_("No start points found in vector map <%s>"), Vect_get_full_name(&In));
else
- G_verbose_message(_("%d points found"), npoints);
+ G_verbose_message(_n("%d point found", "%d points found", npoints), npoints);
Vect_close(&In);
}
Modified: grass/trunk/raster/r.fill.dir/dopolys.c
===================================================================
--- grass/trunk/raster/r.fill.dir/dopolys.c 2014-03-14 18:41:06 UTC (rev 59254)
+++ grass/trunk/raster/r.fill.dir/dopolys.c 2014-03-15 11:51:01 UTC (rev 59255)
@@ -81,7 +81,8 @@
recurse_list(flag, cells, found, i);
}
}
- G_message(_("Found %d unresolved areas"), flag);
+ G_message(_n("Found %d unresolved area",
+ "Found %d unresolved areas", flag), flag);
/* Compose a new raster map to contain the resulting assignments */
lseek(fm, 0, SEEK_SET);
Modified: grass/trunk/raster/r.out.ppm/main.c
===================================================================
--- grass/trunk/raster/r.out.ppm/main.c 2014-03-14 18:41:06 UTC (rev 59254)
+++ grass/trunk/raster/r.out.ppm/main.c 2014-03-15 11:51:01 UTC (rev 59255)
@@ -97,7 +97,8 @@
/*G_get_set_window (&w); *//* 10/99 MN: check for current region */
G_get_window(&w);
- G_message(_("rows = %d, cols = %d"), w.rows, w.cols);
+ G_message("%s, %s", _n("row = %d", "rows = %d", w.rows),
+ _n("col = %d", "cols = %d", w.cols));
/* open raster map for reading */
cellfile = Rast_open_old(rast->answer, "");
Modified: grass/trunk/raster/r.out.ppm3/main.c
===================================================================
--- grass/trunk/raster/r.out.ppm3/main.c 2014-03-14 18:41:06 UTC (rev 59254)
+++ grass/trunk/raster/r.out.ppm3/main.c 2014-03-15 11:51:01 UTC (rev 59255)
@@ -91,7 +91,8 @@
G_get_window(&w);
- G_message(_("rows = %d, cols = %d"), w.rows, w.cols);
+ G_message("%s, %s", _n("row = %d", "rows = %d", w.rows),
+ _n("col = %d", "cols = %d", w.cols));
/* open raster map for reading */
for (i = 0; i < 3; i++) {
Modified: grass/trunk/raster/r.resamp.bspline/crosscorr.c
===================================================================
--- grass/trunk/raster/r.resamp.bspline/crosscorr.c 2014-03-14 18:41:06 UTC (rev 59254)
+++ grass/trunk/raster/r.resamp.bspline/crosscorr.c 2014-03-15 11:51:01 UTC (rev 59255)
@@ -166,7 +166,8 @@
/* Current region is read and points recorded into observ */
observ = P_Read_Raster_Region_Map(in_seg, ®ion, src_reg, &ndata, 1024);
G_debug(5, "CrossCorrelation: %d points read in region. ", ndata);
- G_verbose_message(_("%d points read in region"),
+ G_verbose_message(_n("%d point read in region",
+ "%d points read in region", ndata),
ndata);
if (ndata > 50)
Modified: grass/trunk/raster/r.resamp.rst/main.c
===================================================================
--- grass/trunk/raster/r.resamp.rst/main.c 2014-03-14 18:41:06 UTC (rev 59254)
+++ grass/trunk/raster/r.resamp.rst/main.c 2014-03-15 11:51:01 UTC (rev 59255)
@@ -417,7 +417,8 @@
G_message(_("%.2f KB of disk space for temp files."), sdisk / 1024.);
}
else
- G_message(_("%d bytes of disk space for temp files."), (int)sdisk);
+ G_message(_n("%d byte of disk space for temp files.",
+ "%d bytes of disk space for temp files.", (int)sdisk), (int)sdisk);
fstar2 = fi * fi / 4.;
Modified: grass/trunk/raster/r.stream.extract/del_streams.c
===================================================================
--- grass/trunk/raster/r.stream.extract/del_streams.c 2014-03-14 18:41:06 UTC (rev 59254)
+++ grass/trunk/raster/r.stream.extract/del_streams.c 2014-03-15 11:51:01 UTC (rev 59255)
@@ -127,7 +127,9 @@
int other_trib, tmp_trib;
int slength;
- G_message(_("Deleting stream segments shorter than %d cells..."), min_length);
+ G_message(_n("Deleting stream segments shorter than %d cell...",
+ "Deleting stream segments shorter than %d cells...", min_length),
+ min_length);
/* TODO: proceed from stream heads to outlets
* -> use depth first post order traversal */
@@ -188,7 +190,8 @@
}
}
- G_verbose_message(_("%d stream segments deleted"), n_deleted);
+ G_verbose_message(_n("%d stream segment deleted",
+ "%d stream segments deleted", n_deleted), n_deleted);
return n_deleted;
}
Modified: grass/trunk/raster/r.surf.idw/main.c
===================================================================
--- grass/trunk/raster/r.surf.idw/main.c 2014-03-14 18:41:06 UTC (rev 59254)
+++ grass/trunk/raster/r.surf.idw/main.c 2014-03-15 11:51:01 UTC (rev 59255)
@@ -252,8 +252,9 @@
nbr_head->searchptr = &(nbr_head->Mptr); /* see replace_neighbor */
#endif
- G_message(_("Interpolating raster map <%s> (%d rows)..."), output,
- nrows);
+ G_message(_n("Interpolating raster map <%s> (%d row)...",
+ "Interpolating raster map <%s> (%d rows)...", nrows),
+ output, nrows);
for (row = 0; row < nrows; row++) { /* loop over rows */
G_percent(row+1, nrows, 2);
Modified: grass/trunk/raster/r.surf.idw2/main.c
===================================================================
--- grass/trunk/raster/r.surf.idw2/main.c 2014-03-14 18:41:06 UTC (rev 59254)
+++ grass/trunk/raster/r.surf.idw2/main.c 2014-03-15 11:51:01 UTC (rev 59255)
@@ -109,7 +109,8 @@
fd = Rast_open_c_new(parm.output->answer);
- G_message(_("Interpolating raster map <%s>... %d rows... "),
+ G_message(_n("Interpolating raster map <%s>... %d row... ",
+ "Interpolating raster map <%s>... %d rows... ", window.rows),
parm.output->answer, window.rows);
north = window.north - window.ns_res / 2.0;
Modified: grass/trunk/raster/r.texture/main.c
===================================================================
--- grass/trunk/raster/r.texture/main.c 2014-03-14 18:41:06 UTC (rev 59254)
+++ grass/trunk/raster/r.texture/main.c 2014-03-15 11:51:01 UTC (rev 59255)
@@ -328,7 +328,8 @@
}
}
if (n_measures > 1)
- G_message(_("Calculating %d texture measures"), n_measures);
+ G_message(_n("Calculating %d texture measure",
+ "Calculating %d texture measures", n_measures), n_measures);
else
G_message(_("Calculating %s"), menu[measure_idx[0]].desc);
alloc_vars(size, dist);
Modified: grass/trunk/raster/r.thin/io.c
===================================================================
--- grass/trunk/raster/r.thin/io.c 2014-03-14 18:41:06 UTC (rev 59254)
+++ grass/trunk/raster/r.thin/io.c 2014-03-15 11:51:01 UTC (rev 59255)
@@ -98,7 +98,10 @@
n_rows = Rast_window_rows();
n_cols = Rast_window_cols();
- G_message(_("File %s -- %d rows X %d columns"), name, n_rows, n_cols);
+ /* GTC First is the file name, second and third - number of rows and cols */
+ G_message(_("File %s -- %s X %s"), name,
+ _n("%d row", "%d rows", n_rows),
+ _n("%d column", "%d columns", n_cols));
n_cols += (PAD << 1);
/* copy raster map into our read/write file */
@@ -158,9 +161,15 @@
row_count = n_rows - (PAD << 1);
col_count = n_cols - (PAD << 1);
- G_message(_("Output file %d rows X %d columns"), row_count, col_count);
- G_message(_("Window %d rows X %d columns"), Rast_window_rows(),
- Rast_window_cols());
+ /* GTC %s will be replaced with number of rows and columns */
+ G_message(_("Output file %s X %s"),
+ _n("%d row", "%d rows", row_count),
+ _n("%d column", "%d columns", col_count));
+
+ /* GTC %s will be replaced with number of rows and columns */
+ G_message(_("Window %s X %s"),
+ _n("%d row", "%d rows", Rast_window_rows()),
+ _n("%d column", "%d columns", Rast_window_cols()));
for (row = 0, k = PAD; row < row_count; row++, k++) {
buf = get_a_row(k);
Modified: grass/trunk/raster/r.thin/thin_lines.c
===================================================================
--- grass/trunk/raster/r.thin/thin_lines.c 2014-03-14 18:41:06 UTC (rev 59254)
+++ grass/trunk/raster/r.thin/thin_lines.c 2014-03-15 11:51:01 UTC (rev 59255)
@@ -166,7 +166,7 @@
} /* end row loop */
} /* j-loop */
- G_message(_("Deleted %d pixels "), deleted);
+ G_message(_n("Deleted %d pixel", "Deleted %d pixels", deleted), deleted);
} /* while delete >0 */
if ((deleted == 0) && (i <= iterations))
Modified: grass/trunk/raster/r.watershed/ram/do_cum.c
===================================================================
--- grass/trunk/raster/r.watershed/ram/do_cum.c 2014-03-14 18:41:06 UTC (rev 59254)
+++ grass/trunk/raster/r.watershed/ram/do_cum.c 2014-03-15 11:51:01 UTC (rev 59255)
@@ -471,7 +471,9 @@
}
}
if (workedon)
- G_warning(_("MFD: A * path already processed when distributing flow: %d of %d cells"),
+ G_warning(_n("MFD: A * path already processed when distributing flow: %d of %d cell",
+ "MFD: A * path already processed when distributing flow: %d of %d cells",
+ do_points),
workedon, do_points);
Modified: grass/trunk/raster/r.watershed/seg/init_vars.c
===================================================================
--- grass/trunk/raster/r.watershed/seg/init_vars.c 2014-03-14 18:41:06 UTC (rev 59254)
+++ grass/trunk/raster/r.watershed/seg/init_vars.c 2014-03-15 11:51:01 UTC (rev 59255)
@@ -129,7 +129,9 @@
if (seg_flag || bas_flag || haf_flag)
tot_parts++;
- G_message(_("SECTION 1 beginning: Initiating Variables. %d sections total."),
+ G_message(_n("SECTION 1 beginning: Initiating Variables. %d section total.",
+ "SECTION 1 beginning: Initiating Variables. %d sections total.",
+ tot_parts),
tot_parts);
this_mapset = G_mapset();
Modified: grass/trunk/raster/simwe/simlib/input.c
===================================================================
--- grass/trunk/raster/simwe/simlib/input.c 2014-03-14 18:41:06 UTC (rev 59254)
+++ grass/trunk/raster/simwe/simlib/input.c 2014-03-15 11:51:01 UTC (rev 59255)
@@ -252,7 +252,8 @@
deltap = amin1(deltap, deltaw);
- G_message(_("Number of iterations \t= %d cells\n"), miter);
+ G_message(_n("Number of iterations \t= %d cell\n",
+ "Number of iterations \t= %d cells\n", miter), miter);
G_message(_("Time step \t= %.2f s\n"), deltap);
if (wdepth) {
G_message(_("Sigmax \t= %f\nMax velocity \t= %f m/s\n"), sigmax,
More information about the grass-commit
mailing list