Skip to content

Commit

Permalink
#43 Fixed installation process
Browse files Browse the repository at this point in the history
  • Loading branch information
skoshelev committed Dec 7, 2022
1 parent de2a313 commit 90e9ad3
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/Presentation/Nop.Web.Framework/UI/NopHtmlHelper.cs
Original file line number Diff line number Diff line change
@@ -40,7 +40,7 @@ public partial class NopHtmlHelper : INopHtmlHelper
private readonly HtmlEncoder _htmlEncoder;
private readonly IActionContextAccessor _actionContextAccessor;
private readonly IAssetPipeline _assetPipeline;
private readonly ILocalizationService _localizationService;
private readonly Lazy<ILocalizationService> _localizationService;
private readonly IStoreContext _storeContext;
private readonly IUrlHelperFactory _urlHelperFactory;
private readonly IWebHostEnvironment _webHostEnvironment;
@@ -68,7 +68,7 @@ public NopHtmlHelper(AppSettings appSettings,
HtmlEncoder htmlEncoder,
IActionContextAccessor actionContextAccessor,
IAssetPipeline assetPipeline,
ILocalizationService localizationService,
Lazy<ILocalizationService> localizationService,
IStoreContext storeContext,
IUrlHelperFactory urlHelperFactory,
IWebHostEnvironment webHostEnvironment,
@@ -211,7 +211,7 @@ public virtual async Task<IHtmlContent> GenerateTitleAsync(bool addDefaultTitle
{
AppendTitleParts(part);
var store = await _storeContext.GetCurrentStoreAsync();
var defaultTitle = await _localizationService.GetLocalizedAsync(store, s => s.DefaultTitle);
var defaultTitle = await _localizationService.Value.GetLocalizedAsync(store, s => s.DefaultTitle);

var specificTitle = string.Join(_seoSettings.PageTitleSeparator, _titleParts.AsEnumerable().Reverse().ToArray());
string result;
@@ -281,7 +281,7 @@ public virtual async Task<IHtmlContent> GenerateMetaDescriptionAsync(string part
var metaDescription = string.Join(", ", _metaDescriptionParts.AsEnumerable().Reverse().ToArray());
var result = !string.IsNullOrEmpty(metaDescription)
? metaDescription
: await _localizationService.GetLocalizedAsync(await _storeContext.GetCurrentStoreAsync(),
: await _localizationService.Value.GetLocalizedAsync(await _storeContext.GetCurrentStoreAsync(),
s => s.DefaultMetaDescription);

return new HtmlString(_htmlEncoder.Encode(result ?? string.Empty));
@@ -324,7 +324,7 @@ public virtual async Task<IHtmlContent> GenerateMetaKeywordsAsync(string part =
var metaKeyword = string.Join(", ", _metaKeywordParts.AsEnumerable().Reverse().ToArray());
var result = !string.IsNullOrEmpty(metaKeyword)
? metaKeyword
: await _localizationService.GetLocalizedAsync(await _storeContext.GetCurrentStoreAsync(),
: await _localizationService.Value.GetLocalizedAsync(await _storeContext.GetCurrentStoreAsync(),
s => s.DefaultMetaKeywords);

return new HtmlString(_htmlEncoder.Encode(result ?? string.Empty));

0 comments on commit 90e9ad3

Please sign in to comment.