6 Answer(s)
-
0
Hi, is the feature provided by ANZ? This was done at https://github.com/aspnetzero/aspnet-zero-core/blob/f72d4bf9ced778e06265f1c415a8553b10cbaf3d/aspnet-core/src/MyCompanyName.AbpZeroTemplate.Core/Features/AppFeatureProvider.cs#L16-L17
If you were to create your own feature, you need to define the corresponding translation yourselves.
-
0
H @ryancyq! No, it's none of the features provided by ANZ but one of my custom features coming from a custom feature provider. I used RequiresFeature attribute as described here: Using RequiresFeature Attribute
When I call a service method that requires a certain feature using a user lacking of certain feature, I get above message - it works correct, it's just not translated properly. Not just the feature name (which is not translated at all but showing the translation-key), but the whole message is in English but should be in German.
I think, permission checker might work quite similar - there are no issues with permission checker. Also, I can find according translations in localization files for permssion checker. But not for feature checker.
-
0
Hi @alexanderpilhar
The Feature is not important here. This exception message is coming from ABP Framework, see https://github.com/aspnetboilerplate/aspnetboilerplate/blob/master/src/Abp/Application/Features/FeatureCheckerExtensions.cs#L229
-
0
Hi @ismcagdas! So, it is not translated, right?
-
1
@alexanderpilhar, yes you are right. You can create an issue on ABP repository for that if you want to.
-
0
Thank you @ismcagdas!
Created Issue: [FeatureChecker should make use of Localization when throwing AbpAuthorizationException #4365](https://github.com/aspnetboilerplate/aspnetboilerplate/issues/4365)