summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey V. Udaltsov <svu@gnome.org>2011-03-02 00:21:49 +0000
committerSergey V. Udaltsov <svu@gnome.org>2011-03-02 00:21:49 +0000
commit156272d8ea863a0bdb2026ed5334f63927ce590c (patch)
tree2a0a60a0a49ec3e0d2c96bf27591add9ee650358
parentc19d73dbd9a0af721bce6f8c6dd3b4be910a08cc (diff)
Since we do not merge translations: simplify some things
DTD and perl script (converter to lst) should not have xml:lang
-rw-r--r--rules/xkb.dtd4
-rw-r--r--rules/xml2lst.pl38
2 files changed, 6 insertions, 36 deletions
diff --git a/rules/xkb.dtd b/rules/xkb.dtd
index 4452712f..47ecd340 100644
--- a/rules/xkb.dtd
+++ b/rules/xkb.dtd
@@ -40,12 +40,8 @@
<!ELEMENT name (#PCDATA)>
<!ELEMENT shortDescription (#PCDATA)>
-<!ATTLIST shortDescription
- xml:lang CDATA #IMPLIED>
<!ELEMENT description (#PCDATA)>
-<!ATTLIST description
- xml:lang CDATA #IMPLIED>
<!ELEMENT vendor (#PCDATA)>
diff --git a/rules/xml2lst.pl b/rules/xml2lst.pl
index 478fce89..0c6540d1 100644
--- a/rules/xml2lst.pl
+++ b/rules/xml2lst.pl
@@ -4,16 +4,10 @@
#
# Usage:
#
-# perl xml2lst.pl [lang] < filename.xml > filename.lst
+# perl xml2lst.pl < filename.xml > filename.lst
#
# author Ivan Pascal
-if (@ARGV) {
- $lang = shift @ARGV;
-} else {
- $lang = '';
-}
-
$doc = new_document( 0, '');
parse('', $doc);
@@ -25,22 +19,14 @@ parse('', $doc);
print "! model\n";
for $i (@models) {
($name) = node_by_name($i, 'name');
- @desc = node_by_name($i, 'description');
- $descr = with_attribute(\@desc, 'xml:lang='.$lang);
- if (! defined $descr) {
- $descr = with_attribute(\@desc, 'xml:lang=');
- }
+ ($descr) = node_by_name($i, 'description');
printf(" %-15s %s\n", text_child($name), text_child($descr));
}
print "\n! layout\n";
for $i (@layouts) {
($name) = node_by_name($i, 'name');
- @desc = node_by_name($i, 'description');
- $descr = with_attribute(\@desc, 'xml:lang='.$lang);
- if (! defined $descr ) {
- $descr = with_attribute(\@desc, 'xml:lang=');
- }
+ ($descr) = node_by_name($i, 'description');
printf(" %-15s %s\n", text_child($name), text_child($descr));
}
@@ -50,11 +36,7 @@ for $l (@layouts) {
@variants = node_by_name($l, '../variantList/variant/configItem');
for $v (@variants) {
($name) = node_by_name($v, 'name');
- @desc = node_by_name($v, 'description');
- $descr = with_attribute(\@desc, 'xml:lang='.$lang);
- if (! defined $descr) {
- $descr = with_attribute(\@desc, 'xml:lang=');
- }
+ ($descr) = node_by_name($v, 'description');
printf(" %-15s %s: %s\n",
text_child($name), text_child($lname), text_child($descr));
}
@@ -63,21 +45,13 @@ for $l (@layouts) {
print "\n! option\n";
for $g (@options) {
($name) = node_by_name($g, 'name');
- @desc = node_by_name($g, 'description');
- $descr = with_attribute(\@desc, 'xml:lang='.$lang);
- if (! defined $descr) {
- $descr = with_attribute(\@desc, 'xml:lang=');
- }
+ ($descr) = node_by_name($g, 'description');
printf(" %-20s %s\n", text_child($name), text_child($descr));
@opts = node_by_name($g, '../option/configItem');
for $o (@opts) {
($name) = node_by_name($o, 'name');
- @desc = node_by_name($o, 'description');
- $descr = with_attribute(\@desc, 'xml:lang='.$lang);
- if (! defined $descr) {
- $descr = with_attribute(\@desc, 'xml:lang=');
- }
+ ($descr) = node_by_name($o, 'description');
printf(" %-20s %s\n",
text_child($name), text_child($descr));
}