allow dashes in resource ids
Set message domain according to bundle

This code derives the i18n string domain from the bundle the
resource being translated is in.