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:
4 files changed
+31
-3
No files matched your search
@@ -1,3 +1,4 @@
|
||||
using System.Globalization;
|
||||
using Titano.App.Editor;
|
||||
using Titano.Core.Advice;
|
||||
using Titano.Core.Imaging;
|
||||
@@ -36,6 +37,24 @@ public sealed class EditorTextTests
|
||||
Assert.Equal("3 frames", EditorText.Value(AdvisorParameters.Excluded, new[] { 1, 2, 3 }));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void AnOptimiseLinePointsFromTheOldValueToTheNewOneInEitherReadingDirection()
|
||||
{
|
||||
var change = new SettingChange(AdvisorParameters.DeflickerWindow, 21, 41, "reason", []);
|
||||
Assert.Equal("Deflicker window: 21 frames → 41 frames", EditorText.Change(change));
|
||||
try
|
||||
{
|
||||
Loc.SetCulture(CultureInfo.GetCultureInfo("ar"));
|
||||
Assert.Equal(Loc.L("Editor.Optimise.ChangeRtl", Loc.L("Editor.Exposure.Window"), Loc.Plural("Editor.Value.Frames", 21), Loc.Plural("Editor.Value.Frames", 41)),
|
||||
EditorText.Change(change), "Arabic reads the old value first, from the right");
|
||||
Assert.Contains("←", EditorText.Change(change));
|
||||
}
|
||||
finally
|
||||
{
|
||||
Loc.SetCulture(CultureInfo.GetCultureInfo("en"));
|
||||
}
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void CropMarginsKeepAtLeastATenthOfTheFrame()
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user