gencfg.js: fix a sameeps bug
translate a few routines