summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilip Withnall <philip.withnall@collabora.co.uk>2016-08-23 18:06:46 +0100
committerPhilip Withnall <philip.withnall@collabora.co.uk>2016-08-23 18:09:22 +0100
commit363c3f8bf4196b4c94135bb0fcc0023d5eda261f (patch)
tree46fb8ec1e6ce020b5ac272e05b8ae0e59484b38c
parent3de11d5a01884a56e431dafde0a31b3fc1d7ae5e (diff)
downloadclutter-363c3f8bf4196b4c94135bb0fcc0023d5eda261f.tar.gz
tests: Set locale in test-script.c
So that if the translatable strings in test-script.json are ever translated in the .po files, they will appear translated in the test program. Note that for them to be translated in the .po files, they must first be extracted by gettext, which first needs to grow support for ClutterScript files. https://bugzilla.gnome.org/show_bug.cgi?id=770288
-rw-r--r--tests/interactive/test-script.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/interactive/test-script.c b/tests/interactive/test-script.c
index e30de3dcf..045a71201 100644
--- a/tests/interactive/test-script.c
+++ b/tests/interactive/test-script.c
@@ -1,9 +1,13 @@
+#include "config.h"
+
+#include <locale.h>
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
#include <glib.h>
+#include <glib/gi18n.h>
#include <gmodule.h>
#include <clutter/clutter.h>
@@ -138,6 +142,9 @@ test_script_main (int argc, char *argv[])
gchar *file;
gint res;
+ setlocale (LC_ALL, "");
+ textdomain (GETTEXT_PACKAGE);
+
if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS)
return 1;