mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-09 04:15:49 +01:00
gio/ docs/reference/gio Merged gio-standalone into glib.
2007-11-26 Alexander Larsson <alexl@redhat.com> * Makefile.am: * configure.in: * gio-2.0-uninstalled.pc.in: * gio-2.0.pc.in: * gio-unix-2.0-uninstalled.pc.in: * gio-unix-2.0.pc.in: * gio/ * docs/reference/gio Merged gio-standalone into glib. * glib/glibintl.h: * glib/gutils.c: Export glib_gettext so that gio can use it Add P_ (using same domain for now) Add I_ as g_intern_static_string svn path=/trunk/; revision=5940
This commit is contained in:
parent
bdbb9b8323
commit
8bdbcb9213
@ -7,10 +7,12 @@
|
|||||||
|
|
||||||
#ifdef ENABLE_NLS
|
#ifdef ENABLE_NLS
|
||||||
|
|
||||||
gchar *_glib_gettext (const gchar *str) G_GNUC_FORMAT (1);
|
gchar *glib_gettext (const gchar *str);
|
||||||
|
|
||||||
#include <libintl.h>
|
#include <libintl.h>
|
||||||
#define _(String) _glib_gettext(String)
|
#define _(String) glib_gettext(String)
|
||||||
|
/* Split out this in the code, but keep it in the same domain for now */
|
||||||
|
#define P_(String) glib_gettext(String)
|
||||||
|
|
||||||
#ifdef gettext_noop
|
#ifdef gettext_noop
|
||||||
#define N_(String) gettext_noop(String)
|
#define N_(String) gettext_noop(String)
|
||||||
@ -20,6 +22,7 @@ gchar *_glib_gettext (const gchar *str) G_GNUC_FORMAT (1);
|
|||||||
#else /* NLS is disabled */
|
#else /* NLS is disabled */
|
||||||
#define _(String) (String)
|
#define _(String) (String)
|
||||||
#define N_(String) (String)
|
#define N_(String) (String)
|
||||||
|
#define P_(String) (String)
|
||||||
#define textdomain(String) (String)
|
#define textdomain(String) (String)
|
||||||
#define gettext(String) (String)
|
#define gettext(String) (String)
|
||||||
#define dgettext(Domain,String) (String)
|
#define dgettext(Domain,String) (String)
|
||||||
@ -27,4 +30,7 @@ gchar *_glib_gettext (const gchar *str) G_GNUC_FORMAT (1);
|
|||||||
#define bindtextdomain(Domain,Directory) (Domain)
|
#define bindtextdomain(Domain,Directory) (Domain)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* not really I18N-related, but also a string marker macro */
|
||||||
|
#define I_(string) g_intern_static_string (string)
|
||||||
|
|
||||||
#endif /* __GLIBINTL_H__ */
|
#endif /* __GLIBINTL_H__ */
|
||||||
|
@ -3171,8 +3171,16 @@ _glib_get_locale_dir (void)
|
|||||||
|
|
||||||
#endif /* G_OS_WIN32 */
|
#endif /* G_OS_WIN32 */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* glib_gettext:
|
||||||
|
* str: The string to be translated
|
||||||
|
*
|
||||||
|
* Returns the translated string from the glib translations.
|
||||||
|
* This is an internal function and should only be used by
|
||||||
|
* the internals of glib (such as libgio).
|
||||||
|
*/
|
||||||
G_CONST_RETURN gchar *
|
G_CONST_RETURN gchar *
|
||||||
_glib_gettext (const gchar *str)
|
glib_gettext (const gchar *str)
|
||||||
{
|
{
|
||||||
static gboolean _glib_gettext_initialized = FALSE;
|
static gboolean _glib_gettext_initialized = FALSE;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user