Add P_() macro for translating property strings

The P_() macro adds a context for the property nick and blurb. In order
to make xgettext recognize it, we need to drop glib-gettexize inside the
autogen.sh script and ship a modified Makefile.in.in with Clutter.
This commit is contained in:
Emmanuele Bassi
2010-06-03 12:56:17 +01:00
parent 292597a9e1
commit 8be43b5285
8 changed files with 318 additions and 11 deletions

View File

@ -30,6 +30,12 @@
* Various miscellaneous utilility functions.
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <glib/gi18n-lib.h>
#include "clutter-util.h"
#include "clutter-main.h"
@ -53,3 +59,17 @@ clutter_util_next_p2 (gint a)
return rval;
}
/*< private >
* _clutter_gettext:
* @str: a string to localize
*
* Retrieves the localized version of @str, using the Clutter domain
*
* Return value: the translated string
*/
G_CONST_RETURN gchar *
_clutter_gettext (const gchar *str)
{
return g_dgettext (GETTEXT_PACKAGE, str);
}