Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/Files.App/Strings/en-US/Resources.resw
Original file line number Diff line number Diff line change
Expand Up @@ -465,10 +465,10 @@
<value>B</value>
</data>
<data name="PropertiesFilesAndFoldersCountString" xml:space="preserve">
<value>{0:#,##0} files, {1:#,##0} folders</value>
<value>{0, number} {0, plural, one {file} other {files}}, {1, number} {1, plural, one {folder} other {folders}}</value>
</data>
<data name="PropertiesFilesFoldersAndLocationsCountString" xml:space="preserve">
<value>{0:#,##0} files, {1:#,##0} folders from {2:#,##0} locations</value>
<data name="PropertiesLocationsCountString" xml:space="preserve">
<value>from {0, number} {0, plural, one {location} other {locations}}</value>
</data>
<data name="BaseLayoutContextFlyoutRunAsAnotherUser.Text" xml:space="preserve">
<value>Run as another user</value>
Expand Down Expand Up @@ -1601,8 +1601,8 @@
<data name="PreviewPaneLoadCloudItemButton.ToolTipService.ToolTip" xml:space="preserve">
<value>Downloads the item from the cloud and loads the preview</value>
</data>
<data name="DetailsArchiveItemCount" xml:space="preserve">
<value>{0} items ({1} files, {2} folders)</value>
<data name="DetailsArchiveItems" xml:space="preserve">
<value>{0, plural, one {# item} other {# items}} ({1, plural, one {# file} other {# files}}, {2, plural, one {# folder} other {# folders}})</value>
</data>
<data name="PropertyUncompressedSize" xml:space="preserve">
<value>Uncompressed size</value>
Expand Down
13 changes: 8 additions & 5 deletions src/Files.App/ViewModels/Properties/Items/BaseProperties.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

using Microsoft.UI.Dispatching;
using System.IO;
using System.Text;
using Windows.Storage.FileProperties;
using static Files.App.Helpers.Win32Helper;
using FileAttributes = System.IO.FileAttributes;
Expand Down Expand Up @@ -121,14 +122,16 @@ await Dispatcher.EnqueueOrInvokeAsync(() =>

public void SetItemsCountString()
{
var resourceText = new StringBuilder();
resourceText.Append("PropertiesFilesAndFoldersCountString".GetLocalizedFormatResource(ViewModel.FilesCount, ViewModel.FoldersCount));

if (ViewModel.LocationsCount > 0)
{
ViewModel.FilesAndFoldersCountString = string.Format("PropertiesFilesFoldersAndLocationsCountString".GetLocalizedResource(), ViewModel.FilesCount, ViewModel.FoldersCount, ViewModel.LocationsCount);
}
else
{
ViewModel.FilesAndFoldersCountString = string.Format("PropertiesFilesAndFoldersCountString".GetLocalizedResource(), ViewModel.FilesCount, ViewModel.FoldersCount);
resourceText.Append(' ');
resourceText.Append("PropertiesLocationsCountString".GetLocalizedFormatResource(ViewModel.LocationsCount));
}

ViewModel.FilesAndFoldersCountString = resourceText.ToString();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public override async Task<List<FileProperty>> LoadPreviewAndDetailsAsync()

folderCount = (int)zipFile.FilesCount - fileCount;

string propertyItemCount = string.Format("DetailsArchiveItemCount".GetLocalizedResource(), zipFile.FilesCount, fileCount, folderCount);
string propertyItemCount = "DetailsArchiveItems".GetLocalizedFormatResource(zipFile.FilesCount, fileCount, folderCount);
details.Add(GetFileProperty("PropertyItemCount", propertyItemCount));
details.Add(GetFileProperty("PropertyUncompressedSize", totalSize.ToLongSizeString()));

Expand Down