summaryrefslogtreecommitdiff
path: root/gl/gettext.h
diff options
context:
space:
mode:
authorPawel Kowalski <p.kowalski2@partner.samsung.com>2018-06-15 11:24:08 +0200
committerPawel Kowalski <p.kowalski2@partner.samsung.com>2018-06-15 11:26:09 +0200
commit5c7e0aaf17a296535495e3431db6a86ad64064b3 (patch)
treed7cca0250c60fbc69eb70a7039d0f9659f81b9d0 /gl/gettext.h
parent1701584f7841a79ae4e97699a8c4ac9f0a09c38f (diff)
parente527f54afdf27ab8ce73a22d05d69e5482f5e92b (diff)
downloadlibtasn1-5c7e0aaf17a296535495e3431db6a86ad64064b3.tar.gz
libtasn1-5c7e0aaf17a296535495e3431db6a86ad64064b3.tar.bz2
libtasn1-5c7e0aaf17a296535495e3431db6a86ad64064b3.zip
Change-Id: I254f6095d312777427a57af3ed346986a28f3aaa
Diffstat (limited to 'gl/gettext.h')
-rw-r--r--gl/gettext.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/gl/gettext.h b/gl/gettext.h
index c7d6fd3..0465d7a 100644
--- a/gl/gettext.h
+++ b/gl/gettext.h
@@ -1,5 +1,5 @@
/* Convenience header for conditional use of GNU <libintl.h>.
- Copyright (C) 1995-1998, 2000-2002, 2004-2006, 2009-2014 Free Software
+ Copyright (C) 1995-1998, 2000-2002, 2004-2006, 2009-2017 Free Software
Foundation, Inc.
This program is free software; you can redistribute it and/or modify
@@ -225,15 +225,17 @@ dcpgettext_expr (const char *domain,
if (msg_ctxt_id != NULL)
#endif
{
+ int found_translation;
memcpy (msg_ctxt_id, msgctxt, msgctxt_len - 1);
msg_ctxt_id[msgctxt_len - 1] = '\004';
memcpy (msg_ctxt_id + msgctxt_len, msgid, msgid_len);
translation = dcgettext (domain, msg_ctxt_id, category);
+ found_translation = (translation != msg_ctxt_id);
#if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS
if (msg_ctxt_id != buf)
free (msg_ctxt_id);
#endif
- if (translation != msg_ctxt_id)
+ if (found_translation)
return translation;
}
return msgid;
@@ -271,15 +273,17 @@ dcnpgettext_expr (const char *domain,
if (msg_ctxt_id != NULL)
#endif
{
+ int found_translation;
memcpy (msg_ctxt_id, msgctxt, msgctxt_len - 1);
msg_ctxt_id[msgctxt_len - 1] = '\004';
memcpy (msg_ctxt_id + msgctxt_len, msgid, msgid_len);
translation = dcngettext (domain, msg_ctxt_id, msgid_plural, n, category);
+ found_translation = !(translation == msg_ctxt_id || translation == msgid_plural);
#if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS
if (msg_ctxt_id != buf)
free (msg_ctxt_id);
#endif
- if (!(translation == msg_ctxt_id || translation == msgid_plural))
+ if (found_translation)
return translation;
}
return (n == 1 ? msgid : msgid_plural);