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
9 changes: 7 additions & 2 deletions Files/BaseLayout.cs
Original file line number Diff line number Diff line change
Expand Up @@ -85,14 +85,19 @@ internal set
SelectedItem = _SelectedItems.First();
SelectedItemsPropertiesViewModel.IsItemSelected = true;

if (SelectedItems.Count >= 1)
{
SelectedItemsPropertiesViewModel.SelectedItemsCount = SelectedItems.Count;
}

if (SelectedItems.Count == 1)
{
SelectedItemsPropertiesViewModel.SelectedItemsCount = SelectedItems.Count.ToString() + " " + ResourceController.GetTranslation("ItemSelected/Text");
SelectedItemsPropertiesViewModel.SelectedItemsCountString = SelectedItems.Count.ToString() + " " + ResourceController.GetTranslation("ItemSelected/Text");
SelectedItemsPropertiesViewModel.ItemSize = SelectedItem.FileSize;
}
else
{
SelectedItemsPropertiesViewModel.SelectedItemsCount = SelectedItems.Count.ToString() + " " + ResourceController.GetTranslation("ItemsSelected/Text");
SelectedItemsPropertiesViewModel.SelectedItemsCountString = SelectedItems.Count.ToString() + " " + ResourceController.GetTranslation("ItemsSelected/Text");

if (SelectedItems.All(x => x.PrimaryItemAttribute == StorageItemTypes.File))
{
Expand Down
5 changes: 1 addition & 4 deletions Files/Dialogs/ConfirmDeleteDialog.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,7 @@
<RowDefinition />
</Grid.RowDefinitions>
<StackPanel Grid.Row="0" Spacing="10">
<TextBlock
x:Uid="ConfirmDeleteDialogHeader"
Text="Are you sure you want to delete the selected item(s)?"
TextWrapping="WrapWholeWords" />
<TextBlock Text="{x:Bind Description, Mode=OneWay}" TextWrapping="WrapWholeWords" />

<CheckBox
x:Name="chkPermanentlyDelete"
Expand Down
14 changes: 13 additions & 1 deletion Files/Dialogs/ConfirmDeleteDialog.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using Windows.Storage;
using Files.View_Models;
using Windows.Storage;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;

Expand All @@ -9,6 +10,8 @@ namespace Files.Dialogs
public sealed partial class ConfirmDeleteDialog : ContentDialog
{
public StorageDeleteOption PermanentlyDelete { get; set; }
public string Description { get; set; }
public SelectedItemsPropertiesViewModel SelectedItemsPropertiesViewModel => App.CurrentInstance.ContentPage.SelectedItemsPropertiesViewModel;
public MyResult Result { get; set; }

public enum MyResult
Expand All @@ -27,6 +30,15 @@ public ConfirmDeleteDialog(bool deleteFromRecycleBin, StorageDeleteOption delete

// If deleting from recycle bin disable "permanently delete" option
this.chkPermanentlyDelete.IsEnabled = !deleteFromRecycleBin;

if (SelectedItemsPropertiesViewModel.SelectedItemsCount == 1)
{
Description = ResourceController.GetTranslation("ConfirmDeleteDialogDeleteOneItem/Text");
}
else
{
Description = string.Format(ResourceController.GetTranslation("ConfirmDeleteDialogDeleteMultipleItems/Text"), SelectedItemsPropertiesViewModel.SelectedItemsCount);
}
}

private void btnDelete_Click(object sender, RoutedEventArgs e)
Expand Down
13 changes: 8 additions & 5 deletions Files/MultilingualResources/Files.de-DE.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -183,11 +183,6 @@
<source>Delete</source>
<target state="translated">Löschen</target>
</trans-unit>
<trans-unit id="ConfirmDeleteDialogHeader.Text" translate="yes" xml:space="preserve">
<source>Are you sure you want to delete the selected item(s)?</source>
<target state="translated">Sind Sie sicher, dass Sie die ausgewählten Dateien löschen möchten?</target>
<!--This doesn't work in German. If multiply items are selected, the whole sentence needs to change. Maybe I find a better solution at some point-->
</trans-unit>
<trans-unit id="ConfirmDeleteDialogPermanentlyDeleteCheckBox.Content" translate="yes" xml:space="preserve">
<source>Permanently delete</source>
<target state="translated">Endgültig löschen</target>
Expand Down Expand Up @@ -1193,6 +1188,14 @@
<source>Show all context menu items</source>
<target state="translated">Alle im Kontextmenü verfügbaren Elemente anzeigen</target>
</trans-unit>
<trans-unit id="ConfirmDeleteDialogDeleteOneItem.Text" translate="yes" xml:space="preserve">
<source>Are you sure you want to delete this item?</source>
<target state="new">Are you sure you want to delete this item?</target>
</trans-unit>
<trans-unit id="ConfirmDeleteDialogDeleteMultipleItems.Text" translate="yes" xml:space="preserve">
<source>Are you sure you want to delete these {0} items?</source>
<target state="new">Are you sure you want to delete these {0} items?</target>
</trans-unit>
</group>
</body>
</file>
Expand Down
12 changes: 8 additions & 4 deletions Files/MultilingualResources/Files.es-ES.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -183,10 +183,6 @@
<source>Delete</source>
<target state="translated">Eliminar</target>
</trans-unit>
<trans-unit id="ConfirmDeleteDialogHeader.Text" translate="yes" xml:space="preserve">
<source>Are you sure you want to delete the selected item(s)?</source>
<target state="translated">¿Está seguro que desea eliminar el archivo seleccionado?</target>
</trans-unit>
<trans-unit id="ConfirmDeleteDialogPermanentlyDeleteCheckBox.Content" translate="yes" xml:space="preserve">
<source>Permanently delete</source>
<target state="translated">Eliminar permanentemente</target>
Expand Down Expand Up @@ -1186,6 +1182,14 @@
<source>Show all context menu items</source>
<target state="translated">Mostrar todos los elementos del menú contextual</target>
</trans-unit>
<trans-unit id="ConfirmDeleteDialogDeleteOneItem.Text" translate="yes" xml:space="preserve">
<source>Are you sure you want to delete this item?</source>
<target state="new">Are you sure you want to delete this item?</target>
</trans-unit>
<trans-unit id="ConfirmDeleteDialogDeleteMultipleItems.Text" translate="yes" xml:space="preserve">
<source>Are you sure you want to delete these {0} items?</source>
<target state="new">Are you sure you want to delete these {0} items?</target>
</trans-unit>
</group>
</body>
</file>
Expand Down
12 changes: 8 additions & 4 deletions Files/MultilingualResources/Files.fr-FR.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -189,10 +189,6 @@
<source>Delete</source>
<target state="needs-review-translation" state-qualifier="tm-suggestion">Supprimer</target>
</trans-unit>
<trans-unit id="ConfirmDeleteDialogHeader.Text" translate="yes" xml:space="preserve">
<source>Are you sure you want to delete the selected item(s)?</source>
<target state="needs-review-translation" state-qualifier="tm-suggestion">Voulez-vous vraiment supprimer le(s) élément(s) sélectionné(s) ?</target>
</trans-unit>
<trans-unit id="ConfirmDeleteDialogPermanentlyDeleteCheckBox.Content" translate="yes" xml:space="preserve">
<source>Permanently delete</source>
<target state="needs-review-translation" state-qualifier="tm-suggestion">Supprimer de façon définitive</target>
Expand Down Expand Up @@ -1185,6 +1181,14 @@
<source>Show all context menu items</source>
<target state="new">Show all context menu items</target>
</trans-unit>
<trans-unit id="ConfirmDeleteDialogDeleteOneItem.Text" translate="yes" xml:space="preserve">
<source>Are you sure you want to delete this item?</source>
<target state="new">Are you sure you want to delete this item?</target>
</trans-unit>
<trans-unit id="ConfirmDeleteDialogDeleteMultipleItems.Text" translate="yes" xml:space="preserve">
<source>Are you sure you want to delete these {0} items?</source>
<target state="new">Are you sure you want to delete these {0} items?</target>
</trans-unit>
</group>
</body>
</file>
Expand Down
12 changes: 8 additions & 4 deletions Files/MultilingualResources/Files.he-IL.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,6 @@
<source>Delete</source>
<target state="translated" state-qualifier="tm-suggestion">מחק</target>
</trans-unit>
<trans-unit id="ConfirmDeleteDialogHeader.Text" translate="yes" xml:space="preserve">
<source>Are you sure you want to delete the selected item(s)?</source>
<target state="translated" state-qualifier="tm-suggestion">האם אתה בטוח שאתה רוצה למחוק את הפריט/ים המסומנ/ים?</target>
</trans-unit>
<trans-unit id="ConfirmDeleteDialogPermanentlyDeleteCheckBox.Content" translate="yes" xml:space="preserve">
<source>Permanently delete</source>
<target state="translated" state-qualifier="tm-suggestion">‏‏מחק לצמיתות</target>
Expand Down Expand Up @@ -1181,6 +1177,14 @@
<source>Show all context menu items</source>
<target state="new">Show all context menu items</target>
</trans-unit>
<trans-unit id="ConfirmDeleteDialogDeleteOneItem.Text" translate="yes" xml:space="preserve">
<source>Are you sure you want to delete this item?</source>
<target state="new">Are you sure you want to delete this item?</target>
</trans-unit>
<trans-unit id="ConfirmDeleteDialogDeleteMultipleItems.Text" translate="yes" xml:space="preserve">
<source>Are you sure you want to delete these {0} items?</source>
<target state="new">Are you sure you want to delete these {0} items?</target>
</trans-unit>
</group>
</body>
</file>
Expand Down
12 changes: 8 additions & 4 deletions Files/MultilingualResources/Files.hi-IN.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,6 @@
<source>Delete</source>
<target state="translated">हटाएँ</target>
</trans-unit>
<trans-unit id="ConfirmDeleteDialogHeader.Text" translate="yes" xml:space="preserve">
<source>Are you sure you want to delete the selected item(s)?</source>
<target state="translated">क्या आप सुनिश्चित हैं कि आप चयनित वस्तु(ओं) को हटाना चाहते हैं?</target>
</trans-unit>
<trans-unit id="ConfirmDeleteDialogPermanentlyDeleteCheckBox.Content" translate="yes" xml:space="preserve">
<source>Permanently delete</source>
<target state="translated">स्थायी रूप से हटाएं</target>
Expand Down Expand Up @@ -1187,6 +1183,14 @@
<source>Show all context menu items</source>
<target state="new">Show all context menu items</target>
</trans-unit>
<trans-unit id="ConfirmDeleteDialogDeleteOneItem.Text" translate="yes" xml:space="preserve">
<source>Are you sure you want to delete this item?</source>
<target state="new">Are you sure you want to delete this item?</target>
</trans-unit>
<trans-unit id="ConfirmDeleteDialogDeleteMultipleItems.Text" translate="yes" xml:space="preserve">
<source>Are you sure you want to delete these {0} items?</source>
<target state="new">Are you sure you want to delete these {0} items?</target>
</trans-unit>
</group>
</body>
</file>
Expand Down
12 changes: 8 additions & 4 deletions Files/MultilingualResources/Files.it-IT.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,6 @@
<source>Delete</source>
<target state="translated">Elimina</target>
</trans-unit>
<trans-unit id="ConfirmDeleteDialogHeader.Text" translate="yes" xml:space="preserve">
<source>Are you sure you want to delete the selected item(s)?</source>
<target state="translated">Sei sicuro di voler eliminare gli elementi selezionati?</target>
</trans-unit>
<trans-unit id="ConfirmDeleteDialogPermanentlyDeleteCheckBox.Content" translate="yes" xml:space="preserve">
<source>Permanently delete</source>
<target state="translated">Elimina definitivamente</target>
Expand Down Expand Up @@ -1187,6 +1183,14 @@
<source>Show all context menu items</source>
<target state="translated">Mostra tutti gli elementi nel menu contestuale</target>
</trans-unit>
<trans-unit id="ConfirmDeleteDialogDeleteOneItem.Text" translate="yes" xml:space="preserve">
<source>Are you sure you want to delete this item?</source>
<target state="new">Are you sure you want to delete this item?</target>
</trans-unit>
<trans-unit id="ConfirmDeleteDialogDeleteMultipleItems.Text" translate="yes" xml:space="preserve">
<source>Are you sure you want to delete these {0} items?</source>
<target state="new">Are you sure you want to delete these {0} items?</target>
</trans-unit>
</group>
</body>
</file>
Expand Down
12 changes: 8 additions & 4 deletions Files/MultilingualResources/Files.ja-JP.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,6 @@
<source>Delete</source>
<target state="translated">削除</target>
</trans-unit>
<trans-unit id="ConfirmDeleteDialogHeader.Text" translate="yes" xml:space="preserve">
<source>Are you sure you want to delete the selected item(s)?</source>
<target state="translated">選択したアイテムを削除してもよろしいですか?</target>
</trans-unit>
<trans-unit id="ConfirmDeleteDialogPermanentlyDeleteCheckBox.Content" translate="yes" xml:space="preserve">
<source>Permanently delete</source>
<target state="translated">完全に削除</target>
Expand Down Expand Up @@ -1189,6 +1185,14 @@
<source>Show all context menu items</source>
<target state="new">Show all context menu items</target>
</trans-unit>
<trans-unit id="ConfirmDeleteDialogDeleteOneItem.Text" translate="yes" xml:space="preserve">
<source>Are you sure you want to delete this item?</source>
<target state="new">Are you sure you want to delete this item?</target>
</trans-unit>
<trans-unit id="ConfirmDeleteDialogDeleteMultipleItems.Text" translate="yes" xml:space="preserve">
<source>Are you sure you want to delete these {0} items?</source>
<target state="new">Are you sure you want to delete these {0} items?</target>
</trans-unit>
</group>
</body>
</file>
Expand Down
12 changes: 8 additions & 4 deletions Files/MultilingualResources/Files.nl-NL.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -183,10 +183,6 @@
<source>Delete</source>
<target state="translated" state-qualifier="tm-suggestion">Verwijderen</target>
</trans-unit>
<trans-unit id="ConfirmDeleteDialogHeader.Text" translate="yes" xml:space="preserve">
<source>Are you sure you want to delete the selected item(s)?</source>
<target state="translated" state-qualifier="tm-suggestion">Weet u zeker dat u de geselecteerde items wilt verwijderen?</target>
</trans-unit>
<trans-unit id="ConfirmDeleteDialogPermanentlyDeleteCheckBox.Content" translate="yes" xml:space="preserve">
<source>Permanently delete</source>
<target state="translated">Permanent verwijderen</target>
Expand Down Expand Up @@ -1187,6 +1183,14 @@
<source>Show all context menu items</source>
<target state="new">Show all context menu items</target>
</trans-unit>
<trans-unit id="ConfirmDeleteDialogDeleteOneItem.Text" translate="yes" xml:space="preserve">
<source>Are you sure you want to delete this item?</source>
<target state="new">Are you sure you want to delete this item?</target>
</trans-unit>
<trans-unit id="ConfirmDeleteDialogDeleteMultipleItems.Text" translate="yes" xml:space="preserve">
<source>Are you sure you want to delete these {0} items?</source>
<target state="new">Are you sure you want to delete these {0} items?</target>
</trans-unit>
</group>
</body>
</file>
Expand Down
12 changes: 8 additions & 4 deletions Files/MultilingualResources/Files.or-IN.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,6 @@
<source>Delete</source>
<target state="translated">ବିଲୋପ କର</target>
</trans-unit>
<trans-unit id="ConfirmDeleteDialogHeader.Text" translate="yes" xml:space="preserve">
<source>Are you sure you want to delete the selected item(s)?</source>
<target state="translated">ଆପଣ ନିଶ୍ଚିତ କି ଆପଣ ମନୋନୀତ ଆଇଟମ୍(ଗୁଡିକ) ବିଲୋପ କରିବାକୁ ଚାହୁଁଛନ୍ତି କି?</target>
</trans-unit>
<trans-unit id="ConfirmDeleteDialogPermanentlyDeleteCheckBox.Content" translate="yes" xml:space="preserve">
<source>Permanently delete</source>
<target state="translated">ସ୍ଥାୟୀ ଭାବରେ ବିଲୋପ କର</target>
Expand Down Expand Up @@ -1187,6 +1183,14 @@
<source>Show all context menu items</source>
<target state="new">Show all context menu items</target>
</trans-unit>
<trans-unit id="ConfirmDeleteDialogDeleteOneItem.Text" translate="yes" xml:space="preserve">
<source>Are you sure you want to delete this item?</source>
<target state="new">Are you sure you want to delete this item?</target>
</trans-unit>
<trans-unit id="ConfirmDeleteDialogDeleteMultipleItems.Text" translate="yes" xml:space="preserve">
<source>Are you sure you want to delete these {0} items?</source>
<target state="new">Are you sure you want to delete these {0} items?</target>
</trans-unit>
</group>
</body>
</file>
Expand Down
12 changes: 8 additions & 4 deletions Files/MultilingualResources/Files.pl-PL.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -184,10 +184,6 @@
<source>Delete</source>
<target state="translated">Usuń</target>
</trans-unit>
<trans-unit id="ConfirmDeleteDialogHeader.Text" translate="yes" xml:space="preserve">
<source>Are you sure you want to delete the selected item(s)?</source>
<target state="translated">Czy na pewno chcesz usunąć wybrane elementy?</target>
</trans-unit>
<trans-unit id="ConfirmDeleteDialogPermanentlyDeleteCheckBox.Content" translate="yes" xml:space="preserve">
<source>Permanently delete</source>
<target state="translated">Usuń trwale</target>
Expand Down Expand Up @@ -1188,6 +1184,14 @@
<source>Show all context menu items</source>
<target state="new">Show all context menu items</target>
</trans-unit>
<trans-unit id="ConfirmDeleteDialogDeleteOneItem.Text" translate="yes" xml:space="preserve">
<source>Are you sure you want to delete this item?</source>
<target state="new">Are you sure you want to delete this item?</target>
</trans-unit>
<trans-unit id="ConfirmDeleteDialogDeleteMultipleItems.Text" translate="yes" xml:space="preserve">
<source>Are you sure you want to delete these {0} items?</source>
<target state="new">Are you sure you want to delete these {0} items?</target>
</trans-unit>
</group>
</body>
</file>
Expand Down
Loading