2011-02-22 23:41:20 +00:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2010-2011 Ævar Arnfjörð Bjarmason
|
|
|
|
*
|
|
|
|
* This is a skeleton no-op implementation of gettext for Git.
|
|
|
|
* You can replace it with something that uses libintl.h and wraps
|
|
|
|
* gettext() to try out the translations.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef GETTEXT_H
|
|
|
|
#define GETTEXT_H
|
|
|
|
|
|
|
|
#ifdef _
|
|
|
|
#error "namespace conflict: '_' is pre-defined?"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#define FORMAT_PRESERVING(n) __attribute__((format_arg(n)))
|
|
|
|
|
2011-02-22 23:41:21 +00:00
|
|
|
#ifdef GETTEXT_POISON
|
|
|
|
#define use_gettext_poison() 1
|
|
|
|
#else
|
|
|
|
#define use_gettext_poison() 0
|
|
|
|
#endif
|
|
|
|
|
2011-02-22 23:41:20 +00:00
|
|
|
static inline FORMAT_PRESERVING(1) const char *_(const char *msgid)
|
|
|
|
{
|
2011-02-22 23:41:21 +00:00
|
|
|
return use_gettext_poison() ? "# GETTEXT POISON #" : msgid;
|
2011-02-22 23:41:20 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* Mark msgid for translation but do not translate it. */
|
|
|
|
#define N_(msgid) (msgid)
|
|
|
|
|
|
|
|
#endif
|