summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDanilo Segan <danilo@canonical.com>2011-10-08 14:34:14 +0200
committerDanilo Segan <danilo@canonical.com>2011-10-08 14:34:14 +0200
commit8f3f9b5de25731ccb157d486a7bb0d9d8db89770 (patch)
tree2ff6113384be09cb3a65163dffb0dc0a50c8f2be
parent46f871e01f614c0f9a50b24a961e551defa166a4 (diff)
downloadintltool-8f3f9b5de25731ccb157d486a7bb0d9d8db89770.tar.gz
Remove all code for scheme extraction since xgettext can handle it now.
-rw-r--r--intltool-extract.in54
-rw-r--r--tests/cases/test.scm16
-rw-r--r--tests/results/test.scm.h11
-rwxr-xr-xtests/selftest.pl.in39
4 files changed, 21 insertions, 99 deletions
diff --git a/intltool-extract.in b/intltool-extract.in
index 6cdcd52..71ccc3c 100644
--- a/intltool-extract.in
+++ b/intltool-extract.in
@@ -163,11 +163,11 @@ XML files. Read manpage (man ${PROGRAM}) for more info.
--type=TYPE Specify the file type of FILENAME. Currently supports:
"gettext/glade", "gettext/ini", "gettext/keys"
"gettext/rfc822deb", "gettext/schemas",
- "gettext/scheme", "gettext/xml", "gettext/quoted",
- "gettext/quotedxml", "gettext/tlk"
+ "gettext/xml", "gettext/quoted", "gettext/quotedxml",
+ "gettext/tlk"
-l, --local Writes output into current working directory
(conflicts with --update)
- --update Writes output into the same directory the source file
+ --update Writes output into the same directory the source file
reside (conflicts with --local)
--srcdir Root of the source tree
-v, --version Output version information and exit
@@ -218,7 +218,6 @@ sub convert {
&type_keys if $gettext_type eq "keys";
&type_xml if $gettext_type eq "xml";
&type_glade if $gettext_type eq "glade";
- &type_scheme if $gettext_type eq "scheme";
&type_schemas if $gettext_type eq "schemas";
&type_rfc822deb if $gettext_type eq "rfc822deb";
&type_quoted if $gettext_type eq "quoted";
@@ -790,51 +789,6 @@ sub type_glade {
}
}
-sub type_scheme {
- my ($line, $i, $state, $str, $trcomment, $char);
- for $line (split(/\n/, $input)) {
- $i = 0;
- $state = 0; # 0 - nothing, 1 - string, 2 - translatable string
- while ($i < length($line)) {
- if (substr($line,$i,1) eq "\"") {
- if ($state == 2) {
- $comments{$str} = $trcomment if ($trcomment);
- $messages{$str} = [];
- $str = '';
- $state = 0; $trcomment = "";
- } elsif ($state == 1) {
- $str = '';
- $state = 0; $trcomment = "";
- } else {
- $state = 1;
- $str = '';
- if ($i>0 && substr($line,$i-1,1) eq '_') {
- $state = 2;
- }
- }
- } elsif (!$state) {
- if (substr($line,$i,1) eq ";") {
- $trcomment = substr($line,$i+1);
- $trcomment =~ s/^;*\s*//;
- $i = length($line);
- } elsif ($trcomment && substr($line,$i,1) !~ /\s|\(|\)|_/) {
- $trcomment = "";
- }
- } else {
- if (substr($line,$i,1) eq "\\") {
- $char = substr($line,$i+1,1);
- if ($char ne "\"" && $char ne "\\") {
- $str = $str . "\\";
- }
- $i++;
- }
- $str = $str . substr($line,$i,1);
- }
- $i++;
- }
- }
-}
-
sub type_tlk {
my ($ftype, $fvers, $langid, $strcount, $stroff);
my $count = 0;
@@ -853,7 +807,7 @@ sub type_tlk {
$inputa[18] . $inputa[19]);
use bytes;
- $strdata = bytes::substr ($input, $stroff);
+ $strdata = bytes::substr ($input, $stroff);
my $sinpos = 20;
diff --git a/tests/cases/test.scm b/tests/cases/test.scm
deleted file mode 100644
index 9467009..0000000
--- a/tests/cases/test.scm
+++ /dev/null
@@ -1,16 +0,0 @@
-;; regular comment
-
-("some " "basic" "strings") ; silly comment
-(_"translatable string")
-
-;; _"this"
-
-;; nasty comment _"
-("nasty string; haha" ; this is a fine comment for translators
- _"nice string; thanks") ; all well
-
-(_"multiple" _"translations; per line")
-
-"not for_" _"translation" ; so "what?
-
-_"another \" string" "so \"what" _"here"
diff --git a/tests/results/test.scm.h b/tests/results/test.scm.h
deleted file mode 100644
index e75a4e2..0000000
--- a/tests/results/test.scm.h
+++ /dev/null
@@ -1,11 +0,0 @@
-/* so "what? */
-char *s = N_("another \" string");
-char *s = N_("here");
-/* all well */
-char *s = N_("multiple");
-/* this is a fine comment for translators */
-char *s = N_("nice string; thanks");
-/* silly comment */
-char *s = N_("translatable string");
-char *s = N_("translation");
-char *s = N_("translations; per line");
diff --git a/tests/selftest.pl.in b/tests/selftest.pl.in
index 5988694..b016a18 100755
--- a/tests/selftest.pl.in
+++ b/tests/selftest.pl.in
@@ -197,94 +197,89 @@ $case = "extract-comments.xml";
system("$INTLTOOL_EXTRACT --type=gettext/xml --quiet --update cases/$case") == 0 or $failed = 1;
check_extract_result($case);
-print "21. Extract messages from Scheme file: ";
-$case = "test.scm";
-system("$INTLTOOL_EXTRACT --type=gettext/scheme --quiet --update cases/$case") == 0 or $failed = 1;
-check_extract_result($case);
-
-print "22. Merge into file with CDATA sections: ";
+print "21. Merge into file with CDATA sections: ";
$case = "merge-cdata.xml";
system("$INTLTOOL_MERGE -x --quiet cases cases/$case.in cases/$case") == 0 or $failed = 1;
check_merge_result($case);
-print "23. Merge into XML file with deep translation/attribute nesting: ";
+print "22. Merge into XML file with deep translation/attribute nesting: ";
$case = "merge-deepattr.xml";
system("$INTLTOOL_MERGE -x --quiet cases cases/$case.in cases/$case") == 0 or $failed = 1;
check_merge_result($case);
-print "24. Ignore empty strings from XML file ";
+print "23. Ignore empty strings from XML file ";
$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: ";
+print "24. 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: ";
+print "25. 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);
-print "27. Merge non-well-formed translations into xml file: ";
+print "26. Merge non-well-formed translations into xml file: ";
$case = "merge11.xml";
system("$INTLTOOL_MERGE -x --quiet cases cases/$case.in cases/$case") == 0 or $failed = 1;
check_merge_result($case);
-print "28. Extract UTF-8 encoded messages/comments from xml file: ";
+print "27. Extract UTF-8 encoded messages/comments from xml file: ";
$case = "unicodetext.xml.in";
system("$INTLTOOL_EXTRACT --type=gettext/xml --quiet --update cases/$case") == 0 or $failed = 1;
check_extract_result($case);
-print "29. Extract iso-8859-1 encoded messages/comments from xml file: ";
+print "28. Extract iso-8859-1 encoded messages/comments from xml file: ";
$case = "iso88591text.xml.in";
system("$INTLTOOL_EXTRACT --type=gettext/xml --quiet --update cases/$case") == 0 or $failed = 1;
check_extract_result($case);
-print "30. Extract messages from a quoted style file: ";
+print "29. Extract messages from a quoted style file: ";
$case = "test-quoted.dtd";
system("$INTLTOOL_EXTRACT --type=gettext/quoted --quiet --update cases/$case") == 0 or $failed = 1;
check_extract_result($case);
-print "31. Merge translations into multiple quoted style files: ";
+print "30. Merge translations into multiple quoted style files: ";
$case = "test-quoted.dtd";
system("$INTLTOOL_MERGE --quoted-style --quiet --multiple-output cases cases/$case $case") == 0 or $failed = 1;
check_multimerge_result($case, "test-quoted");
-print "32. Extract comments for translators from a .desktop.in file: ";
+print "31. Extract comments for translators from a .desktop.in file: ";
$case = "extract13.desktop.in";
system("$INTLTOOL_EXTRACT --type=gettext/ini --quiet --update cases/$case") == 0 or $failed = 1;
check_extract_result($case);
-print "33. Merge translations from a .desktop.in file: ";
+print "32. Merge translations from a .desktop.in file: ";
$case = "extract13.desktop.in";
$result = $case;
($result = $case) =~ s/\.in//;
system("$INTLTOOL_MERGE -d --quiet cases cases/$case cases/$result") == 0 or $failed = 1;
check_merge_result($case);
-print "34. Decode XML entities in the right order when extracting: ";
+print "33. Decode XML entities in the right order when extracting: ";
$case = "extract14.xml.in";
system("$INTLTOOL_EXTRACT --type=gettext/xml --quiet --update cases/$case") == 0 or $failed = 1;
check_extract_result($case);
-print "35. Merge XML translations, decoding entities in the right order: ";
+print "34. Merge XML translations, decoding entities in the right order: ";
$case = "merge12.xml";
system("$INTLTOOL_MERGE -x --quiet cases cases/$case.in cases/$case") == 0 or $failed = 1;
check_merge_result($case);
-print "36. Extract messages from an XML file with msgctxts: ";
+print "35. Extract messages from an XML file with msgctxts: ";
$case = "context.xml.in";
system("$INTLTOOL_EXTRACT --type=gettext/xml --quiet --update cases/$case") == 0 or $failed = 1;
check_extract_result($case);
-print "37. Merge translations into an XML file with msgctxts: ";
+print "36. Merge translations into an XML file with msgctxts: ";
$case = "context.xml";
system("$INTLTOOL_MERGE -x --quiet cases cases/$case.in cases/$case") == 0 or $failed = 1;
check_merge_result($case);
-print "38. Extract messages from an GtkBuilder XML file with msgctxts: ";
+print "37. Extract messages from an GtkBuilder XML file with msgctxts: ";
$case = "extract-gtkbuilder.ui";
system("$INTLTOOL_EXTRACT --type=gettext/glade --quiet --update cases/$case") == 0 or $failed = 1;
check_extract_result($case);