aboutsummaryrefslogtreecommitdiff
path: root/contrib/pam_modules/pam_passwdqc/passwdqc_i18n.h
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/pam_modules/pam_passwdqc/passwdqc_i18n.h')
-rw-r--r--contrib/pam_modules/pam_passwdqc/passwdqc_i18n.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/contrib/pam_modules/pam_passwdqc/passwdqc_i18n.h b/contrib/pam_modules/pam_passwdqc/passwdqc_i18n.h
new file mode 100644
index 000000000000..dbdad453cf5e
--- /dev/null
+++ b/contrib/pam_modules/pam_passwdqc/passwdqc_i18n.h
@@ -0,0 +1,26 @@
+/*
+ * Copyright (c) 2017 by Dmitry V. Levin
+ * Copyright (c) 2017 by Oleg Solovyov
+ * See LICENSE
+ */
+
+#ifndef PASSWDQC_I18N_H__
+#define PASSWDQC_I18N_H__
+
+#ifdef ENABLE_NLS
+#ifndef PACKAGE
+#define PACKAGE "passwdqc"
+#endif
+#include <libintl.h>
+#define _(msgid) dgettext(PACKAGE, msgid)
+#define P2_(msgid, count) (dngettext(PACKAGE, (msgid), (msgid), (count)))
+#define P3_(msgid, msgid_plural, count) (dngettext(PACKAGE, (msgid), (msgid_plural), (count)))
+#define N_(msgid) msgid
+#else
+#define _(msgid) (msgid)
+#define P2_(msgid, count) (msgid)
+#define P3_(msgid, msgid_plural, count) ((count) == 1 ? (msgid) : (msgid_plural))
+#define N_(msgid) msgid
+#endif
+
+#endif /* PASSWDQC_I18N_H__ */