abp
abp copied to clipboard
Angular additional property localization not working
Is there an existing issue for this?
- [x] I have searched the existing issues
Description
I've tried all possible solutions to localize a property which is entity extension as described here . But seems it's not working for Angular UI
Reproduction Steps
ObjectExtensionManager.Instance.Modules()
.ConfigureIdentity(identity =>
{
identity.ConfigureUser(user =>
{
user.AddOrUpdateProperty<string>( //property type: string
"SocialSecurityNumber", //property name
property =>
{
//validation rules
property.Attributes.Add(new RequiredAttribute());
property.Attributes.Add(new StringLengthAttribute(64) { MinimumLength = 4 });
property.Configuration[IdentityModuleExtensionConsts.ConfigurationNames.AllowUserToEdit] = true;
//...other configurations for this property
property.DisplayName =
LocalizableString.Create<BookStoreResource>(
"UserSocialSecurityNumberDisplayName"
);
}
);
});
});
Expected behavior
No response
Actual behavior
No response
Regression?
No response
Known Workarounds
No response
Version
7.1.1
User Interface
Angular
Database Provider
EF Core (Default)
Tiered or separate authentication server
Separate Auth Server
Operation System
Windows (Default)
Other information


Pass param with given format ::UserSocialSecurityNumberDisplayName
property.DisplayName = LocalizableString.
Create<MyProjectNameResource>("::UserSocialSecurityNumberDisplayName");

Thank you @bariscanyilmaz, it worked :)