r15133 - gnucash/trunk/src/backend/file - Remove compiled-in pathname LOCALE_DIR by relocatable runtime function

Christian Stimming cstim at cvs.gnucash.org
Fri Nov 24 08:50:42 EST 2006


Author: cstim
Date: 2006-11-24 08:50:41 -0500 (Fri, 24 Nov 2006)
New Revision: 15133
Trac: http://svn.gnucash.org/trac/changeset/15133

Modified:
   gnucash/trunk/src/backend/file/gnc-backend-file.c
Log:
Remove compiled-in pathname LOCALE_DIR by relocatable runtime function

Modified: gnucash/trunk/src/backend/file/gnc-backend-file.c
===================================================================
--- gnucash/trunk/src/backend/file/gnc-backend-file.c	2006-11-24 13:14:41 UTC (rev 15132)
+++ gnucash/trunk/src/backend/file/gnc-backend-file.c	2006-11-24 13:50:41 UTC (rev 15133)
@@ -50,6 +50,7 @@
 #include "gnc-engine.h"
 
 #include "gnc-filepath-utils.h"
+#include "gnc-path.h"
 
 #include "io-gncxml.h"
 #include "io-gncxml-v2.h"
@@ -1051,10 +1052,16 @@
 {
 	QofBackendProvider *prov;
 #ifdef ENABLE_NLS
+	gchar *localedir = gnc_path_get_localedir ();
+	/* FIXME: It is unclear whether setlocale() is actually
+	   needed here (added in r11313). Some platforms might
+	   need it so that gettext works correctly in this
+	   GModule. We'll keep it for now. */
 	setlocale (LC_ALL, "");
-	bindtextdomain (GETTEXT_PACKAGE, LOCALE_DIR);
+	bindtextdomain (GETTEXT_PACKAGE, localedir);
 	bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
 	textdomain (GETTEXT_PACKAGE);
+	g_free (localedir);
 #endif
         prov = g_new0 (QofBackendProvider, 1);
         prov->provider_name = "GnuCash File Backend Version 2";



More information about the gnucash-changes mailing list