From 5610f386ff27e61639a48aced6f5d953d439a444 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 2 Oct 2026 17:14:30 +0000 Subject: [PATCH] fix(i18n): analysis job log lines live in the Jobs area The Advisor catalog holds only advisor reasons and findings (its test counts them); job log lines join Jobs.Analysis.* as long texts. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC --- i18n/en/Advisor.resx | 6 ------ i18n/en/Jobs.resx | 6 ++++++ i18n/it/Advisor.it.resx | 6 ------ i18n/it/Jobs.it.resx | 6 ++++++ src/Titano.Data/Processing/Jobs/AnalyseJobHandler.cs | 10 +++++----- tests/Titano.Data.Tests/Processing/AnalysisJobTests.cs | 6 +++--- 6 files changed, 20 insertions(+), 20 deletions(-) diff --git a/i18n/en/Advisor.resx b/i18n/en/Advisor.resx index 7c3ab191..fad2d883 100644 --- a/i18n/en/Advisor.resx +++ b/i18n/en/Advisor.resx @@ -31,12 +31,6 @@ {0} frames could not be decoded.{0} frame count Colour balance jumps by {0:0.#}% between frames.{0} RMS colour-ratio jitter in percent {0} frames are blown out to white.{0} frame count - Automatic values of {0} updated.job log line; {0} sequence title - Deep analysis of {0}: {1} frames, {2} warnings.job log line; {0} sequence title; {1} frame count; {2} warning count - {0} could not be analysed: {1}long: job log line; {0} sequence title; {1} reason - Light analysis of {0}: {1} frames, {2} warnings.job log line; {0} sequence title; {1} frame count; {2} warning count - Suggested presets: {0}job log line; {0} preset names separated by dots - The project settings of {0} cannot be read; their automatic values were left as they were.job log line; {0} sequence title Needs the deep analysis of the pixels, which has not run yet; nothing was changed.no placeholders Shutter time or aperture is missing from the metadata, so this cannot be decided; nothing was changed.no placeholders Too few frame pairs to measure motion; nothing was changed.no placeholders diff --git a/i18n/en/Jobs.resx b/i18n/en/Jobs.resx index a165f36d..a4d2365a 100644 --- a/i18n/en/Jobs.resx +++ b/i18n/en/Jobs.resx @@ -13,6 +13,12 @@ Resume Retry Show + Automatic values of {0} updated.long: job log line; {0} sequence title + Deep analysis of {0}: {1} frames, {2} warnings.long: job log line; {0} sequence title; {1} frame count; {2} warning count + {0} could not be analysed: {1}long: job log line; {0} sequence title; {1} reason + Light analysis of {0}: {1} frames, {2} warnings.long: job log line; {0} sequence title; {1} frame count; {2} warning count + Suggested presets: {0}long: job log line; {0} preset names separated by dots + The project settings of {0} cannot be read; their automatic values were left as they were.long: job log line; {0} sequence title {0} left Clear done Kind diff --git a/i18n/it/Advisor.it.resx b/i18n/it/Advisor.it.resx index c50b0774..88685171 100644 --- a/i18n/it/Advisor.it.resx +++ b/i18n/it/Advisor.it.resx @@ -31,12 +31,6 @@ {0} fotogrammi non sono decodificabili. Il bilanciamento del colore varia del {0:0.#}% tra un fotogramma e l'altro. {0} fotogrammi sono completamente bruciati. - Valori automatici di {0} aggiornati. - Analisi approfondita di {0}: {1} fotogrammi, {2} avvisi. - Impossibile analizzare {0}: {1} - Analisi rapida di {0}: {1} fotogrammi, {2} avvisi. - Preset suggeriti: {0} - Le impostazioni del progetto di {0} non sono leggibili; i valori automatici sono rimasti invariati. Serve l'analisi approfondita dei pixel, non ancora eseguita; nulla è stato cambiato. Tempo di scatto o diaframma mancano nei metadati, quindi non si può decidere; nulla è stato cambiato. Troppo poche coppie di fotogrammi per misurare il movimento; nulla è stato cambiato. diff --git a/i18n/it/Jobs.it.resx b/i18n/it/Jobs.it.resx index 29507c5b..77d95679 100644 --- a/i18n/it/Jobs.it.resx +++ b/i18n/it/Jobs.it.resx @@ -13,6 +13,12 @@ Riprendi Riprova Mostra + Valori automatici di {0} aggiornati. + Analisi approfondita di {0}: {1} fotogrammi, {2} avvisi. + Impossibile analizzare {0}: {1} + Analisi rapida di {0}: {1} fotogrammi, {2} avvisi. + Preset suggeriti: {0} + Le impostazioni del progetto di {0} non sono leggibili; i valori automatici sono rimasti invariati. {0} rimanenti Rimuovi concluse Tipo diff --git a/src/Titano.Data/Processing/Jobs/AnalyseJobHandler.cs b/src/Titano.Data/Processing/Jobs/AnalyseJobHandler.cs index 82a7c770..1476d374 100644 --- a/src/Titano.Data/Processing/Jobs/AnalyseJobHandler.cs +++ b/src/Titano.Data/Processing/Jobs/AnalyseJobHandler.cs @@ -49,7 +49,7 @@ internal sealed class AnalyseJobHandler(TitanoDatabase db, SequenceAnalyser anal { await chain.FlushAsync().ConfigureAwait(false); Core.Diagnostics.Log.Warning("processing", $"Analysis of sequence {targets[i]} failed", ex); - context.Log(Loc.L("Advisor.Log.Failed", await TitleAsync(targets[i], context.Cancellation).ConfigureAwait(false), ex.Message)); + context.Log(Loc.L("Jobs.Analysis.Failed", await TitleAsync(targets[i], context.Cancellation).ConfigureAwait(false), ex.Message)); failed.Add(i); } done += units[i]; @@ -66,10 +66,10 @@ internal sealed class AnalyseJobHandler(TitanoDatabase db, SequenceAnalyser anal private static void Report(JobContext context, AnalysisOutcome outcome, bool deep) { var title = outcome.Sequence.DisplayTitle; - context.Log(Loc.L(deep ? "Advisor.Log.DeepDone" : "Advisor.Log.LightDone", title, outcome.Frames, outcome.Warnings)); - if (outcome.SettingsChanged) context.Log(Loc.L("Advisor.Log.AutoUpdated", title)); - if (outcome.SettingsUnreadable) context.Log(Loc.L("Advisor.Log.ProjectUnreadable", title)); - if (outcome.Presets.Count > 0) context.Log(Loc.L("Advisor.Log.Presets", string.Join(" · ", outcome.Presets.Select(p => p.DisplayName())))); + context.Log(Loc.L(deep ? "Jobs.Analysis.DeepDone" : "Jobs.Analysis.LightDone", title, outcome.Frames, outcome.Warnings)); + if (outcome.SettingsChanged) context.Log(Loc.L("Jobs.Analysis.AutoUpdated", title)); + if (outcome.SettingsUnreadable) context.Log(Loc.L("Jobs.Analysis.ProjectUnreadable", title)); + if (outcome.Presets.Count > 0) context.Log(Loc.L("Jobs.Analysis.Presets", string.Join(" · ", outcome.Presets.Select(p => p.DisplayName())))); } /// Next target and the failed targets to retry first; a missing or unreadable checkpoint starts over. diff --git a/tests/Titano.Data.Tests/Processing/AnalysisJobTests.cs b/tests/Titano.Data.Tests/Processing/AnalysisJobTests.cs index 1f03927c..9e15fe7f 100644 --- a/tests/Titano.Data.Tests/Processing/AnalysisJobTests.cs +++ b/tests/Titano.Data.Tests/Processing/AnalysisJobTests.cs @@ -47,7 +47,7 @@ public sealed class AnalysisJobTests(TestContext context) Assert.True(row.Status.HasFlag(SequenceStatus.AnalyzedLight), "index status"); Assert.False(row.Status.HasFlag(SequenceStatus.AnalyzedDeep), "no deep status without a report"); Assert.True(ManifestStore.ReadSequence(folder.ManifestPath).Status.HasFlag(SequenceStatus.AnalyzedLight), "sidecar status"); - Assert.Contains(Loc.L("Advisor.Log.AutoUpdated", sequence.DisplayTitle), done.LogTail); + Assert.Contains(Loc.L("Jobs.Analysis.AutoUpdated", sequence.DisplayTitle), done.LogTail); // Idempotent: a second pass changes nothing. var version = row.SettingsVersion; @@ -103,7 +103,7 @@ public sealed class AnalysisJobTests(TestContext context) Assert.NotNull((await fx.Db.Frames.ListBySequenceAsync(sequence.Id, cancellationToken: fx.Ct))[5].MeanLogLuminance); var project = ProjectSettings.FromJson(await File.ReadAllTextAsync(folder.ProjectPath, fx.Ct)); Assert.True(project.Exposure.Deflicker.HasAdvice, "deflicker advised from the pixels"); - Assert.Contains(Loc.L("Advisor.Log.Presets", string.Empty), done.LogTail); + Assert.Contains(Loc.L("Jobs.Analysis.Presets", string.Empty), done.LogTail); } [Test] @@ -131,7 +131,7 @@ public sealed class AnalysisJobTests(TestContext context) Assert.SequenceEqual([true, true, true], await AnalysedAsync(fx, a, b, c)); Assert.Equal((3L, 3L), (done.ProgressDone, done.ProgressTotal)); // The retry analysed B alone. - var lightOfA = Loc.L("Advisor.Log.LightDone", a.DisplayTitle, 10, 0).Split(',')[0]; + var lightOfA = Loc.L("Jobs.Analysis.LightDone", a.DisplayTitle, 10, 0).Split(',')[0]; Assert.Equal(1, done.LogTail!.Split('\n').Count(line => line.Contains(lightOfA, StringComparison.Ordinal))); }