summaryrefslogtreecommitdiffstats
path: root/lib/support/nls-enable.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--lib/support/nls-enable.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/lib/support/nls-enable.h b/lib/support/nls-enable.h
new file mode 100644
index 0000000..2f62c01
--- /dev/null
+++ b/lib/support/nls-enable.h
@@ -0,0 +1,21 @@
+#if defined(ENABLE_NLS) && !defined(DEBUGFS)
+#include <libintl.h>
+#include <locale.h>
+#define _(a) (gettext (a))
+#ifdef gettext_noop
+#define N_(a) gettext_noop (a)
+#else
+#define N_(a) (a)
+#endif
+#define P_(singular, plural, n) (ngettext (singular, plural, n))
+#ifndef NLS_CAT_NAME
+#define NLS_CAT_NAME "e2fsprogs"
+#endif
+#ifndef LOCALEDIR
+#define LOCALEDIR "/usr/share/locale"
+#endif
+#else
+#define _(a) (a)
+#define N_(a) a
+#define P_(singular, plural, n) ((n) == 1 ? (singular) : (plural))
+#endif