def get_locale_and_nickname(account, message):
    """Returns a locale and nickname for the given account and email message."""
    if account:
        locale = account.locale or 'en'
        nickname = account.nickname or account.email
    else:
        locale = 'en'
        nickname = message.sender
    return (locale, nickname)