i18n: refactor

Fixes #11