summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiguel Ángel Arruga Vivas <rosen644835@gmail.com>2013-03-14 21:06:17 +0100
committerMiguel Ángel Arruga Vivas <rosen644835@gmail.com>2013-03-15 08:37:52 +0100
commit69fda79515c1f41e1d537c91874313251c6b5d04 (patch)
treee77cd5a99c31bf5544a29b51760997a87e41aa9a
parentbd05992625dfceadefb8a84af2b19a10691eb010 (diff)
downloadexternal_gettext-69fda79515c1f41e1d537c91874313251c6b5d04.zip
external_gettext-69fda79515c1f41e1d537c91874313251c6b5d04.tar.gz
external_gettext-69fda79515c1f41e1d537c91874313251c6b5d04.tar.bz2
Augment Glade2 testing.
New test case in xgettext-glade-4 for atkproperty tag.
-rw-r--r--gettext-tools/tests/ChangeLog5
-rwxr-xr-xgettext-tools/tests/xgettext-glade-458
2 files changed, 63 insertions, 0 deletions
diff --git a/gettext-tools/tests/ChangeLog b/gettext-tools/tests/ChangeLog
index 54ad3f4..a8c85f0 100644
--- a/gettext-tools/tests/ChangeLog
+++ b/gettext-tools/tests/ChangeLog
@@ -1,3 +1,8 @@
+2013-03-03 Miguel Angel Arruga Vivas <rosen644835@gmail.com>
+
+ Add a test case for atkproperty tag in Glade2 files.
+ * xgettext-glade-4: New test case for atkproperty.
+
2013-03-14 Miguel Angel Arruga Vivas <rosen644835@gmail.com>
Test msgctxt extraction on glade files.
diff --git a/gettext-tools/tests/xgettext-glade-4 b/gettext-tools/tests/xgettext-glade-4
index 9d05a9b..374742a 100755
--- a/gettext-tools/tests/xgettext-glade-4
+++ b/gettext-tools/tests/xgettext-glade-4
@@ -77,6 +77,64 @@ EOF
${DIFF} xg-gl-4.ok xg-gl-4.pot
result=$?
+test $result = 0 || {
+ rm -fr $tempfiles; exit $result
+}
+
+tmpfiles="$tmpfiles xg-gl-4a.glade"
+cat <<EOF > xg-gl-4a.glade
+<?xml version="1.0"?>
+<glade-interface>
+ <!-- interface-requires gtk+ 2.6 -->
+ <!-- interface-naming-policy toplevel-contextual -->
+ <widget class="GtkWindow" id="mainWindow">
+ <accessibility>
+ <atkproperty name="AtkObject::accessible-name" translatable="yes" comments="Also has comments">This window</atkproperty>
+ </accessibility>
+ <child>
+ <placeholder/>
+ </child>
+ </widget>
+</glade-interface>
+EOF
+
+tmpfiles="$tmpfiles xg-gl-4a.tmp xg-gl-4a.pot"
+: ${XGETTEXT=xgettext}
+${XGETTEXT} -o xg-gl-4a.tmp xg-gl-4a.glade
+test $? = 0 || { rm -fr $tmpfiles; exit 1; }
+# Look upwards
+cat xg-gl-4a.tmp | grep -v 'POT-Creation-Date' > xg-gl-4a.pot
+
+tmpfiles="$tmpfiles xg-gl-4a.ok"
+cat <<\EOF > xg-gl-4a.ok
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: \n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"Language: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=CHARSET\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Also has comments
+#: xg-gl-4a.glade:7
+msgid "This window"
+msgstr ""
+EOF
+
+: ${DIFF=diff}
+${DIFF} xg-gl-4a.ok xg-gl-4a.pot
+result=$?
+
rm -fr $tmpfiles
exit $result