translate JS code section