Because gettext is allowed to do as it pleases...
...when it is fed with an empty string, let's workaround it by adding a new function.
This commit is contained in:
parent
e986dc7ac0
commit
be62da89b1
2 changed files with 7 additions and 0 deletions
|
@ -4,6 +4,11 @@
|
|||
|
||||
#include <cstring>
|
||||
|
||||
char const *egettext(char const *msgid)
|
||||
{
|
||||
return msgid[0] == '\0' ? msgid : gettext(msgid);
|
||||
}
|
||||
|
||||
const char* sgettext (const char *msgid)
|
||||
{
|
||||
const char *msgval = gettext (msgid);
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
|
||||
// gettext-related declarations
|
||||
#include <libintl.h>
|
||||
|
||||
const char* egettext (const char*);
|
||||
const char* sgettext (const char*);
|
||||
const char* dsgettext (const char * domainname, const char *msgid);
|
||||
std::string vgettext (const char*,const string_map&);
|
||||
|
|
Loading…
Add table
Reference in a new issue