added support for custom translation domain and some fixes