gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r686 - in GNUnet/src: conf include util


From: durner
Subject: [GNUnet-SVN] r686 - in GNUnet/src: conf include util
Date: Sun, 24 Apr 2005 06:16:41 -0700 (PDT)

Author: durner
Date: 2005-04-24 06:12:51 -0700 (Sun, 24 Apr 2005)
New Revision: 686

Modified:
   GNUnet/src/conf/Makefile.am
   GNUnet/src/conf/wizard.c
   GNUnet/src/include/gnunet_util.h
   GNUnet/src/util/initialize.c
Log:
Use the right .mo location

Modified: GNUnet/src/conf/Makefile.am
===================================================================
--- GNUnet/src/conf/Makefile.am 2005-04-24 13:03:57 UTC (rev 685)
+++ GNUnet/src/conf/Makefile.am 2005-04-24 13:12:51 UTC (rev 686)
@@ -4,9 +4,6 @@
 
 # GNU Gettext support
 LIBS = @LIBINTL@ @LIBS@
-# Define a C macro LOCALEDIR indicating where catalogs will be installed.
-localedir = $(datadir)/locale
-DEFS = -DLOCALEDIR=\"$(localedir)\" @DEFS@
 
 if MINGW
  WINTOOL = gnunet-win-tool

Modified: GNUnet/src/conf/wizard.c
===================================================================
--- GNUnet/src/conf/wizard.c    2005-04-24 13:03:57 UTC (rev 685)
+++ GNUnet/src/conf/wizard.c    2005-04-24 13:12:51 UTC (rev 686)
@@ -279,8 +279,11 @@
 wizard_main (int argc, char *argv[])
 {
 #ifdef ENABLE_NLS
+               char lcdir[251];
+
        setlocale (LC_ALL, "");
-               bindtextdomain(PACKAGE, LOCALEDIR);
+       getLocaleDir(lcdir);
+               bindtextdomain(PACKAGE, lcdir);
                textdomain(PACKAGE);
                /* GTK uses UTF-8 encoding */
                bind_textdomain_codeset(PACKAGE, "UTF-8");

Modified: GNUnet/src/include/gnunet_util.h
===================================================================
--- GNUnet/src/include/gnunet_util.h    2005-04-24 13:03:57 UTC (rev 685)
+++ GNUnet/src/include/gnunet_util.h    2005-04-24 13:12:51 UTC (rev 686)
@@ -2292,6 +2292,12 @@
 
 
 /**
+ * Location of the gettext catalog
+ */
+void getLocaleDir(char *dir);
+
+
+/**
  * Helper functions
  */
 #ifdef WINDOWS
@@ -2299,13 +2305,8 @@
 int ListNICs(void (*callback) (char *, int));
 int InstallAsService();
 int UninstallService();
-
-#ifndef LOCALEDIR
- #define LOCALEDIR "/share/locale"
 #endif
 
-#endif
-
 /* ifndef GNUNET_UTIL_H */
 #endif
 /* end of gnunet_util.h */

Modified: GNUnet/src/util/initialize.c
===================================================================
--- GNUnet/src/util/initialize.c        2005-04-24 13:03:57 UTC (rev 685)
+++ GNUnet/src/util/initialize.c        2005-04-24 13:12:51 UTC (rev 686)
@@ -105,6 +105,18 @@
 void doneCron();
 
 /**
+ * Get location of gettext catalogs
+ */
+void getLocaleDir(char *dir)
+{
+#ifdef WINDOWS
+       conv_to_win_path("/share/locale/", dir);
+#else
+       strcpy(dir, LOCALEDIR);
+#endif
+}
+
+/**
  * Initialize the util library. Use argc, argv and the given parser
  * for processing command-line options <strong>after</strong> the
  * configuration module was initialized, but <strong>before</strong> logging
@@ -113,18 +125,21 @@
 int initUtil(int argc,
             char * argv[],
             CommandLineParser parser) {
+       char lcdir[251];
 
+#ifdef MINGW
+  InitWinEnv();
+#endif
+
   setlocale (LC_ALL, "");
-  bindtextdomain (PACKAGE, LOCALEDIR);
+  getLocaleDir(lcdir);
+  bindtextdomain (PACKAGE, lcdir);
   textdomain (PACKAGE);
 
   gnunet_util_initIO();
   initLockingGcrypt();
   initRAND();
   initXmalloc();
-#ifdef MINGW
-  InitWinEnv();
-#endif
   initConfiguration();
   if (argc > 0)
     setConfigurationString("MAIN",





reply via email to

[Prev in Thread] Current Thread [Next in Thread]