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:
@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user