Fixes #339, localization not working on custom attributes.