aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/gettext.h
blob: acc7e3a92c16d3d47488dd7119d6d14c8293533d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#ifndef NVIM_GETTEXT_H
#define NVIM_GETTEXT_H

#ifdef HAVE_WORKING_LIBINTL
# include <libintl.h>
# define _(x) gettext((char *)(x))
// XXX do we actually need this?
# ifdef gettext_noop
#  define N_(x) gettext_noop(x)
# else
#  define N_(x) x
# endif
# define NGETTEXT(x, xs, n) ngettext(x, xs, n)
#else
# define _(x) ((char *)(x))
# define N_(x) x
# define NGETTEXT(x, xs, n) ((n) == 1 ? (x) : (xs))
# define bindtextdomain(x, y)  // empty
# define bind_textdomain_codeset(x, y)  // empty
# define textdomain(x)  // empty
#endif

#endif  // NVIM_GETTEXT_H