Fix class_name deprecation message.
use default locale as fallback if no explicit locale has been given