simplify code for translation task, and also fix translation header cut off.