re-organize code and fix show all translation bug