Refactor code for `i18nize_templates` and add requirements.txt