Skip to content

Commit 5e097d1

Browse files
ferrariofilippoyaira2
authored andcommitted
Strings update
1 parent ea8af57 commit 5e097d1

File tree

5 files changed

+17
-15
lines changed

5 files changed

+17
-15
lines changed

src/Files.App/Actions/Open/OpenInIDEAction.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public async Task ExecuteAsync(object? parameter = null)
3939
);
4040

4141
if (!res)
42-
await DynamicDialogFactory.ShowFor_IDEErrorDialog();
42+
await DynamicDialogFactory.ShowFor_IDEErrorDialog(_devToolsSettingsService.IDEPath);
4343
}
4444

4545
private void Context_PropertyChanged(object? sender, PropertyChangedEventArgs e)

src/Files.App/Actions/Open/OpenRepoInIDEAction.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public async Task ExecuteAsync(object? parameter = null)
3636
);
3737

3838
if (!res)
39-
await DynamicDialogFactory.ShowFor_IDEErrorDialog();
39+
await DynamicDialogFactory.ShowFor_IDEErrorDialog(_devToolsSettingsService.IDEPath);
4040
}
4141

4242
private void Context_PropertyChanged(object? sender, PropertyChangedEventArgs e)

src/Files.App/Helpers/Dialog/DynamicDialogFactory.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -405,21 +405,21 @@ public static DynamicDialog GetFor_CreateAlternateDataStreamDialog()
405405
return dialog;
406406
}
407407

408-
public static async Task ShowFor_IDEErrorDialog()
408+
public static async Task ShowFor_IDEErrorDialog(string path)
409409
{
410410
var commands = Ioc.Default.GetRequiredService<ICommandManager>();
411411
var dialog = new DynamicDialog(new DynamicDialogViewModel()
412412
{
413-
TitleText = Strings.IDEError.GetLocalizedResource(),
414-
SubtitleText = Strings.SelectedIDENotValid.GetLocalizedResource(),
415-
PrimaryButtonText = Strings.OK.GetLocalizedResource(),
416-
SecondaryButtonText = Strings.EditInSettings.GetLocalizedResource(),
413+
TitleText = string.Format(Strings.IDENotLocatedTitle.GetLocalizedResource(), path),
414+
SubtitleText = Strings.IDENotLocatedContent.GetLocalizedResource(),
415+
PrimaryButtonText = Strings.OpenSettings.GetLocalizedResource(),
416+
SecondaryButtonText = Strings.Close.GetLocalizedResource(),
417417
DynamicButtons = DynamicDialogButtons.Primary | DynamicDialogButtons.Secondary,
418418
});
419419

420420
await dialog.TryShowAsync();
421421

422-
if (dialog.DynamicResult is DynamicDialogResult.Secondary)
422+
if (dialog.DynamicResult is DynamicDialogResult.Primary)
423423
await commands.OpenSettings.ExecuteAsync(
424424
new SettingsNavigationParams() { PageKind = SettingsPageKind.DevToolsPage }
425425
);

src/Files.App/Strings/en-US/Resources.resw

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4055,19 +4055,19 @@
40554055
<data name="Test" xml:space="preserve">
40564056
<value>Test</value>
40574057
</data>
4058-
<data name="SelectedIDENotValid" xml:space="preserve">
4059-
<value>Selected IDE is not valid</value>
4058+
<data name="IDENotLocatedContent" xml:space="preserve">
4059+
<value>The configured IDE cannot be located. Please update the path and try again.</value>
40604060
</data>
4061-
<data name="IDEError" xml:space="preserve">
4062-
<value>IDE Error</value>
4061+
<data name="IDENotLocatedTitle" xml:space="preserve">
4062+
<value>{0} could not be located</value>
40634063
</data>
4064-
<data name="EditInSettings" xml:space="preserve">
4065-
<value>Edit in settings</value>
4064+
<data name="OpenSettings" xml:space="preserve">
4065+
<value>Open settings</value>
40664066
</data>
40674067
<data name="VisualStudioCode" xml:space="preserve">
40684068
<value>Visual Studio Code</value>
40694069
</data>
40704070
<data name="IDEPathPlaceholder" xml:space="preserve">
4071-
<value>code</value>
4071+
<value>Enter a path or launch alias</value>
40724072
</data>
40734073
</root>

src/Files.App/ViewModels/Settings/DevToolsViewModel.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ public string IDEPath
6666
!value.Contains('\"') &&
6767
!value.Contains('\'') &&
6868
CheckPathExists();
69+
70+
OnPropertyChanged(nameof(CanSaveIDEChanges));
6971
}
7072
}
7173
}

0 commit comments

Comments
 (0)