Skip to content

Commit ea4a6be

Browse files
Update localization strings in action classes
Replaced hardcoded string keys in `RunAsAdminAction`, `RunAsAnotherUserAction`, and `RunWithPowershellAction` with new keys from the `Strings` class for better organization and management of localization resources.
1 parent be62356 commit ea4a6be

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

src/Files.App/Actions/Content/Run/RunAsAdminAction.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ internal sealed partial class RunAsAdminAction : BaseRunAsAction
1010
private readonly IContentPageContext ContentPageContext = Ioc.Default.GetRequiredService<IContentPageContext>();
1111

1212
public override string Label
13-
=> "RunAsAdministrator".GetLocalizedResource();
13+
=> Strings.RunAsAdministrator.GetLocalizedResource();
1414

1515
public override string Description
16-
=> "RunAsAdminDescription".GetLocalizedResource();
16+
=> Strings.RunAsAdminDescription.GetLocalizedResource();
1717

1818
public override RichGlyph Glyph
1919
=> new("\uE7EF");

src/Files.App/Actions/Content/Run/RunAsAnotherUserAction.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ internal sealed partial class RunAsAnotherUserAction : BaseRunAsAction
99
{
1010
private readonly IContentPageContext ContentPageContext = Ioc.Default.GetRequiredService<IContentPageContext>();
1111
public override string Label
12-
=> "BaseLayoutContextFlyoutRunAsAnotherUser/Text".GetLocalizedResource();
12+
=> Strings.BaseLayoutContextFlyoutRunAsAnotherUser_Text.GetLocalizedResource();
1313

1414
public override string Description
15-
=> "RunAsAnotherUserDescription".GetLocalizedResource();
15+
=> Strings.RunAsAnotherUserDescription.GetLocalizedResource();
1616

1717
public override RichGlyph Glyph
1818
=> new("\uE7EE");

src/Files.App/Actions/Content/Run/RunWithPowershellAction.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ internal sealed partial class RunWithPowershellAction : ObservableObject, IActio
1010
private readonly IContentPageContext context;
1111

1212
public string Label
13-
=> "RunWithPowerShell".GetLocalizedResource();
13+
=> Strings.RunWithPowerShell.GetLocalizedResource();
1414

1515
public string Description
16-
=> "RunWithPowershellDescription".GetLocalizedResource();
16+
=> Strings.RunWithPowershellDescription.GetLocalizedResource();
1717

1818
public RichGlyph Glyph
1919
=> new("\uE756");

0 commit comments

Comments
 (0)