From 5c54975d6b10a1d1a2ad01cfeb2eb159082614a7 Mon Sep 17 00:00:00 2001 From: vrubelroman Date: Wed, 28 Oct 2026 19:54:37 +0300 Subject: [PATCH] =?UTF-8?q?Review:=20=C2=ABAnalyse=20again=C2=BB=20for=20a?= =?UTF-8?q?=20stale=20analysis;=20PGN=20evaluations=20never=20pass=20for?= =?UTF-8?q?=20the=20engine's?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The tester's findings: the stale analysis offered «Дополнить» (fill in) though it recomputes everything - it now says «Обновить» in 9 languages; and an engine run over evaluations read from the PGN no longer keeps them under the fixed search's name - it analyses the whole game. Co-Authored-By: Claude Opus 5.5 --- apps/desktop/src/i18n.rs | 11 +++++++++++ apps/desktop/src/review.rs | 4 +++- crates/game-review/src/lib.rs | 5 ++++- 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/apps/desktop/src/i18n.rs b/apps/desktop/src/i18n.rs index b6909c7..6ab26b1 100644 --- a/apps/desktop/src/i18n.rs +++ b/apps/desktop/src/i18n.rs @@ -7903,6 +7903,17 @@ const ROWS: &[[&str; 9]] = &[ "PGNdagi baholar ([%eval])", "PGN-дағы бағалар ([%eval])", ], + [ + "Analyse again", + "Обновить", + "Mettre à jour", + "Aktualisieren", + "Actualizar", + "Aggiorna", + "Atualizar", + "Yangilash", + "Жаңарту", + ], [ "Update", "Дополнить", diff --git a/apps/desktop/src/review.rs b/apps/desktop/src/review.rs index 31ae220..910f489 100644 --- a/apps/desktop/src/review.rs +++ b/apps/desktop/src/review.rs @@ -540,7 +540,9 @@ impl Review { ui.label(RichText::new(text).color(ui.visuals().warn_fg_color)); let can_update = self.analysis.meta.as_ref().is_some_and(|m| m.nodes > 0); if can_update { - let mut button = ui.button(tr("Update")); + // Stale: everything again («Обновить»); otherwise the gaps («Дополнить»). + let mut button = + ui.button(if stale { tr("Analyse again") } else { tr("Update") }); if stale { button = button.on_hover_text(tr( "Every position is analysed again, the same way on every computer", diff --git a/crates/game-review/src/lib.rs b/crates/game-review/src/lib.rs index bf9a982..db0090e 100644 --- a/crates/game-review/src/lib.rs +++ b/crates/game-review/src/lib.rs @@ -231,7 +231,10 @@ impl GameAnalysis { /// so does an analysis of another search ([`Self::stale`]), so that one report never /// mixes two. Returns the positions without an evaluation, for [`run`]. pub fn begin(&mut self, game: &Game, full: bool) -> Vec { - if full || self.stale() { + // Evaluations read from the PGN are no engine analysis to fill in: the engine + // analyses the whole game (else they would pass for the fixed search). + let from_pgn = self.meta.as_ref().is_some_and(|m| m.nodes == 0); + if full || from_pgn || self.stale() { self.evals.clear(); } let engine = self