aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xChangeLog6
-rw-r--r--interpret.h5
2 files changed, 10 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 54728603..fc4eec58 100755
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2019-01-08 Arnold D. Robbins <arnold@skeeve.com>
+
+ * interpret.h (r_interpret): For a translatable string, only copy
+ the gettext return value if it's different from the original.
+ Otherwise, use the original.
+
2018-12-21 Arnold D. Robbins <arnold@skeeve.com>
* configure.ac: Remove -O only if .developing has 'debug' in it.
diff --git a/interpret.h b/interpret.h
index 4381a929..2934c5c0 100644
--- a/interpret.h
+++ b/interpret.h
@@ -156,7 +156,10 @@ top:
orig = m->stptr;
trans = dgettext(TEXTDOMAIN, orig);
m->stptr[m->stlen] = save;
- m = make_string(trans, strlen(trans));
+ if (trans != orig) // got a translation
+ m = make_string(trans, strlen(trans));
+ else
+ UPREF(m);
} else
UPREF(m);
PUSH(m);