From 5d6a73aff5b21e0ce78da02c16d2b65fbc98fdaf Mon Sep 17 00:00:00 2001 From: vrubelroman Date: Mon, 19 Oct 2026 23:54:48 +0300 Subject: [PATCH] =?UTF-8?q?=D0=A1=D0=BF=D1=80=D0=B0=D0=B2=D0=BE=D1=87?= =?UTF-8?q?=D0=BD=D0=B8=D0=BA:=20"Without=20moves"=20in=20the=20start=20po?= =?UTF-8?q?sition,=20no=20"comparing"=20text?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 5.5 --- apps/desktop/src/i18n.rs | 16 ++++++++++++++++ apps/desktop/src/reference.rs | 13 ++++++++++--- docs/design/reference.md | 4 ++-- 3 files changed, 28 insertions(+), 5 deletions(-) diff --git a/apps/desktop/src/i18n.rs b/apps/desktop/src/i18n.rs index e8c146e..8e2966f 100644 --- a/apps/desktop/src/i18n.rs +++ b/apps/desktop/src/i18n.rs @@ -2063,6 +2063,22 @@ const ROWS: &[[&str; 6]] = &[ "Partidas que terminaron en esta posición (abandono, tablas, mate, tiempo)", "Partite finite in questa posizione (abbandono, patta, matto, tempo)", ], + [ + "Without moves", + "Без ходов", + "Sans coups", + "Ohne Züge", + "Sin jugadas", + "Senza mosse", + ], + [ + "Games of the database with only the players and the result, no moves", + "Партии базы, у которых записаны только игроки и результат, без ходов", + "Parties de la base avec seulement les joueurs et le résultat, sans coups", + "Partien der Datenbank nur mit Spielern und Ergebnis, ohne Züge", + "Partidas de la base solo con los jugadores y el resultado, sin jugadas", + "Partite della base con solo giocatori e risultato, senza mosse", + ], [ "Checking engine…", "Проверка движка…", diff --git a/apps/desktop/src/reference.rs b/apps/desktop/src/reference.rs index f347202..9cb7280 100644 --- a/apps/desktop/src/reference.rs +++ b/apps/desktop/src/reference.rs @@ -975,7 +975,6 @@ impl Reference { // while it is worked out, so nothing jumps). let line = main_line(game); let book = self.book_for(&path, &line).cloned(); - let failed_book = self.book_failed.as_ref() == Some(&(path.clone(), line.clone())); // The novelty: the first move of the game no other game of the database played // (the line keeps its height while it is worked out, so nothing jumps). let novelty = book.as_ref().and_then(|b| match b.last { @@ -998,9 +997,10 @@ impl Reference { } } (Some(_), None) => {} - (None, _) if failed_book => {} + // Still being worked out: an empty line of the same height, so the tables + // do not jump when the novelty appears. (None, _) => { - ui.label(RichText::new(tr("Comparing the game with the database…")).weak()); + ui.label(" "); } }); // The game itself is in the database (maybe annotated there): open it. @@ -1110,6 +1110,7 @@ impl Reference { let books = found.books; let total: u32 = out.moves.iter().map(|m| m.tally.games).sum::() + out.ended.games; let mut action = None; + let start = chess_import::position::same_position(pos, &Chess::default()); let rows = out.moves.len() + usize::from(out.ended.games > 0); if rows == 0 { // The games go on with a null move (a teaching "--"), which is not a move. @@ -1207,6 +1208,8 @@ impl Reference { .to_move(pos) .map(|m| move_label(pos, m)) .unwrap_or_else(|_| s.san.clone()), + // In the start position "ended" are games recorded without moves. + None if start => tr("Without moves").to_owned(), None => tr("Game over").to_owned(), }; row.col(|ui| { @@ -1220,6 +1223,10 @@ impl Reference { let r = ui.add(egui::Label::new(text).selectable(false)); if in_game { r.on_hover_text(tr("The move played in this game")); + } else if stat.is_none() && start { + r.on_hover_text(tr( + "Games of the database with only the players and the result, no moves", + )); } else if stat.is_none() { r.on_hover_text(tr( "Games that ended in this position (resignation, draw, mate, time)", diff --git a/docs/design/reference.md b/docs/design/reference.md index 589a706..eb8c5e0 100644 --- a/docs/design/reference.md +++ b/docs/design/reference.md @@ -19,7 +19,7 @@ Под выбором базы: - строка позиции: «Ход белых · после 4…Nc6 · в партии 5.Nb5»; -- теория (строка держит высоту, пока считается: «Сверяю партию с базой…»); +- новинка (пока считается, строка пустая, но держит высоту); - «Эта партия есть в базе — открыть», если в базе нашлась копия: партия с теми же игроками (фамилии) и годом, доходящая до финальной позиции этой. Тренеру ценно открыть, например, комментированную версию. У пустой партии копий и теории нет. Копии партии и сама партия (если она из этой базы) не входят в «теорию» и в таблицу партий; в счётчиках ходов остаются, как в ChessBase. @@ -33,7 +33,7 @@ | 5.Nc3 | 70 608 | 74 % | ▕██▒▒░░▏ | 55 % | 2236 | 2025 | Carlsen, Caruana | - **Ход** — SAN с номером; **Партий** и **%** — сколько партий сыграли ход; **Результат** — полоса белые/ничьи/чёрные (как на доске поиска), **Белые** — очки белых в процентах; **Ср. Эло** — средний рейтинг партий, где известны оба; **Год** — последний; **Лучшие игроки** — две фамилии сильнейших (по рейтингу в партии) игроков, сыгравших этот ход. -- Последняя строка — «Конец партии»: столько партий закончилось в этой позиции (сдача, ничья, мат, время). +- Последняя строка — «Конец партии»: столько партий закончилось в этой позиции (сдача, ничья, мат, время). В начальной позиции это партии, записанные без ходов (только игроки и результат), строка называется «Без ходов». - Ход, сыгранный в партии, отмечен «⏵» и полужирным. - Для книги (большинство партий без результата) — «Главы» вместо «Партий», без колонок результата, очков и Эло. - **Один клик** выделяет ход: синяя стрелка на доске, таблица партий ниже показывает только партии с этим ходом. Повторный клик снимает выделение. **Двойной клик** играет ход в партии: переход, если такой ход в партии есть, иначе новый вариант (Ctrl+Z отменяет).