Open Closed

missing translation for exception message #6635


0
alexanderpilhar created

It seems there is no translation for exception-messages thrown because of missing features (I can't find it in localization files): aspnetzero-required_featrues_not_enabled.png


6 Answer(s)
  • 0
    ryancyq created

    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
    alexanderpilhar created

    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
    ismcagdas created

    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
    alexanderpilhar created

    Hi @ismcagdas! So, it is not translated, right?

  • 1
    ismcagdas created

    @alexanderpilhar, yes you are right. You can create an issue on ABP repository for that if you want to.

  • 0
    alexanderpilhar created