summaryrefslogtreecommitdiffstats
path: root/gettext-tools/src/msgexec.c
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2005-10-06 11:20:08 +0000
committerBruno Haible <bruno@clisp.org>2009-06-23 12:12:52 +0200
commitf1f805bcf63cd5073235be63957b064899427516 (patch)
tree1a66b301119e582f347450e57a8b40531996553d /gettext-tools/src/msgexec.c
parent57424044ae0a92479daa4031fe01bc55a5afc5f8 (diff)
downloadexternal_gettext-f1f805bcf63cd5073235be63957b064899427516.zip
external_gettext-f1f805bcf63cd5073235be63957b064899427516.tar.gz
external_gettext-f1f805bcf63cd5073235be63957b064899427516.tar.bz2
Support for context dependent translations in PO files.
Diffstat (limited to 'gettext-tools/src/msgexec.c')
-rw-r--r--gettext-tools/src/msgexec.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gettext-tools/src/msgexec.c b/gettext-tools/src/msgexec.c
index 2090718..2a7939f 100644
--- a/gettext-tools/src/msgexec.c
+++ b/gettext-tools/src/msgexec.c
@@ -331,6 +331,10 @@ process_string (const message_ty *mp, const char *str, size_t len)
int exitstatus;
/* Set environment variables for the subprocess. */
+ if (mp->msgctxt != NULL)
+ xsetenv ("MSGEXEC_MSGCTXT", mp->msgctxt, 1);
+ else
+ unsetenv ("MSGEXEC_MSGCTXT");
xsetenv ("MSGEXEC_MSGID", mp->msgid, 1);
location = xasprintf ("%s:%ld", mp->pos.file_name,
(long) mp->pos.line_number);