gnucash master: Bug 797746 - [reports] German umlauts not escaped

John Ralls jralls at code.gnucash.org
Sun Jun 7 13:46:20 EDT 2020


Updated	 via  https://github.com/Gnucash/gnucash/commit/b5aeca94 (commit)
	from  https://github.com/Gnucash/gnucash/commit/55aadc0b (commit)



commit b5aeca94b6f4cbf89072431212cbdef28a8aff18
Author: John Ralls <jralls at ceridwen.us>
Date:   Sun Jun 7 10:38:22 2020 -0700

    Bug 797746 - [reports] German umlauts not escaped
    
    Resume using libintl directly. Guile apparently passes gettext msgstrs
    through scm_from_locale_string instead of scm_from_utf8_string.

diff --git a/bindings/core-utils.i b/bindings/core-utils.i
index f66a184e8..8695d64cd 100644
--- a/bindings/core-utils.i
+++ b/bindings/core-utils.i
@@ -29,6 +29,8 @@
 #include <gnc-locale-utils.h>
 #include <glib.h>
 #include <gnc-version.h>
+#include <libintl.h>
+
 %}
 #if defined(SWIGGUILE)
 %{
@@ -154,6 +156,8 @@ gchar *gnc_locale_name (void);
 
 }
 
+%rename ("gnc:gettext") gettext;
+extern const char* gettext(const char*);
 %rename ("gnc-utf8?") wrap_gnc_utf8_validate;
 %inline %{
   /* This helper function wraps gnc_utf8_validate() into a predicate. */
@@ -162,6 +166,7 @@ gchar *gnc_locale_name (void);
   {
     return gnc_utf8_validate(str, -1, 0);
   }
+
 %}
 #elif defined(SWIGPYTHON)
 gboolean gnc_utf8_validate(const gchar *, gssize, const gchar**);
diff --git a/bindings/guile/core-utils.scm b/bindings/guile/core-utils.scm
index 26ce6d40d..53d363dad 100644
--- a/bindings/guile/core-utils.scm
+++ b/bindings/guile/core-utils.scm
@@ -38,7 +38,7 @@
 
 (define-public gnc:version (gnc-version))
 ;; gettext functions
-(define-public _ gettext)
+(define-public _ gnc:gettext)
 (define-syntax N_
     (syntax-rules ()
         ((_ x) x)))



Summary of changes:
 bindings/core-utils.i         | 5 +++++
 bindings/guile/core-utils.scm | 2 +-
 2 files changed, 6 insertions(+), 1 deletion(-)



More information about the gnucash-changes mailing list