-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix GraphQL schema localization. (#17041)
--------- Co-authored-by: Mike Alhayek <[email protected]>
- Loading branch information
1 parent
1061902
commit 2c1a310
Showing
37 changed files
with
333 additions
and
205 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 10 additions & 4 deletions
14
src/OrchardCore.Modules/OrchardCore.ContentFields/GraphQL/Types/LinkFieldQueryObjectType.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,22 @@ | ||
using GraphQL.Types; | ||
using Microsoft.Extensions.Localization; | ||
using OrchardCore.ContentFields.Fields; | ||
|
||
namespace OrchardCore.ContentFields.GraphQL.Types; | ||
|
||
public class LinkFieldQueryObjectType : ObjectGraphType<LinkField> | ||
{ | ||
public LinkFieldQueryObjectType() | ||
public LinkFieldQueryObjectType(IStringLocalizer<LinkFieldQueryObjectType> S) | ||
{ | ||
Name = nameof(LinkField); | ||
|
||
Field(x => x.Url, nullable: true).Description("the url of the link"); | ||
Field(x => x.Text, nullable: true).Description("the text of the link"); | ||
Field(x => x.Target, nullable: true).Description("the target of the link"); | ||
Field(x => x.Url, nullable: true) | ||
.Description(S["the url of the link"]); | ||
|
||
Field(x => x.Text, nullable: true) | ||
.Description(S["the text of the link"]); | ||
|
||
Field(x => x.Target, nullable: true) | ||
.Description(S["the target of the link"]); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 7 additions & 6 deletions
13
src/OrchardCore.Modules/OrchardCore.Flows/GraphQL/FlowAlignmentEnum.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,18 @@ | ||
using GraphQL.Types; | ||
using Microsoft.Extensions.Localization; | ||
|
||
namespace OrchardCore.Flows.GraphQL; | ||
|
||
public class FlowAlignmentEnum : EnumerationGraphType | ||
{ | ||
public FlowAlignmentEnum() | ||
public FlowAlignmentEnum(IStringLocalizer<FlowAlignmentEnum> S) | ||
{ | ||
Name = "FlowAlignment"; | ||
|
||
Description = "The widget alignment."; | ||
Add("Left", 0, "Left alignment."); | ||
Add("Center", 1, "Center alignment."); | ||
Add("Right", 2, "Right alignment."); | ||
Add("Justify", 3, "Justify alignment."); | ||
Description = S["The widget alignment."]; | ||
Add("Left", 0, S["Left alignment."]); | ||
Add("Center", 1, S["Center alignment."]); | ||
Add("Right", 2, S["Right alignment."]); | ||
Add("Justify", 3, S["Justify alignment."]); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.