medit/moo/mooutils/mooi18n.h

66 lines
1.8 KiB
C
Raw Normal View History

2006-08-02 22:39:06 -07:00
/*
* mooi18n.h
*
2007-04-07 01:21:52 -07:00
* Copyright (C) 2004-2007 by Yevgen Muntyan <muntyan@math.tamu.edu>
2006-08-02 22:39:06 -07:00
*
2007-06-24 10:56:20 -07:00
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
2006-08-02 22:39:06 -07:00
*
* See COPYING file that comes with this distribution.
*/
#ifndef MOO_I18N_H
#define MOO_I18N_H
2006-08-02 22:39:06 -07:00
#include <config.h>
#include <glib/gstrfuncs.h>
#include <libintl.h>
G_BEGIN_DECLS
#ifdef ENABLE_NLS
2006-08-05 00:07:56 -07:00
#define _(String) moo_gettext (String)
#define Q_(String) g_strip_context ((String), moo_gettext (String))
#define N_(String) (String)
#define D_(String,Domain) dgettext (Domain, String)
2006-08-03 00:29:39 -07:00
#define QD_(String,Domain) g_strip_context ((String), D_ (String, Domain))
#else /* !ENABLE_NLS */
2006-11-17 21:10:56 -08:00
#undef textdomain
#undef gettext
#undef dgettext
#undef dcgettext
2007-02-27 20:55:05 -08:00
#undef ngettext
2006-11-17 21:10:56 -08:00
#undef bindtextdomain
#undef bind_textdomain_codeset
#define _(String) (String)
#define N_(String) (String)
2006-08-03 00:29:39 -07:00
#define Q_(String) g_strip_context ((String), (String))
#define D_(String,Domain) (String)
2006-08-03 00:29:39 -07:00
#define QD_(String,Domain) g_strip_context ((String), (String))
#define textdomain(String) (String)
#define gettext(String) (String)
#define dgettext(Domain,String) (String)
#define dcgettext(Domain,String,Type) (String)
#define ngettext(str,str_pl,n) ((n) > 1 ? (str_pl) : (str))
#define dngettext(dom,str,str_pl,n) ((n) > 1 ? (str_pl) : (str))
#define bindtextdomain(Domain,Directory) (Domain)
#define bind_textdomain_codeset(Domain,Codeset) (Codeset)
#endif /* !ENABLE_NLS */
const char *moo_gettext (const char *string);
2007-06-18 03:18:02 -07:00
const char *_moo_gsv_gettext (const char *string);
char *_moo_gsv_dgettext (const char *domain, const char *string);
G_END_DECLS
2006-08-02 22:39:06 -07:00
#endif /* MOO_I18N_H */