浏览代码

lock.c: add missing header, define PACKAGE name
(merge https://trac.osgeo.org/grass/changeset/46601 from trunk)


git-svn-id: https://svn.osgeo.org/grass/grass/trunk@46603 15284696-431f-4ddb-bdfa-cd5b030d7da7

Martin Landa 14 年之前
父节点
当前提交
25b356ba2f
共有 2 个文件被更改,包括 7 次插入3 次删除
  1. 3 0
      lib/init/Makefile
  2. 4 3
      lib/init/lock.c

+ 3 - 0
lib/init/Makefile

@@ -3,6 +3,9 @@ MODULE_TOPDIR = ../..
 include $(MODULE_TOPDIR)/include/Make/Other.make
 include $(MODULE_TOPDIR)/include/Make/Compile.make
 
+#for i18N support
+PACKAGE ="grasslibs"
+
 START_UP=grass$(GRASS_VERSION_MAJOR)$(GRASS_VERSION_MINOR)
 
 EXTRA_CFLAGS = \

+ 4 - 3
lib/init/lock.c

@@ -7,6 +7,7 @@
 #include <signal.h>
 #include "local_proto.h"
 #include <grass/gis.h>
+#include <grass/glocale.h>
 
 /******************************************************************
 *lock file pid
@@ -34,7 +35,7 @@ int main(int argc, char *argv[])
     int locked;
 
     if (argc != 3 || sscanf(argv[2], "%d", &lockpid) != 1)
-	G_fatal_error("usage: %s file pid", argv[0]);
+	G_fatal_error(_("Usage: %s file pid"), argv[0]);
 #define file argv[1]
 
 #ifdef __MINGW32__
@@ -56,8 +57,8 @@ int main(int argc, char *argv[])
 	G_fatal_error("%s: ", argv[0]);
     }
     if (write(lock, &lockpid, sizeof lockpid) != sizeof lockpid)
-	G_fatal_error("%s: can't write lockfile %s (disk full? Permissions?)",
-		      argv[0], file);
+	G_fatal_error(_("Unable to write lockfile %s (disk full? Permissions?)"),
+		      file);
     close(lock);
     exit(0);
 #endif