lua: refactor with peg.locale