[GRASS-SVN] r43512 - grass/branches/releasebranch_6_4/general/g.access

svn_grass at osgeo.org svn_grass at osgeo.org
Sat Sep 18 15:40:07 EDT 2010


Author: neteler
Date: 2010-09-18 19:40:07 +0000 (Sat, 18 Sep 2010)
New Revision: 43512

Modified:
   grass/branches/releasebranch_6_4/general/g.access/exp_perms.c
   grass/branches/releasebranch_6_4/general/g.access/set_perms.c
Log:
backport: i18N

Modified: grass/branches/releasebranch_6_4/general/g.access/exp_perms.c
===================================================================
--- grass/branches/releasebranch_6_4/general/g.access/exp_perms.c	2010-09-18 16:15:52 UTC (rev 43511)
+++ grass/branches/releasebranch_6_4/general/g.access/exp_perms.c	2010-09-18 19:40:07 UTC (rev 43512)
@@ -1,32 +1,34 @@
 #include <grass/gis.h>
+#include <grass/glocale.h>
+
 char *explain_perms(int group, int other, int will)
 {
-    static char buf[128];
+    static char buf[256];
     char *who;
     char *verb;
     char *read;
 
-    verb = "have";
-    read = "read ";
+    verb = _("have");
+    read = _("read ");
     read = "";			/* remove this to have "read" appear */
     if (group && other) {
-	who = "Everyone";
-	verb = "has";
+	who = _("Everyone");
+	verb = _("has");
     }
     else if (group) {
-	who = "Only users in your group";
+	who = _("Only users in your group");
     }
     else if (other) {
-	who = "Only users outside your group";
+	who = _("Only users outside your group");
     }
     else {
-	who = "Only you";
+	who = _("Only you");
 	read = "";
     }
     if (will)
-	verb = "have";
+	verb = _("have");
 
-    sprintf(buf, "%s %s %s %saccess to mapset %s",
-	    who, will ? "will" : "now", verb, read, G_mapset());
+    sprintf(buf, _("%s %s %s %saccess to mapset %s"),
+	    who, will ? _("will") : _("now"), verb, read, G_mapset());
     return buf;
 }

Modified: grass/branches/releasebranch_6_4/general/g.access/set_perms.c
===================================================================
--- grass/branches/releasebranch_6_4/general/g.access/set_perms.c	2010-09-18 16:15:52 UTC (rev 43511)
+++ grass/branches/releasebranch_6_4/general/g.access/set_perms.c	2010-09-18 19:40:07 UTC (rev 43512)
@@ -2,6 +2,7 @@
 #include <sys/stat.h>
 #include <sys/types.h>
 #include <grass/gis.h>
+#include <grass/glocale.h>
 #include "access.h"
 #include "local_proto.h"
 
@@ -22,7 +23,7 @@
     if (chmod(path, perms) == 0)
 	fprintf(stdout, "%s\n", explain_perms(group, other, 0));
     else
-	G_fatal_error("unable to change mapset permissions");
+	G_fatal_error(_("Unable to change mapset permissions"));
 
     return 0;
 }



More information about the grass-commit mailing list