summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorDanilo Segan <danilo@canonical.com>2011-10-08 20:08:58 +0200
committerDanilo Segan <danilo@canonical.com>2011-10-08 20:08:58 +0200
commitc1b3fc2b64aaada233a5d98cf8aba8a00f11ebac (patch)
tree303030d20d0e4537b588c45804af406a51b57f77 /tests
parentf52b713ee389b7335a414d9e2decf294d603379e (diff)
downloadintltool-c1b3fc2b64aaada233a5d98cf8aba8a00f11ebac.tar.gz
Apply patch from Ryan with a few fixes and a test case.
Diffstat (limited to 'tests')
-rw-r--r--tests/cases/Makefile.am2
-rw-r--r--tests/cases/gsettings.gschema.xml17
-rw-r--r--tests/results/Makefile.am1
-rw-r--r--tests/results/gsettings.gschema.xml.h7
-rwxr-xr-xtests/selftest.pl.in5
5 files changed, 32 insertions, 0 deletions
diff --git a/tests/cases/Makefile.am b/tests/cases/Makefile.am
index 8636eac..637e190 100644
--- a/tests/cases/Makefile.am
+++ b/tests/cases/Makefile.am
@@ -19,6 +19,7 @@ EXTRA_DIST = \
fr.po \
fr_BE.po \
fr_FR.po \
+ gsettings.gschema.xml \
iso88591text.xml.in \
merge-cdata.xml.in \
merge-deepattr.xml.in \
@@ -57,6 +58,7 @@ CLEANFILES = \
extract14.xml.in.h \
extract9.xml \
extract9.xml.in.h \
+ gsettings.gschema.xml.h \
iso88591text.xml.in.h \
merge-cdata.xml \
merge-deepattr.xml \
diff --git a/tests/cases/gsettings.gschema.xml b/tests/cases/gsettings.gschema.xml
new file mode 100644
index 0000000..f3ad749
--- /dev/null
+++ b/tests/cases/gsettings.gschema.xml
@@ -0,0 +1,17 @@
+<!-- This is an example gsettings schema file. -->
+<schemalist>
+ <schema id="org.gnome.font-rendering" path="/desktop/gnome/font_rendering/">
+ <key name="dpi" type="i">
+ <default>96</default>
+ <summary context="Dots Per Inch">DPI</summary>
+ <description>The resolution used for converting font sizes to pixel sizes, in dots per inch.</description>
+ </key>
+ <key name="clocktype" type="i">
+ <!-- Translators: translate to either 12 or 24 to define the default
+ clock format. -->
+ <default l10n="messages" context="clock-format">24</default>
+ <summary>Time format</summary>
+ <description context="Time format gsettings description">How many hours can you tell apart?</description>
+ </key>
+ </schema>
+</schemalist>
diff --git a/tests/results/Makefile.am b/tests/results/Makefile.am
index 40a2e69..4366c6b 100644
--- a/tests/results/Makefile.am
+++ b/tests/results/Makefile.am
@@ -17,6 +17,7 @@ EXTRA_DIST = \
extract12.xml.in.h \
extract14.xml.in.h \
extract-gtkbuilder.ui.h \
+ gsettings.gschema.xml.h \
iso88591text.xml.in.h \
merge-cdata.xml \
merge-deepattr.xml \
diff --git a/tests/results/gsettings.gschema.xml.h b/tests/results/gsettings.gschema.xml.h
new file mode 100644
index 0000000..bbd4138
--- /dev/null
+++ b/tests/results/gsettings.gschema.xml.h
@@ -0,0 +1,7 @@
+char *s = C_("Dots Per Inch", "DPI");
+char *s = N_("The resolution used for converting font sizes to pixel sizes, in dots per inch.");
+/* Translators: translate to either 12 or 24 to define the default
+ clock format. */
+char *s = C_("clock-format", "24");
+char *s = N_("Time format");
+char *s = C_("Time format gsettings description", "How many hours can you tell apart?");
diff --git a/tests/selftest.pl.in b/tests/selftest.pl.in
index b016a18..e27d965 100755
--- a/tests/selftest.pl.in
+++ b/tests/selftest.pl.in
@@ -284,6 +284,11 @@ $case = "extract-gtkbuilder.ui";
system("$INTLTOOL_EXTRACT --type=gettext/glade --quiet --update cases/$case") == 0 or $failed = 1;
check_extract_result($case);
+print "38. Extract messages from an GSettings gschema XML file: ";
+$case = "gsettings.gschema.xml";
+system("$INTLTOOL_EXTRACT --type=gettext/gsettings --quiet --update cases/$case") == 0 or $failed = 1;
+check_extract_result($case);
+
system("rm -f cases/*.*") if $srcdir ne ".";
system("rm -rf C az extract9 fr fr_BE fr_FR merge6 schemasmerge1 schemasmerge2 spacepreserve test test-quoted merge6.xml");