refactor js i18n