refactoring scripts locale file generation