adjust registering ui module before extension module
modify comments
Merge pull request #8035 from andyque/fixLuaTemplate

adjust registering ui module before extension module