1 /* 2 * Copyright (c) 2017 by Dmitry V. Levin 3 * Copyright (c) 2017 by Oleg Solovyov 4 * See LICENSE 5 */ 6 7 #ifndef PASSWDQC_I18N_H__ 8 #define PASSWDQC_I18N_H__ 9 10 #ifdef ENABLE_NLS 11 #ifndef PACKAGE 12 #define PACKAGE "passwdqc" 13 #endif 14 #include <libintl.h> 15 #define _(msgid) dgettext(PACKAGE, msgid) 16 #define P2_(msgid, count) (dngettext(PACKAGE, (msgid), (msgid), (count))) 17 #define P3_(msgid, msgid_plural, count) (dngettext(PACKAGE, (msgid), (msgid_plural), (count))) 18 #define N_(msgid) msgid 19 #else 20 #define _(msgid) (msgid) 21 #define P2_(msgid, count) (msgid) 22 #define P3_(msgid, msgid_plural, count) ((count) == 1 ? (msgid) : (msgid_plural)) 23 #define N_(msgid) msgid 24 #endif 25 26 #endif /* PASSWDQC_I18N_H__ */ 27