def replace(self, messages, domain='<STR_LIT>'):
assert isinstance(messages, (dict, CaseInsensitiveDict))<EOL>assert isinstance(domain, (str, unicode))<EOL>self.messages[domain] = CaseInsensitiveDict({})<EOL>self.add(messages, domain)<EOL>
Sets translations for a given domain.