fix(editor): optimise lines point the reading way; failed saves and jobs are errors

EditorText.Change picks Editor.Optimise.ChangeRtl ('{0}: {1} ← {2}',
invariant) in right-to-left languages, as Import.Session.TimeRtl and
Jobs.Target.RenderRtl do. A failed save and a failed server job raise error
toasts; a cancelled job stays a notice.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC
This commit is contained in:
Claude committed 2026-10-06 20:56:08 +00:00
1 parent a09ef98eac
commit e4a0314fa7
4 files changed
+31 -3

No files matched your search

+3 -3
View File
@@ -819,6 +819,7 @@ public sealed class EditorViewModel : LocalizedViewModel, IAsyncDisposable
{
Title = Loc.L("Editor.Save.Failed"),
Message = ex.Message,
IsError = true,
ActionText = Loc.L("Editor.Save.Retry"),
ActionToolTip = Loc.L("Tooltips.Editor.Save.Retry"),
ActionCommand = new RelayCommand(() => _ = Session.FlushAsync()),
@@ -893,9 +894,7 @@ public sealed class EditorViewModel : LocalizedViewModel, IAsyncDisposable
Shell.Notify(Loc.L("Editor.Optimise.Nothing"));
return;
}
var lines = changes.Select(c => Loc.L("Editor.Optimise.Change", EditorText.ParameterLabel(c.Parameter), EditorText.Value(c.Parameter, c.Before),
EditorText.Value(c.Parameter, c.After)));
Shell.Notify(Loc.Plural("Editor.Optimise.Done", changes.Count), string.Join(Environment.NewLine, lines));
Shell.Notify(Loc.Plural("Editor.Optimise.Done", changes.Count), string.Join(Environment.NewLine, changes.Select(EditorText.Change)));
}
private async Task AnalyseAsync()
@@ -957,6 +956,7 @@ public sealed class EditorViewModel : LocalizedViewModel, IAsyncDisposable
{
Title = Loc.L("Editor.ServerJob.Ended", JobText.Kind(job.Kind), Loc.L("Jobs.State." + job.State), server),
Message = job.Error ?? job.TargetLabel ?? Title,
IsError = job.State == JobState.Failed,
ActionText = Loc.L("Jobs.Action.Retry"),
ActionToolTip = Loc.L("Tooltips.Editor.ServerJob.Retry", server),
ActionCommand = new AsyncRelayCommand(() => Session.Source.RetryJobAsync(job.Id, CancellationToken.None), () => !_disposed),