Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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/Helpers/Dialog/DynamicDialogFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public static DynamicDialog GetFor_ShortcutNotFound(string targetPath)
return dialog;
}

public static DynamicDialog GetFor_RenameDialog()
public static DynamicDialog GetFor_RenameDialog(string itemType)
{
DynamicDialog? dialog = null;
TextBox inputText = new()
Expand Down Expand Up @@ -104,7 +104,7 @@ public static DynamicDialog GetFor_RenameDialog()

dialog = new DynamicDialog(new DynamicDialogViewModel()
{
TitleText = "EnterAnItemName".GetLocalizedResource(),
TitleText = string.Format("CreateNewItemTitle".GetLocalizedResource(), itemType.ToLower()),
SubtitleText = null,
DisplayControl = new Grid()
{
Expand All @@ -118,7 +118,7 @@ public static DynamicDialog GetFor_RenameDialog()
{
vm.HideDialog(); // Rename successful
},
PrimaryButtonText = "RenameDialog/PrimaryButtonText".GetLocalizedResource(),
PrimaryButtonText = "Create".GetLocalizedResource(),
CloseButtonText = "Cancel".GetLocalizedResource(),
DynamicButtonsEnabled = DynamicDialogButtons.Cancel,
DynamicButtons = DynamicDialogButtons.Primary | DynamicDialogButtons.Cancel
Expand Down
2 changes: 1 addition & 1 deletion src/Files.App/Helpers/UI/UIFilesystemHelpers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ public static async Task CreateFileFromDialogResultTypeAsync(AddItemDialogItemTy
string? userInput = null;
if (itemType != AddItemDialogItemType.File || itemInfo?.Command is null)
{
DynamicDialog dialog = DynamicDialogFactory.GetFor_RenameDialog();
DynamicDialog dialog = DynamicDialogFactory.GetFor_RenameDialog(itemType.ToString());
await dialog.TryShowAsync(); // Show rename dialog

if (dialog.DynamicResult != DynamicDialogResult.Primary)
Expand Down
4 changes: 2 additions & 2 deletions src/Files.App/Strings/en-US/Resources.resw
Original file line number Diff line number Diff line change
Expand Up @@ -291,8 +291,8 @@
<data name="EnterAnItemName" xml:space="preserve">
<value>Enter an item name</value>
</data>
<data name="RenameDialog.PrimaryButtonText" xml:space="preserve">
<value>Set name</value>
<data name="CreateNewItemTitle" xml:space="preserve">
<value>Create new {0}</value>
</data>
<data name="LightTheme" xml:space="preserve">
<value>Light</value>
Expand Down