Browse Source

Merge branch 'rel-4.0' into dev

pull/6352/head
Halil İbrahim Kalkan 6 years ago
parent
commit
12bf9399a8
  1. 13
      framework/src/Volo.Abp.AspNetCore.Components.WebAssembly/Volo/Abp/AspNetCore/Components/WebAssembly/AbpBlazorMessageLocalizerHelper.cs

13
framework/src/Volo.Abp.AspNetCore.Components.WebAssembly/Volo/Abp/AspNetCore/Components/WebAssembly/AbpBlazorMessageLocalizerHelper.cs

@ -32,9 +32,16 @@ namespace Volo.Abp.AspNetCore.Components.WebAssembly
{
foreach (var argument in arguments)
{
yield return stringLocalizer[$"DisplayName:{argument}"]
?? stringLocalizer[argument]
?? argument;
// first try to localize with "DisplayName:{Name}"
var localization = stringLocalizer[$"DisplayName:{argument}"];
if (localization.ResourceNotFound)
{
// then try to localize with just "{Name}"
localization = stringLocalizer[argument];
}
yield return localization;
}
}
}

Loading…
Cancel
Save