#!/usr/bin/env python3
#
# fix the igtall file
# 
# replace the untokenized translation line with the tokenized version 
# found in "t"

# arg 1 is igt file
# arg 2 is t file

import sys

igtlines = open(sys.argv[1]).readlines()
tlines   = open(sys.argv[2],'r').readlines()

j=0
for i in range(3,len(igtlines),5):
  igtlines[i]=tlines[j]
  j+=1

igtf = open(sys.argv[1],'w')
for l in igtlines:
  igtf.write(l)
