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
6 changes: 3 additions & 3 deletions src/Files.App/Strings/en-US/Resources.resw
Original file line number Diff line number Diff line change
Expand Up @@ -455,8 +455,8 @@
<data name="PropertiesFilesAndFoldersCountString" xml:space="preserve">
<value>{0, number} {0, plural, one {file} other {files}}, {1, number} {1, plural, one {folder} other {folders}}</value>
</data>
<data name="PropertiesLocationsCountString" xml:space="preserve">
<value>from {0, number} {0, plural, one {location} other {locations}}</value>
<data name="PropertiesFilesAndFoldersAndLocationsCount" xml:space="preserve">
<value>{0, number} {0, plural, one {file} other {files}}, {1, number} {1, plural, one {folder} other {folders}} from {2, number} {2, plural, one {location} other {locations}}</value>
</data>
<data name="BaseLayoutContextFlyoutRunAsAnotherUser.Text" xml:space="preserve">
<value>Run as another user</value>
Expand Down Expand Up @@ -1239,7 +1239,7 @@
<value>{0, plural, one {There is one conflicting file name} other {There are # conflicting file names}}</value>
</data>
<data name="ConflictingItemsDialogSubtitleConflictsNonConflicts" xml:space="preserve">
<value>{0, plural, one {, and one outgoing item} other {, and # outgoing items}}</value>
<value>{0, plural, one {There is one conflicting file name} other {There are # conflicting file names}}, and {1, plural, one {one outgoing item} other {# outgoing items}}</value>
</data>
<data name="ConflictingItemsDialogTitle" xml:space="preserve">
<value>Conflicting {0, plural, one {file name} other {file names}}</value>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,14 +151,10 @@ public static FileSystemDialogViewModel GetDialogViewModel(FileSystemDialogMode
{
titleText = "ConflictingItemsDialogTitle".GetLocalizedFormatResource(totalCount);

var descriptionLocalized = new StringBuilder();
descriptionLocalized.Append("ConflictingItemsDialogSubtitleConflicts".GetLocalizedFormatResource(conflictingItems.Count));
descriptionText = nonConflictingItems.Count > 0
? "ConflictingItemsDialogSubtitleConflictsNonConflicts".GetLocalizedFormatResource(conflictingItems.Count, nonConflictingItems.Count)
: "ConflictingItemsDialogSubtitleConflicts".GetLocalizedFormatResource(conflictingItems.Count);

if (nonConflictingItems.Count > 0)
descriptionLocalized.Append("ConflictingItemsDialogSubtitleConflictsNonConflicts".GetLocalizedFormatResource(nonConflictingItems.Count));

descriptionLocalized.Append('.');
descriptionText = descriptionLocalized.ToString();
primaryButtonText = "ConflictingItemsDialogPrimaryButtonText".ToLocalized();
secondaryButtonText = "Cancel".ToLocalized();
}
Expand Down
14 changes: 3 additions & 11 deletions src/Files.App/ViewModels/Properties/Items/BaseProperties.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

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 @@ -122,16 +121,9 @@ await Dispatcher.EnqueueOrInvokeAsync(() =>

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

if (ViewModel.LocationsCount > 0)
{
resourceText.Append(' ');
resourceText.Append("PropertiesLocationsCountString".GetLocalizedFormatResource(ViewModel.LocationsCount));
}

ViewModel.FilesAndFoldersCountString = resourceText.ToString();
ViewModel.FilesAndFoldersCountString = ViewModel.LocationsCount > 0
? "PropertiesFilesAndFoldersAndLocationsCount".GetLocalizedFormatResource(ViewModel.FilesCount, ViewModel.FoldersCount, ViewModel.LocationsCount)
: "PropertiesFilesAndFoldersCountString".GetLocalizedFormatResource(ViewModel.FilesCount, ViewModel.FoldersCount);
}
}
}