[GRASS-SVN] r59158 - in grass/trunk/lib: gis proj vector/Vlib

svn_grass at osgeo.org svn_grass at osgeo.org
Sat Mar 1 10:00:14 PST 2014


Author: marisn
Date: 2014-03-01 10:00:14 -0800 (Sat, 01 Mar 2014)
New Revision: 59158

Modified:
   grass/trunk/lib/gis/get_ellipse.c
   grass/trunk/lib/proj/ellipse.c
   grass/trunk/lib/vector/Vlib/build_nat.c
   grass/trunk/lib/vector/Vlib/build_sfa.c
   grass/trunk/lib/vector/Vlib/cats.c
Log:
A correction of plural form text strings to use the new ngettext support

Modified: grass/trunk/lib/gis/get_ellipse.c
===================================================================
--- grass/trunk/lib/gis/get_ellipse.c	2014-03-01 17:56:30 UTC (rev 59157)
+++ grass/trunk/lib/gis/get_ellipse.c	2014-03-01 18:00:14 UTC (rev 59158)
@@ -317,9 +317,10 @@
     }
 
     (fatal ? G_fatal_error : G_warning)(
-	(err > 1)
-	? _("Lines%s of ellipsoid table file <%s> are invalid")
-	: _("Line%s of ellipsoid table file <%s> is invalid"),
+	_n(
+	("Line%s of ellipsoid table file <%s> is invalid"),
+        ("Lines%s of ellipsoid table file <%s> are invalid"),
+        err), 
 	badlines, file);
 
     G_initialize_done(&table.initialized);

Modified: grass/trunk/lib/proj/ellipse.c
===================================================================
--- grass/trunk/lib/proj/ellipse.c	2014-03-01 17:56:30 UTC (rev 59157)
+++ grass/trunk/lib/proj/ellipse.c	2014-03-01 18:00:14 UTC (rev 59158)
@@ -269,9 +269,10 @@
 	return outputlist;
 
     (fatal ? G_fatal_error : G_warning)(
-	err == 1
-	? _("Line%s of ellipsoid table file <%s> is invalid")
-	: _("Lines%s of ellipsoid table file <%s> are invalid"),
+	_n(
+        ("Line%s of ellipsoid table file <%s> is invalid"),
+	("Lines%s of ellipsoid table file <%s> are invalid"),
+        err), 
 	badlines, file);
 
     return outputlist;

Modified: grass/trunk/lib/vector/Vlib/build_nat.c
===================================================================
--- grass/trunk/lib/vector/Vlib/build_nat.c	2014-03-01 17:56:30 UTC (rev 59157)
+++ grass/trunk/lib/vector/Vlib/build_nat.c	2014-03-01 18:00:14 UTC (rev 59158)
@@ -114,8 +114,8 @@
 	}
 	G_progress(1, 1);
 
-	G_message(_("%d primitives registered"), plus->n_lines);
-	G_message(_("%d vertices registered"), npoints);
+	G_message(_n("One primitive registered", "%d primitives registered", plus->n_lines), plus->n_lines);
+	G_message(_n("One vertex registered", "%d vertices registered", npoints), npoints);
 
 	plus->built = GV_BUILD_BASE;
     }
@@ -149,8 +149,8 @@
 		Vect_build_line_area(Map, line, side);
 	    }
 	}
-	G_message(_("%d areas built"), plus->n_areas);
-	G_message(_("%d isles built"), plus->n_isles);
+	G_message(_n("One area built", "%d areas built", plus->n_areas), plus->n_areas);
+	G_message(_n("One isle built", "%d isles built", plus->n_isles), plus->n_isles);
 	plus->built = GV_BUILD_AREAS;
     }
 

Modified: grass/trunk/lib/vector/Vlib/build_sfa.c
===================================================================
--- grass/trunk/lib/vector/Vlib/build_sfa.c	2014-03-01 17:56:30 UTC (rev 59157)
+++ grass/trunk/lib/vector/Vlib/build_sfa.c	2014-03-01 18:00:14 UTC (rev 59158)
@@ -382,8 +382,8 @@
     }
     G_progress(1, 1);
 
-    G_message(_("%d primitives registered"), Map->plus.n_lines);
-    G_message(_("%d vertices registered"), npoints);
+    G_message(_n("One primitive registered", "%d primitives registered", Map->plus.n_lines), Map->plus.n_lines);
+    G_message(_n("One vertex registered", "%d vertices registered", npoints), npoints);
 
     Map->plus.built = GV_BUILD_BASE;
 
@@ -658,12 +658,11 @@
     } /* while */
     G_progress(1, 1);
     
-    G_message(_("%d primitives registered"), Map->plus.n_lines);
-    G_message(_("%d vertices registered"), npoints);
+    G_message(_n("One primitive registered", "%d primitives registered", Map->plus.n_lines), Map->plus.n_lines);
+    G_message(_n("One vertex registered", "%d vertices registered", npoints), npoints);
     
     if (nskipped > 0)
-        G_warning(_("%d %s without geometry skipped"), nskipped,
-                  nskipped == 1 ? "feature" : "features");
+        G_warning(_n("One feature without geometry skipped", "%d features without geometry skipped", nskipped), nskipped);
         
     Map->plus.built = GV_BUILD_BASE;
     

Modified: grass/trunk/lib/vector/Vlib/cats.c
===================================================================
--- grass/trunk/lib/vector/Vlib/cats.c	2014-03-01 17:56:30 UTC (rev 59157)
+++ grass/trunk/lib/vector/Vlib/cats.c	2014-03-01 18:00:14 UTC (rev 59158)
@@ -602,7 +602,7 @@
 	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("One category loaded", "%d categories loaded", ncats), ncats);
 	    
 	db_close_database_shutdown_driver(driver);
 



More information about the grass-commit mailing list