Skip to content

Commit 5db91a3

Browse files
michaelbeijerclaude
andcommitted
fix: TM matches not shown when revisiting segments (#164) (v1.9.273)
The Match Panel (TM Source/Target boxes) only displayed TM hits on the first visit to a segment. On revisit, cached TM results were shown in the Translation Results panel but set_compare_panel_matches() was never called to update the Match Panel. Added the missing call in the cache-hit path. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 26778e3 commit 5db91a3

File tree

5 files changed

+34
-5
lines changed

5 files changed

+34
-5
lines changed

CHANGELOG.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,17 @@
22

33
All notable changes to Supervertaler are documented in this file.
44

5-
**Current Version:** v1.9.272 (February 17, 2026)
5+
**Current Version:** v1.9.273 (February 17, 2026)
66

77

8+
## v1.9.273 - February 17, 2026
9+
10+
### Bug Fixes
11+
12+
- **TM matches now shown consistently when revisiting segments** — When navigating back to a previously visited segment, the Match Panel (TM Source/Target comparison boxes) showed no TM hits despite the matches being cached. Root cause: on first visit, TM results were fetched on-demand (prefetch skips TM for thread-safety) and cached; on revisit, the cache-hit path updated the Translation Results panel but never called `set_compare_panel_matches()` to update the Match Panel. The cache-hit path now converts cached `TranslationMatch` objects to the Match Panel format and displays them immediately. Resolves [#164](https://github.com/michaelbeijer/Supervertaler/issues/164).
13+
14+
---
15+
816
## v1.9.272 - February 17, 2026
917

1018
### Bug Fixes

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
**Professional AI-enhanced translation workbench** with multi-LLM support (GPT-4, Claude, Gemini, Ollama), translation memory, glossary management, and seamless CAT tool integration (memoQ, Trados, CafeTran, Phrase, Déjà Vu).
88

9-
**Latest release:** v1.9.272 - Fix Trados return package export with missing target elements, XML entity escaping.
9+
**Latest release:** v1.9.273 - Fix TM matches not showing when revisiting segments.
1010

1111
---
1212

Supervertaler.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34995,6 +34995,27 @@ def _on_cell_selected_full(self, current_row, current_col, previous_row, previou
3499534995
# v1.9.261: Skip if segment already has batch TM match data from pre-translation
3499634996
tm_count = len(cached_matches.get("TM", []))
3499734997
has_batch_match = getattr(segment, '_batch_tm_match', None)
34998+
34999+
# v1.9.273: Update Match Panel from cached TM matches (fixes #164)
35000+
# On revisit, tm_count > 0 so _schedule_mt_and_llm_matches is skipped,
35001+
# but the Match Panel still needs to be updated with cached TM results.
35002+
if tm_count > 0:
35003+
tm_matches_for_panel = []
35004+
for tm in cached_matches.get("TM", []):
35005+
tm_name = tm.metadata.get('tm_name', 'TM') if tm.metadata else 'TM'
35006+
tm_matches_for_panel.append({
35007+
'source': tm.compare_source or tm.source,
35008+
'target': tm.target,
35009+
'tm_name': tm_name,
35010+
'match_pct': int(tm.relevance)
35011+
})
35012+
self.set_compare_panel_matches(
35013+
segment_id,
35014+
segment.source,
35015+
tm_matches=tm_matches_for_panel,
35016+
mt_matches=getattr(self, '_compare_panel_mt_matches', [])
35017+
)
35018+
3499835019
if tm_count == 0 and self.enable_tm_matching and not has_batch_match:
3499935020
find_replace_active = getattr(self, 'find_replace_active', False)
3500035021
if not find_replace_active:

docs/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ <h1 class="hero-title">
7070
Supervertaler
7171
<span class="gradient-text">The Ultimate Translation Workbench</span>
7272
</h1>
73-
<p class="version-badge">v1.9.272</p>
73+
<p class="version-badge">v1.9.273</p>
7474
<p class="hero-subtitle">
7575
AI-enhanced translation workbench. Work with ChatGPT, Claude, and Gemini simultaneously.
7676
Built by translators, for translators and writers.
@@ -707,7 +707,7 @@ <h2 class="section-title">Get Supervertaler</h2>
707707
<div style="text-align: center; margin: 40px 0;">
708708
<div class="download-card featured"
709709
style="border: 3px solid #6366F1; max-width: 700px; margin: 0 auto;">
710-
<div class="download-badge" style="background: #6366F1;">v1.9.272</div>
710+
<div class="download-badge" style="background: #6366F1;">v1.9.273</div>
711711
<h3>🎨 Supervertaler</h3>
712712
<p class="download-description" style="font-weight: 600; color: #6366F1; margin-bottom: 10px;">
713713
Modern Professional Interface

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "supervertaler"
7-
version = "1.9.272"
7+
version = "1.9.273"
88
description = "Professional AI-enhanced translation workbench with multi-LLM support, glossary system, TM, spellcheck, voice commands, and PyQt6 interface. Batteries included (core)."
99
readme = "README.md"
1010
requires-python = ">=3.10"

0 commit comments

Comments
 (0)