Fix handling of translations in python correctly. Fix rewrite of the translations library not to insert extra lines.