i18n: add no-op _() and N_() wrappers
[alt-git.git] / gettext.h
blob6949d736d5fc5425555352b4c7a43f72bd4108b8
1 /*
2 * Copyright (c) 2010-2011 Ævar Arnfjörð Bjarmason
4 * This is a skeleton no-op implementation of gettext for Git.
5 * You can replace it with something that uses libintl.h and wraps
6 * gettext() to try out the translations.
7 */
9 #ifndef GETTEXT_H
10 #define GETTEXT_H
12 #ifdef _
13 #error "namespace conflict: '_' is pre-defined?"
14 #endif
16 #define FORMAT_PRESERVING(n) __attribute__((format_arg(n)))
18 static inline FORMAT_PRESERVING(1) const char *_(const char *msgid)
20 return msgid;
23 /* Mark msgid for translation but do not translate it. */
24 #define N_(msgid) (msgid)
26 #endif