3
# A simple script to check the status of the translation.
6
from pprint import pprint
9
if line[-2:] == '\r\n':
17
def cmprevision (a, b):
18
'''revisions are something delimited with dots'''
20
return cmp (map (lambda x: x.lower (), a.split ('.')), map (lambda x: x.lower (), b.split ('.')))
27
for line in sys.stdin.readlines ():
28
parts = string.split (chop (line))
31
if parts[0] == 'File:':
33
elif parts[0] == 'Repository':
34
files[name] = parts[2]
40
for line in open ('status', 'r').readlines ():
41
parts = string.split (chop (line))
44
if files.has_key (parts[0]):
45
pass # check the version
47
relation = cmprevision (parts[1], files[parts[0]])
50
print 'Update: %s (%s -> %s)' % (parts[0], parts[1], files[parts[0]])
53
print 'Downgrade?: %s (%s -> %s)' % (parts[0], parts[1], files[parts[0]])
56
del files[parts[0]] # delete the item
58
print 'Delete:', parts[0]
61
for file in files.keys ():
66
print 'You are translating the latest versions'