refactor locale view + unit tests