diff options
author | danilo <> | 2005-06-26 10:54:45 +0000 |
---|---|---|
committer | danilo <> | 2005-06-26 10:54:45 +0000 |
commit | af75ef9f51a26f28af829be7383a14b6deb371ae (patch) | |
tree | 9c680e851d91fcecfcee559f7cc3396da614eb86 /tests | |
parent | dbadcb11999f2d6bbbf2739b50645bbefeca7aa2 (diff) | |
download | intltool-af75ef9f51a26f28af829be7383a14b6deb371ae.tar.gz |
Fix bug #160262, switch intltool-extract to XML::Parser.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/cases/extract-comments.xml | 4 | ||||
-rw-r--r-- | tests/cases/space-preserve.xml.in | 22 | ||||
-rw-r--r-- | tests/cases/spacepreserve.po | 44 | ||||
-rw-r--r-- | tests/results/extract-comments.xml.h | 2 | ||||
-rw-r--r-- | tests/results/merge-deepattr.xml | 3 | ||||
-rw-r--r-- | tests/results/space-preserve.xml | 27 | ||||
-rw-r--r-- | tests/results/space-preserve.xml.in.h | 8 | ||||
-rwxr-xr-x | tests/selftest.pl.in | 11 |
8 files changed, 119 insertions, 2 deletions
diff --git a/tests/cases/extract-comments.xml b/tests/cases/extract-comments.xml index cb62413..c54f803 100644 --- a/tests/cases/extract-comments.xml +++ b/tests/cases/extract-comments.xml @@ -16,8 +16,8 @@ <_translate>This doesn't have a comment for translators</_translate> -<!-- This comment is currently ignored because it contains > (greater than) -sign in it, but the following string isn't --> +<!-- This comment is not ignored even if it contains > (greater than) +sign in it, and the following string shows up as well --> <_translate>Dum-dee-dum</_translate> <tagnotmarked _markedattribute="attribute without comment">some content</tagnotmarked> diff --git a/tests/cases/space-preserve.xml.in b/tests/cases/space-preserve.xml.in new file mode 100644 index 0000000..d9797f8 --- /dev/null +++ b/tests/cases/space-preserve.xml.in @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="UTF-8"?> +<error-list domain="shell" xml:space="preserve"> + + <error id="upgrade-nospace" type="error"> + <_primary>Insufficient disk space for upgrade.</_primary> + <_secondary>Upgrading your data and settings will require up to {0} of disk +space, but you only have {1} available. + +You will need to make more space available in your home directory before you can +continue.</_secondary> + <button stock="gtk-quit" response="GTK_RESPONSE_CANCEL"/> + </error> + + <!-- lets test reverting xml:space to default as well --> + <error xml:space="default"> + <_primary>This is not an error.</_primary> + <_secondary>And this message should take no more than + one single row, no matter the spacing in + the source file. + </_secondary> + </error> +</error-list> diff --git a/tests/cases/spacepreserve.po b/tests/cases/spacepreserve.po new file mode 100644 index 0000000..bd16d5c --- /dev/null +++ b/tests/cases/spacepreserve.po @@ -0,0 +1,44 @@ +# Test file for intltool. +# Danilo Segan <danilo@gnome.org>, 2005. +# +# THIS IS A TEST FILE - PLEASE DO NOT CHANGE +msgid "" +msgstr "" +"Project-Id-Version: space preserving test\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2005-06-26 12:46+0200\n" +"PO-Revision-Date: 2005-06-26 12:49+0200\n" +"Last-Translator: Данило Шеган <danilo@gnome.org>\n" +"Language-Team: Serbian <gnom@prevod.org>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: space-preserve.xml.in.h:1 +msgid "" +"And this message should take no more than one single row, no matter the " +"spacing in the source file." +msgstr "Ова порука не сме заузети више од једног реда, без обзира на начин приказа у изворној датотеци." + +#: space-preserve.xml.in.h:2 +msgid "Insufficient disk space for upgrade." +msgstr "Недовољно места на диску за освежавање." + +#: space-preserve.xml.in.h:3 +msgid "This is not an error." +msgstr "Ово није грешка." + +#: space-preserve.xml.in.h:4 +msgid "" +"Upgrading your data and settings will require up to {0} of disk\n" +"space, but you only have {1} available.\n" +"\n" +"You will need to make more space available in your home directory before you " +"can\n" +"continue." +msgstr "" +"Освежавање ваших података и подешавања захтева бар {0} простора\n" +"на диску, а вама је остало само {1}.\n" +"\n" +"Мораћете да ослободите још простора у вашем личном директоријуму\n" +"пре него што наставите." diff --git a/tests/results/extract-comments.xml.h b/tests/results/extract-comments.xml.h index 9dc356e..451aa79 100644 --- a/tests/results/extract-comments.xml.h +++ b/tests/results/extract-comments.xml.h @@ -1,3 +1,5 @@ +/* This comment is not ignored even if it contains > (greater than) +sign in it, and the following string shows up as well */ char *s = N_("Dum-dee-dum"); /* If comment doesn't end on the previous line, it should be handled correctly */ diff --git a/tests/results/merge-deepattr.xml b/tests/results/merge-deepattr.xml index 18e3c5d..3949a0b 100644 --- a/tests/results/merge-deepattr.xml +++ b/tests/results/merge-deepattr.xml @@ -27,6 +27,9 @@ <tag xml:lang="schemasmerge2" translate="Time zone"> <translate>Select Area</translate> </tag> + <tag xml:lang="spacepreserve" translate="Time zone"> + <translate>Select Area</translate> + </tag> <tag xml:lang="test" translate="Time zone"> <translate>Select Area</translate> </tag> diff --git a/tests/results/space-preserve.xml b/tests/results/space-preserve.xml new file mode 100644 index 0000000..1b06cdc --- /dev/null +++ b/tests/results/space-preserve.xml @@ -0,0 +1,27 @@ +<?xml version="1.0" encoding="UTF-8"?> +<error-list xml:space="preserve" domain="shell"> + + <error type="error" id="upgrade-nospace"> + <primary>Insufficient disk space for upgrade.</primary> + <primary xml:lang="spacepreserve">Недовољно места на диску за освежавање.</primary> + <secondary>Upgrading your data and settings will require up to {0} of disk +space, but you only have {1} available. + +You will need to make more space available in your home directory before you can +continue.</secondary> + <secondary xml:lang="spacepreserve">Освежавање ваших података и подешавања захтева бар {0} простора +на диску, а вама је остало само {1}. + +Мораћете да ослободите још простора у вашем личном директоријуму +пре него што наставите.</secondary> + <button stock="gtk-quit" response="GTK_RESPONSE_CANCEL"/> + </error> + + + <error xml:space="default"> + <primary>This is not an error.</primary> + <primary xml:lang="spacepreserve">Ово није грешка.</primary> + <secondary>And this message should take no more than one single row, no matter the spacing in the source file.</secondary> + <secondary xml:lang="spacepreserve">Ова порука не сме заузети више од једног реда, без обзира на начин приказа у изворној датотеци.</secondary> + </error> +</error-list>
\ No newline at end of file diff --git a/tests/results/space-preserve.xml.in.h b/tests/results/space-preserve.xml.in.h new file mode 100644 index 0000000..606afa2 --- /dev/null +++ b/tests/results/space-preserve.xml.in.h @@ -0,0 +1,8 @@ +char *s = N_("And this message should take no more than one single row, no matter the spacing in the source file."); +char *s = N_("Insufficient disk space for upgrade."); +char *s = N_("This is not an error."); +char *s = N_("Upgrading your data and settings will require up to {0} of disk\n" + "space, but you only have {1} available.\n" + "\n" + "You will need to make more space available in your home directory before you can\n" + "continue."); diff --git a/tests/selftest.pl.in b/tests/selftest.pl.in index 59bed3a..728b2ed 100755 --- a/tests/selftest.pl.in +++ b/tests/selftest.pl.in @@ -212,6 +212,17 @@ $case = "extract12.xml.in"; system("$INTLTOOL_EXTRACT --type=gettext/xml --quiet --update cases/$case") == 0 or $failed = 1; check_extract_result($case); +print "25. Extract messages from a xml file using inherited xml:space: "; +$case = "space-preserve.xml.in"; +system("$INTLTOOL_EXTRACT --type=gettext/xml --quiet --update cases/$case") == 0 or $failed = 1; +check_extract_result($case); + +print "26. Merge messages into xml file using inherited xml:space: "; +$case = "space-preserve.xml"; +system("$INTLTOOL_MERGE -x --quiet cases cases/$case.in cases/$case") == 0 or $failed = 1; +check_merge_result($case); + + system("rm -f cases/*.*") if $srcdir ne "."; system("rm -rf az extract9 fr fr_BE fr_FR merge6 schemasmerge1 schemasmerge2 test merge6.xml"); |