Browse Source

Updated the error message

pull/13718/head
malik masis 4 years ago
parent
commit
e2ef54f26d
  1. 9
      modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Tags/EntityTagSetDto.cs
  2. 3
      modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/en.json
  3. 3
      modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/tr.json

9
modules/cms-kit/src/Volo.CmsKit.Admin.Application.Contracts/Volo/CmsKit/Admin/Tags/EntityTagSetDto.cs

@ -3,6 +3,7 @@ using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Localization;
using Volo.Abp.Validation.Localization;
using Volo.CmsKit.Localization;
using Volo.CmsKit.Tags;
@ -20,7 +21,7 @@ public class EntityTagSetDto : IValidatableObject
public IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
{
var l = validationContext.GetRequiredService<IStringLocalizer<CmsKitResource>>();
var l = validationContext.GetRequiredService<IStringLocalizer<AbpValidationResource>>();
foreach (var tag in Tags)
{
@ -28,10 +29,8 @@ public class EntityTagSetDto : IValidatableObject
{
yield return new ValidationResult(
l[
"MaxTagLengthExceptionMessage",
tag,
TagConsts.MaxNameLength,
typeof(EntityTagSetDto).FullName
"ThisFieldMustBeAStringWithAMaximumLengthOf{0}",
TagConsts.MaxNameLength
],
new[] { nameof(Tags) }
);

3
modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/en.json

@ -206,7 +206,6 @@
"Feature:ReactionEnable": "Enabled reaction",
"Feature:ReactionEnableDescription": "Enable reaction in the application.",
"Feature:TagEnable": "Enabled taging",
"Feature:TagEnableDescription": "Enable taging in the application.",
"MaxTagLengthExceptionMessage": "{0} length must be equal to or lower than {1}. {2}"
"Feature:TagEnableDescription": "Enable taging in the application."
}
}

3
modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/tr.json

@ -209,7 +209,6 @@
"Feature:ReactionEnable": "Reaksiyonları etkinleştirin",
"Feature:ReactionEnableDescription": "Uygulamınızdaki reaksiyonları etkinleştirir.",
"Feature:TagEnable": "Etkiketleri etkinleştirin",
"Feature:TagEnableDescription": "Uygulamınızdaki etiketleri etkinleştirir.",
"MaxTagLengthExceptionMessage": "{0} uzunluğu {1} den küçük veya eşit olmalı. {2}"
"Feature:TagEnableDescription": "Uygulamınızdaki etiketleri etkinleştirir."
}
}

Loading…
Cancel
Save