1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-28 09:22:27 +01:00

Menu translation support

When generating menus, lookup translations for menu entries in
specified textdomain.  Often used by linux distributions.

Original-patch-by: Alexey Voinov <voins@altlinux.ru>
Signed-off-by: Alexey I. Froloff <raorn@altlinux.org>
This commit is contained in:
Alexey I. Froloff
2010-09-10 20:51:02 +04:00
committed by Carlos R. Mafra
parent e9d42e5121
commit ca1c29cd98
4 changed files with 35 additions and 14 deletions

View File

@@ -413,9 +413,15 @@
* the string up for translation
*/
#define N_(text) (text)
#if defined(MENU_TEXTDOMAIN)
#define M_(text) dgettext(MENU_TEXTDOMAIN, text)
#else
#define M_(text) (text)
#endif
#else
#define _(text) (text)
#define N_(text) (text)
#define M_(text) (text)
#endif
#if defined(__GNUC__) && !defined(__STRICT_ANSI__)