translate: really ignore ranges with mismatched length
translate: fixed typo

Thanks to PavelVolkovitskiy for bugreport!
translate: moved main logic into separate procedure

Suggested by PavelVolkovitskiy
translate: print sizes for used ranges
translate: added global vars (data,datar) to main func