Skip to content

Commit

Permalink
remove localize
Browse files Browse the repository at this point in the history
  • Loading branch information
hyzx86 committed May 8, 2024
1 parent 75b42b6 commit 13c32f1
Showing 1 changed file with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using System;
using System.Text.Json.Nodes;
using System.Threading.Tasks;
using Microsoft.Extensions.Localization;
using OrchardCore.ContentManagement.Metadata;
using OrchardCore.ContentManagement.Metadata.Models;
using OrchardCore.ContentManagement.Metadata.Records;
Expand All @@ -16,12 +15,10 @@ namespace OrchardCore.ContentTypes.RecipeSteps
public class ContentDefinitionStep : IRecipeStepHandler
{
private readonly IContentDefinitionManager _contentDefinitionManager;
protected readonly IStringLocalizer S;

public ContentDefinitionStep(IContentDefinitionManager contentDefinitionManager, IStringLocalizer<ContentDefinitionStep> s)
public ContentDefinitionStep(IContentDefinitionManager contentDefinitionManager)
{
_contentDefinitionManager = contentDefinitionManager;
S = s;
}

public async Task ExecuteAsync(RecipeExecutionContext context)
Expand Down Expand Up @@ -63,7 +60,7 @@ private Task UpdateContentTypeAsync(ContentTypeDefinition type, ContentTypeDefin
{
if (string.IsNullOrEmpty(part.PartName))
{
throw new InvalidOperationException(S["Unable to add content-part to the '{0}' content-type. The part name cannot be null or empty.", type.Name]);
throw new InvalidOperationException($"Unable to add content-part to the '{type.Name}' content-type. The part name cannot be null or empty.");
}

builder.WithPart(part.Name, part.PartName, partBuilder => partBuilder.MergeSettings(part.Settings));
Expand Down

0 comments on commit 13c32f1

Please sign in to comment.