Skip to content

Commit

Permalink
Rename Twitter/X workflow task to match updated view names (#15930)
Browse files Browse the repository at this point in the history
Co-authored-by: Mike Alhayek <mike@crestapps.com>
Co-authored-by: Zoltán Lehóczky <zoltan.lehoczky@lombiq.com>
Co-authored-by: Hisham Bin Ateya <hishamco_2007@yahoo.com>
  • Loading branch information
4 people authored Aug 20, 2024
1 parent c54dc4e commit 51f24d7
Show file tree
Hide file tree
Showing 12 changed files with 30 additions and 30 deletions.
10 changes: 5 additions & 5 deletions src/OrchardCore.Modules/OrchardCore.Twitter/AdminMenuSignin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ public Task BuildNavigationAsync(string name, NavigationBuilder builder)
builder
.Add(S["Security"], security => security
.Add(S["Authentication"], authentication => authentication
.Add(S["Sign in with X"], S["Sign in with X"].PrefixPosition(), x => x
.AddClass("x")
.Id("x")
.Add(S["Sign in with X (Twitter)"], S["Sign in with X (Twitter)"].PrefixPosition(), twitter => twitter
.AddClass("twitter")
.Id("twitter")
.Action("Index", "Admin", _routeValues)
.Permission(Permissions.ManageTwitterSignin)
.LocalNav())
Expand Down Expand Up @@ -67,8 +67,8 @@ public Task BuildNavigationAsync(string name, NavigationBuilder builder)
builder
.Add(S["Configuration"], configuration => configuration
.Add(S["Settings"], settings => settings
.Add(S["X"], S["X"].PrefixPosition(), twitter => twitter
.AddClass("x").Id("x")
.Add(S["X (Twitter)"], S["X (Twitter)"].PrefixPosition(), twitter => twitter
.AddClass("twitter").Id("twitter")
.Action("Index", "Admin", _routeValues)
.Permission(Permissions.ManageTwitter)
.LocalNav()
Expand Down
10 changes: 5 additions & 5 deletions src/OrchardCore.Modules/OrchardCore.Twitter/Manifest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,20 @@
Author = ManifestConstants.OrchardCoreTeam,
Website = ManifestConstants.OrchardCoreWebsite,
Version = ManifestConstants.OrchardCoreVersion,
Category = "X"
Category = "X (Twitter)"
)]

[assembly: Feature(
Id = TwitterConstants.Features.Twitter,
Name = "X (Twitter) Integration",
Category = "X",
Description = "Provides a TwitterClient and Workflow Activities to integrate with X"
Category = "X (Twitter)",
Description = "Provides a TwitterClient and Workflow Activities to integrate with X (Twitter)"
)]

[assembly: Feature(
Id = TwitterConstants.Features.Signin,
Name = "Sign in with X (Twitter)",
Category = "X",
Description = "Authenticates users with their X Account.",
Category = "X (Twitter)",
Description = "Authenticates users with their X (Twitter) Account.",
Dependencies = [TwitterConstants.Features.Twitter]
)]
4 changes: 2 additions & 2 deletions src/OrchardCore.Modules/OrchardCore.Twitter/Permissions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ namespace OrchardCore.Twitter;

public sealed class Permissions : IPermissionProvider
{
public static readonly Permission ManageTwitter = new("ManageTwitter", "Manage Twitter settings");
public static readonly Permission ManageTwitter = new("ManageTwitter", "Manage X (Twitter) settings");

public static readonly Permission ManageTwitterSignin = new("ManageTwitterSignin", "Manage Sign in with Twitter settings");
public static readonly Permission ManageTwitterSignin = new("ManageTwitterSignin", "Manage Sign in with X (Twitter) settings");

private readonly IEnumerable<Permission> _allPermissions =
[
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ private async Task<TwitterSettings> GetTwitterSettingsAsync()
{
if (_shellSettings.IsRunning())
{
_logger.LogWarning("Twitter is not correctly configured.");
_logger.LogWarning("X (Twitter) is not correctly configured.");
}

return null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,14 @@ public void Configure(AuthenticationOptions options)
if (string.IsNullOrWhiteSpace(settings.Item1.ConsumerKey) ||
string.IsNullOrWhiteSpace(settings.Item1.ConsumerSecret))
{
_logger.LogWarning("The Twitter login provider is enabled but not configured.");
_logger.LogWarning("The X (Twitter) login provider is enabled but not configured.");

return;
}

options.AddScheme(TwitterDefaults.AuthenticationScheme, builder =>
{
builder.DisplayName = "Twitter";
builder.DisplayName = "X (Twitter)";
builder.HandlerType = typeof(TwitterHandler);
});
}
Expand All @@ -91,7 +91,7 @@ public void Configure(string name, TwitterOptions options)
}
catch
{
_logger.LogError("The Twitter Consumer Secret could not be decrypted. It may have been encrypted using a different key.");
_logger.LogError("The X (Twitter) Consumer Secret could not be decrypted. It may have been encrypted using a different key.");
}

if (settings.Item2.CallbackPath.HasValue)
Expand All @@ -114,7 +114,7 @@ private async Task<Tuple<TwitterSettings, TwitterSigninSettings>> GetSettingsAsy
{
if (_shellSettings.IsRunning())
{
_logger.LogWarning("Integration with Twitter is not correctly configured.");
_logger.LogWarning("Integration with X (Twitter) is not correctly configured.");
}

return null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
@model ActivityViewModel<UpdateTwitterStatusTask>

<header>
<h4><i class="fa-brands fa-x-twitter" aria-hidden="true"></i>@Model.Activity.GetTitleOrDefault(() => T["Update X Status"])</h4>
<h4><i class="fa-brands fa-x-twitter" aria-hidden="true"></i>@Model.Activity.GetTitleOrDefault(() => T["Update X (Twitter) Status"])</h4>
</header>
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
@model UpdateTwitterStatusTaskViewModel

<div class="mb-3" asp-validation-class-for="StatusTemplate">
<label asp-for="StatusTemplate" class="form-label">@T["Template for updating twitter status"]</label>
<label asp-for="StatusTemplate" class="form-label">@T["Template for updating X (Twitter) status"]</label>
<input type="text" asp-for="StatusTemplate" class="form-control code" />
<span asp-validation-for="StatusTemplate"></span>
<span class="hint">@T["The status text of the post."]</span>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
<h4 class="card-title"><i class="fa-brands fa-x-twitter" aria-hidden="true"></i>@T["Update X Status"]</h4>
<h4 class="card-title"><i class="fa-brands fa-x-twitter" aria-hidden="true"></i>@T["Update X (Twitter) Status"]</h4>
<p>@T["Create a post"]</p>
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<span class="icon"><i class="fa-brands fa-x-twitter" aria-hidden="true"></i></span><span class="title">@T["X"]</span>
<span class="icon"><i class="fa-brands fa-x-twitter" aria-hidden="true"></i></span><span class="title">@T["X (Twitter)"]</span>
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,22 @@

<p class="alert alert-warning" role="alert">
@T["The website might be restarted upon saving the settings, potentially leading to temporary unresponsiveness during the process."]
<a class="seedoc" href="@(OrchardCore.Admin.Constants.DocsUrl)reference/modules/Twitter/#twitter-integration" target="_blank">@T["See documentation"]</a>
<a class="seedoc" href="@(OrchardCore.Admin.Constants.DocsUrl)reference/modules/X/#x-twitter-integration" target="_blank">@T["See documentation"]</a>
</p>

@if (Model.HasDecryptionError)
{
<p class="alert alert-danger">@T["An error occurred while decrypting a setting. Please apply and save."]</p>
}

<h3>@T["X Integration Settings"]</h3>
<h3>@T["X (Twitter) Integration Settings"]</h3>

<div class="mb-3 row" asp-validation-class-for="APIKey">
<div class="col-large col-12 col-sm-12 col-md-12 col-lg-12 col-xl-9">
<label asp-for="APIKey" class="form-label">@T["API key"]</label>
<input asp-for="APIKey" class="form-control" autocomplete="off" />
<span asp-validation-for="APIKey"></span>
<span class="hint">@T["The API key defined in the Keys and tokens tab of twitter app dashboard."]</span>
<span class="hint">@T["The API key defined in the Keys and tokens tab of X (Twitter) app dashboard."]</span>
</div>
</div>

Expand All @@ -27,7 +27,7 @@
<label asp-for="APISecretKey" class="form-label">@T["API secret key"]</label>
<input asp-for="APISecretKey" class="form-control" type="password" value="@Model.APISecretKey" autocomplete="off" />
<span asp-validation-for="APISecretKey"></span>
<span class="hint">@T["The API secret defined in the Keys and tokens tab of twitter app dashboard."]</span>
<span class="hint">@T["The API secret defined in the Keys and tokens tab of X (Twitter) app dashboard."]</span>
</div>
</div>

Expand All @@ -36,7 +36,7 @@
<label asp-for="AccessToken" class="form-label">@T["Access Token"]</label>
<input asp-for="AccessToken" class="form-control" autocomplete="off" />
<span asp-validation-for="AccessToken"></span>
<span class="hint">@T["The Access Token defined in the Keys and tokens tab of twitter app dashboard."]</span>
<span class="hint">@T["The Access Token defined in the Keys and tokens tab of X (Twitter) app dashboard."]</span>
</div>
</div>

Expand All @@ -45,6 +45,6 @@
<label asp-for="AccessTokenSecret" class="form-label">@T["Access Token Secret"]</label>
<input asp-for="AccessTokenSecret" class="form-control" type="password" value="@Model.AccessTokenSecret" autocomplete="off" />
<span asp-validation-for="AccessTokenSecret"></span>
<span class="hint">@T["The Access Token Secret in the Keys and tokens tab of twitter app dashboard."]</span>
<span class="hint">@T["The Access Token Secret in the Keys and tokens tab of X (Twitter) app dashboard."]</span>
</div>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@

<p class="alert alert-warning" role="alert">
@T["The website might be restarted upon saving the settings, potentially leading to temporary unresponsiveness during the process."]
<a class="seedoc" href="@(OrchardCore.Admin.Constants.DocsUrl)reference/modules/Twitter/#sign-in-with-x" target="_blank">@T["See documentation"]</a>
<a class="seedoc" href="@(OrchardCore.Admin.Constants.DocsUrl)reference/modules/X/#sign-in-with-x-twitter" target="_blank">@T["See documentation"]</a>
</p>

<h3>@T["Sign in with X Settings"]</h3>
<h3>@T["Sign in with X (Twitter) Settings"]</h3>

<div class="mb-3 row" asp-validation-class-for="CallbackPath">
<div class="col-large col-12 col-sm-12 col-md-12 col-lg-12 col-xl-9">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ IStringLocalizer<UpdateTwitterStatusTask> localizer
S = localizer;
}

public override LocalizedString DisplayText => S["Update X Status Task"];
public override LocalizedString DisplayText => S["Update X (Twitter) Status Task"];

// The category to which this activity belongs. The activity picker groups activities by this category.
public override LocalizedString Category => S["Social"];
Expand Down

0 comments on commit 51f24d7

Please sign in to comment.