Skip to content

Commit e993f5e

Browse files
authored
Code Quality: Improved display of singular and plural strings (#17036)
1 parent c489032 commit e993f5e

30 files changed

+63
-71
lines changed

src/Files.App/Actions/Content/Archives/Compress/CompressIntoArchiveAction.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ public override string Label
1313
=> Strings.CreateArchive.GetLocalizedResource();
1414

1515
public override string Description
16-
=> Strings.CompressIntoArchiveDescription.GetLocalizedResource();
16+
=> Strings.CompressIntoArchiveDescription.GetLocalizedFormatResource(context.SelectedItems.Count);
1717

1818
public CompressIntoArchiveAction()
1919
{

src/Files.App/Actions/Content/Archives/Compress/CompressIntoSevenZipAction.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ public override string Label
99
=> string.Format(Strings.CreateNamedArchive.GetLocalizedResource(), $"{StorageArchiveService.GenerateArchiveNameFromItems(context.SelectedItems)}.7z");
1010

1111
public override string Description
12-
=> Strings.CompressIntoSevenZipDescription.GetLocalizedResource();
12+
=> Strings.CompressIntoSevenZipDescription.GetLocalizedFormatResource(context.SelectedItems.Count);
1313

1414
public CompressIntoSevenZipAction()
1515
{

src/Files.App/Actions/Content/Archives/Compress/CompressIntoZipAction.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ public override string Label
99
=> string.Format(Strings.CreateNamedArchive.GetLocalizedResource(), $"{StorageArchiveService.GenerateArchiveNameFromItems(context.SelectedItems)}.zip");
1010

1111
public override string Description
12-
=> Strings.CompressIntoZipDescription.GetLocalizedResource();
12+
=> Strings.CompressIntoZipDescription.GetLocalizedFormatResource(context.SelectedItems.Count);
1313

1414
public CompressIntoZipAction()
1515
{

src/Files.App/Actions/Content/Archives/Decompress/DecompressArchive.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public override string Label
1717
=> Strings.ExtractFiles.GetLocalizedResource();
1818

1919
public override string Description
20-
=> Strings.DecompressArchiveDescription.GetLocalizedResource();
20+
=> Strings.DecompressArchiveDescription.GetLocalizedFormatResource(context.SelectedItems.Count);
2121

2222
public override HotKey HotKey
2323
=> new(Keys.E, KeyModifiers.Ctrl);

src/Files.App/Actions/Content/Archives/Decompress/DecompressArchiveHere.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ public override string Label
99
=> Strings.ExtractHere.GetLocalizedResource();
1010

1111
public override string Description
12-
=> Strings.DecompressArchiveHereDescription.GetLocalizedResource();
12+
=> Strings.DecompressArchiveHereDescription.GetLocalizedFormatResource(context.SelectedItems.Count);
1313

1414
public DecompressArchiveHere()
1515
{

src/Files.App/Actions/Content/Archives/Decompress/DecompressArchiveHereSmart.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ public override string Label
99
=> Strings.ExtractHereSmart.GetLocalizedResource();
1010

1111
public override string Description
12-
=> Strings.DecompressArchiveHereSmartDescription.GetLocalizedResource();
12+
=> Strings.DecompressArchiveHereSmartDescription.GetLocalizedFormatResource(context.SelectedItems.Count);
1313

1414
public override HotKey HotKey
1515
=> new(Keys.E, KeyModifiers.CtrlShift);

src/Files.App/Actions/Content/Archives/Decompress/DecompressArchiveToChildFolderAction.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ public override string Label
1515
=> ComputeLabel();
1616

1717
public override string Description
18-
=> Strings.DecompressArchiveToChildFolderDescription.GetLocalizedResource();
18+
=> Strings.DecompressArchiveToChildFolderDescription.GetLocalizedFormatResource(context.SelectedItems.Count);
1919

2020
public DecompressArchiveToChildFolderAction()
2121
{

src/Files.App/Actions/Content/ImageManipulation/BaseRotateAction.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ namespace Files.App.Actions
88
{
99
internal abstract class BaseRotateAction : ObservableObject, IAction
1010
{
11-
private readonly IContentPageContext context;
11+
protected readonly IContentPageContext context;
1212

1313
private readonly InfoPaneViewModel _infoPaneViewModel;
1414

src/Files.App/Actions/Content/ImageManipulation/RotateLeftAction.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ public override string Label
1111
=> Strings.RotateLeft.GetLocalizedResource();
1212

1313
public override string Description
14-
=> Strings.RotateLeftDescription.GetLocalizedResource();
14+
=> Strings.RotateLeftDescription.GetLocalizedFormatResource(context.SelectedItems.Count);
1515

1616
public override RichGlyph Glyph
1717
=> new(themedIconStyle: "App.ThemedIcons.ImageRotate.ACW");

src/Files.App/Actions/Content/ImageManipulation/RotateRightAction.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ public override string Label
1111
=> Strings.RotateRight.GetLocalizedResource();
1212

1313
public override string Description
14-
=> Strings.RotateRightDescription.GetLocalizedResource();
14+
=> Strings.RotateRightDescription.GetLocalizedFormatResource(context.SelectedItems.Count);
1515

1616
public override RichGlyph Glyph
1717
=> new(themedIconStyle: "App.ThemedIcons.ImageRotate.CW");

0 commit comments

Comments
 (0)