6 print "Extracting translatable bits from Options.xml..."
8 class Parser(XMLParser):
11 def unknown_starttag(self, tag, attrs):
12 for x in ['title', 'label', 'end', 'unit']:
17 def handle_data(self, data):
18 self.data = self.data + data
20 def unknown_endtag(self, tag):
21 data = string.strip(self.data)
25 def trans(self, data):
26 data = string.join(string.split(data, '\n'), '\\n')
28 out.write('_("%s")\n' % data)
35 file = open('../Options.xml', 'rb')
36 out = open('../tips', 'wb')
38 parser.feed(file.read())
43 file = open('../Mixer.xml', 'rb')
44 out = open('../tips', 'wb')
46 parser.feed(file.read())