blob: 16e0689181818bdd6b9a8d55676ebe41a1446c67 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
#!/usr/bin/python
import string
import sys
import string
try:
f = open(sys.argv[1])
except:
sys.stderr.write ("no comps file found, exiting\n")
sys.exit (0)
list = []
comps = f.readlines()
count = 1
for line in comps:
if (string.find (line, '{') > 0
and string.find (line, '--hide') < 0):
start = string.find (line, ':')
if start > 0:
line = line[start + 1:]
line = line[:string.find (line, '{')]
line = string.strip (line)
if line[0] == '0' or line[0] == '1':
list.append((line[2:], count))
count = count + 1
for (comp, line) in list:
if comp == "GNOME" or comp == "KDE":
continue
print
print '# %s:%d' % (sys.argv[1], line)
print 'msgid "%s"' % comp
print 'msgstr ""'
|