supervertaler 1.9.165__py3-none-any.whl → 1.9.166__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- Supervertaler.py +12 -19
- modules/tm_metadata_manager.py +41 -0
- {supervertaler-1.9.165.dist-info → supervertaler-1.9.166.dist-info}/METADATA +6 -11
- {supervertaler-1.9.165.dist-info → supervertaler-1.9.166.dist-info}/RECORD +8 -8
- {supervertaler-1.9.165.dist-info → supervertaler-1.9.166.dist-info}/WHEEL +0 -0
- {supervertaler-1.9.165.dist-info → supervertaler-1.9.166.dist-info}/entry_points.txt +0 -0
- {supervertaler-1.9.165.dist-info → supervertaler-1.9.166.dist-info}/licenses/LICENSE +0 -0
- {supervertaler-1.9.165.dist-info → supervertaler-1.9.166.dist-info}/top_level.txt +0 -0
Supervertaler.py
CHANGED
|
@@ -34,7 +34,7 @@ License: MIT
|
|
|
34
34
|
"""
|
|
35
35
|
|
|
36
36
|
# Version Information.
|
|
37
|
-
__version__ = "1.9.
|
|
37
|
+
__version__ = "1.9.166"
|
|
38
38
|
__phase__ = "0.9"
|
|
39
39
|
__release_date__ = "2026-01-27"
|
|
40
40
|
__edition__ = "Qt"
|
|
@@ -22067,7 +22067,10 @@ class SupervertalerQt(QMainWindow):
|
|
|
22067
22067
|
|
|
22068
22068
|
def save_segment_to_activated_tms(self, source: str, target: str):
|
|
22069
22069
|
"""
|
|
22070
|
-
Save segment to all
|
|
22070
|
+
Save segment to all writable TMs for current project.
|
|
22071
|
+
|
|
22072
|
+
Note: Uses get_writable_tm_ids() which checks the Write checkbox (read_only=0),
|
|
22073
|
+
NOT get_active_tm_ids() which checks the Read checkbox (is_active=1).
|
|
22071
22074
|
|
|
22072
22075
|
Args:
|
|
22073
22076
|
source: Source text
|
|
@@ -22079,7 +22082,7 @@ class SupervertalerQt(QMainWindow):
|
|
|
22079
22082
|
if not hasattr(self.current_project, 'source_lang') or not hasattr(self.current_project, 'target_lang'):
|
|
22080
22083
|
return
|
|
22081
22084
|
|
|
22082
|
-
# Get
|
|
22085
|
+
# Get WRITABLE TM IDs for this project (Write checkbox enabled)
|
|
22083
22086
|
tm_ids = []
|
|
22084
22087
|
|
|
22085
22088
|
if hasattr(self, 'tm_metadata_mgr') and self.tm_metadata_mgr:
|
|
@@ -22087,7 +22090,8 @@ class SupervertalerQt(QMainWindow):
|
|
|
22087
22090
|
project_id = self.current_project.id if hasattr(self.current_project, 'id') else None
|
|
22088
22091
|
|
|
22089
22092
|
if project_id:
|
|
22090
|
-
|
|
22093
|
+
# Use get_writable_tm_ids() to find TMs with Write enabled
|
|
22094
|
+
tm_ids = self.tm_metadata_mgr.get_writable_tm_ids(project_id)
|
|
22091
22095
|
else:
|
|
22092
22096
|
self.log(f"⚠️ Cannot save to TM: project has no 'id' attribute!")
|
|
22093
22097
|
else:
|
|
@@ -22095,23 +22099,16 @@ class SupervertalerQt(QMainWindow):
|
|
|
22095
22099
|
else:
|
|
22096
22100
|
self.log(f"⚠️ Cannot save to TM: TM metadata manager not available!")
|
|
22097
22101
|
|
|
22098
|
-
# If no TMs
|
|
22102
|
+
# If no TMs have Write enabled, skip saving
|
|
22099
22103
|
if not tm_ids:
|
|
22100
|
-
self.log("⚠️ No TMs
|
|
22101
|
-
self.log(f" - To fix: Go to Resources > Translation Memories > TM List and
|
|
22104
|
+
self.log("⚠️ No TMs with Write enabled - segment not saved to TM.")
|
|
22105
|
+
self.log(f" - To fix: Go to Resources > Translation Memories > TM List and enable the Write checkbox")
|
|
22102
22106
|
return
|
|
22103
22107
|
|
|
22104
|
-
# Save to each
|
|
22108
|
+
# Save to each writable TM
|
|
22105
22109
|
saved_count = 0
|
|
22106
|
-
skipped_readonly = 0
|
|
22107
22110
|
for tm_id in tm_ids:
|
|
22108
22111
|
try:
|
|
22109
|
-
# Check if TM is read-only
|
|
22110
|
-
tm_info = self.tm_metadata_mgr.get_tm_by_tm_id(tm_id)
|
|
22111
|
-
if tm_info and tm_info.get('read_only'):
|
|
22112
|
-
skipped_readonly += 1
|
|
22113
|
-
continue
|
|
22114
|
-
|
|
22115
22112
|
self.db_manager.add_translation_unit(
|
|
22116
22113
|
source=source,
|
|
22117
22114
|
target=target,
|
|
@@ -22125,13 +22122,9 @@ class SupervertalerQt(QMainWindow):
|
|
|
22125
22122
|
|
|
22126
22123
|
if saved_count > 0:
|
|
22127
22124
|
msg = f"💾 Saved segment to {saved_count} TM(s)"
|
|
22128
|
-
if skipped_readonly > 0:
|
|
22129
|
-
msg += f" (skipped {skipped_readonly} read-only)"
|
|
22130
22125
|
self._queue_tm_save_log(msg)
|
|
22131
22126
|
# Invalidate cache so prefetched segments get fresh TM matches
|
|
22132
22127
|
self.invalidate_translation_cache()
|
|
22133
|
-
elif skipped_readonly > 0:
|
|
22134
|
-
self.log(f"ℹ️ Segment not saved - {skipped_readonly} activated TM(s) are read-only")
|
|
22135
22128
|
|
|
22136
22129
|
def invalidate_translation_cache(self, smart_invalidation=True):
|
|
22137
22130
|
"""
|
modules/tm_metadata_manager.py
CHANGED
|
@@ -396,6 +396,47 @@ class TMMetadataManager:
|
|
|
396
396
|
self.log(f"✗ Error fetching active tm_ids: {e}")
|
|
397
397
|
return []
|
|
398
398
|
|
|
399
|
+
def get_writable_tm_ids(self, project_id: Optional[int]) -> List[str]:
|
|
400
|
+
"""
|
|
401
|
+
Get list of writable tm_id strings for a project.
|
|
402
|
+
|
|
403
|
+
Returns TMs where:
|
|
404
|
+
- The TM has an activation record for this project AND
|
|
405
|
+
- read_only = 0 (Write checkbox is enabled)
|
|
406
|
+
|
|
407
|
+
This is used for SAVING segments to TM, separate from get_active_tm_ids()
|
|
408
|
+
which is used for READING/matching from TM.
|
|
409
|
+
|
|
410
|
+
Returns:
|
|
411
|
+
List of tm_id strings that are writable for the project
|
|
412
|
+
"""
|
|
413
|
+
if project_id is None:
|
|
414
|
+
# No project - return all writable TMs
|
|
415
|
+
try:
|
|
416
|
+
cursor = self.db_manager.cursor
|
|
417
|
+
cursor.execute("SELECT tm_id FROM translation_memories WHERE read_only = 0")
|
|
418
|
+
return [row[0] for row in cursor.fetchall()]
|
|
419
|
+
except Exception as e:
|
|
420
|
+
self.log(f"✗ Error fetching all writable tm_ids: {e}")
|
|
421
|
+
return []
|
|
422
|
+
|
|
423
|
+
try:
|
|
424
|
+
cursor = self.db_manager.cursor
|
|
425
|
+
|
|
426
|
+
# Return TMs where Write checkbox is enabled (read_only = 0)
|
|
427
|
+
# AND the TM has an activation record for this project
|
|
428
|
+
cursor.execute("""
|
|
429
|
+
SELECT tm.tm_id
|
|
430
|
+
FROM translation_memories tm
|
|
431
|
+
INNER JOIN tm_activation ta ON tm.id = ta.tm_id
|
|
432
|
+
WHERE ta.project_id = ? AND tm.read_only = 0
|
|
433
|
+
""", (project_id,))
|
|
434
|
+
|
|
435
|
+
return [row[0] for row in cursor.fetchall()]
|
|
436
|
+
except Exception as e:
|
|
437
|
+
self.log(f"✗ Error fetching writable tm_ids: {e}")
|
|
438
|
+
return []
|
|
439
|
+
|
|
399
440
|
# ========================================================================
|
|
400
441
|
# PROJECT TM MANAGEMENT (similar to termbases)
|
|
401
442
|
# ========================================================================
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: supervertaler
|
|
3
|
-
Version: 1.9.
|
|
3
|
+
Version: 1.9.166
|
|
4
4
|
Summary: Professional AI-enhanced translation workbench with multi-LLM support, glossary system, TM, spellcheck, voice commands, and PyQt6 interface. Batteries included (core).
|
|
5
5
|
Home-page: https://supervertaler.com
|
|
6
6
|
Author: Michael Beijer
|
|
@@ -71,7 +71,7 @@ Dynamic: home-page
|
|
|
71
71
|
Dynamic: license-file
|
|
72
72
|
Dynamic: requires-python
|
|
73
73
|
|
|
74
|
-
# 🚀 Supervertaler v1.9.
|
|
74
|
+
# 🚀 Supervertaler v1.9.166
|
|
75
75
|
|
|
76
76
|
[](https://pypi.org/project/Supervertaler/)
|
|
77
77
|
[](https://www.python.org/downloads/)
|
|
@@ -79,18 +79,13 @@ Dynamic: requires-python
|
|
|
79
79
|
|
|
80
80
|
AI-enhanced CAT tool with multi-LLM support (GPT-4, Claude, Gemini, Ollama), innovative Superlookup concordance system offering access to multiple terminology sources (TMs, glossaries, web resources, etc.), and seamless CAT tool integration (memoQ, Trados, CafeTran, Phrase).
|
|
81
81
|
|
|
82
|
-
**Current Version:** v1.9.
|
|
82
|
+
**Current Version:** v1.9.166 (January 27, 2026)
|
|
83
83
|
|
|
84
|
-
### NEW in v1.9.
|
|
84
|
+
### NEW in v1.9.166 - 🐛 TM Write Checkbox Fix
|
|
85
85
|
|
|
86
|
-
|
|
87
|
-
- **New Setting:** Settings → Experimental Performance → "Disable all caching systems"
|
|
88
|
-
- **What it does:** Bypasses termbase cache, TM/MT cache, and prefetch workers
|
|
89
|
-
- **Why:** Testing showed direct database lookups may be faster than cache overhead for some workflows
|
|
90
|
-
- **Proactive Highlighting:** Glossary terms now highlighted in upcoming segments while you're still editing the current one
|
|
91
|
-
- **Improved TM Matching:** Fixed fuzzy match issues with multi-TM projects
|
|
86
|
+
Fixed critical bug where confirmed translations went to "project" TM instead of user-designated TM with Write enabled. ([#126](https://github.com/michaelbeijer/Supervertaler/issues/126))
|
|
92
87
|
|
|
93
|
-
### Previously in v1.9.
|
|
88
|
+
### Previously in v1.9.162 - ⚡ Cache Kill Switch & Performance Testing
|
|
94
89
|
|
|
95
90
|
Streamlined the right panel by replacing Compare Panel with Match Panel:
|
|
96
91
|
- **Match Panel** combines Termview + TM Source/Target in one tab
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
Supervertaler.py,sha256=
|
|
1
|
+
Supervertaler.py,sha256=p_l79UMwMh9S3PDezaF6DJ4Hk0XkjEGtwQNuC7_JBtw,2269768
|
|
2
2
|
modules/__init__.py,sha256=G58XleS-EJ2sX4Kehm-3N2m618_W2Es0Kg8CW_eBG7g,327
|
|
3
3
|
modules/ai_actions.py,sha256=i5MJcM-7Y6CAvKUwxmxrVHeoZAVtAP7aRDdWM5KLkO0,33877
|
|
4
4
|
modules/ai_attachment_manager.py,sha256=juZlrW3UPkIkcnj0SREgOQkQROLf0fcu3ShZcKXMxsI,11361
|
|
@@ -63,7 +63,7 @@ modules/termview_widget.py,sha256=O3ah7g-4Lb_iUctxl9sMyxh8V3A5I5PFxmy9iIH2Kgk,53
|
|
|
63
63
|
modules/theme_manager.py,sha256=EOI_5pM2bXAadw08bbl92TLN-w28lbw4Zi1E8vQ-kM0,16694
|
|
64
64
|
modules/tm_editor_dialog.py,sha256=AzGwq4QW641uFJdF8DljLTRRp4FLoYX3Pe4rlTjQWNg,3517
|
|
65
65
|
modules/tm_manager_qt.py,sha256=h2bvXkRuboHf_RRz9-5FX35GVRlpXgRDWeXyj1QWtPs,54406
|
|
66
|
-
modules/tm_metadata_manager.py,sha256=
|
|
66
|
+
modules/tm_metadata_manager.py,sha256=_drzJ80q-mr1y9La8t0Cb8MXh91n3I-lEGDwSmoVI_4,23161
|
|
67
67
|
modules/tmx_editor.py,sha256=n0CtdZI8f1fPRWmCqz5Ysxbnp556Qj-6Y56a-YIz6pY,59239
|
|
68
68
|
modules/tmx_editor_qt.py,sha256=PxBIUw_06PHYTBHsd8hZzVJXW8T0A0ljfz1Wjjsa4yU,117022
|
|
69
69
|
modules/tmx_generator.py,sha256=pNkxwdMLvSRMMru0lkB1gvViIpg9BQy1EVhRbwoef3k,9426
|
|
@@ -77,9 +77,9 @@ modules/unified_prompt_manager_qt.py,sha256=fyF3_r0N8hnImT-CcWo1AuBOQ1Dn_ExeeUCk
|
|
|
77
77
|
modules/voice_commands.py,sha256=iBb-gjWxRMLhFH7-InSRjYJz1EIDBNA2Pog8V7TtJaY,38516
|
|
78
78
|
modules/voice_dictation.py,sha256=QmitXfkG-vRt5hIQATjphHdhXfqmwhzcQcbXB6aRzIg,16386
|
|
79
79
|
modules/voice_dictation_lite.py,sha256=jorY0BmWE-8VczbtGrWwt1zbnOctMoSlWOsQrcufBcc,9423
|
|
80
|
-
supervertaler-1.9.
|
|
81
|
-
supervertaler-1.9.
|
|
82
|
-
supervertaler-1.9.
|
|
83
|
-
supervertaler-1.9.
|
|
84
|
-
supervertaler-1.9.
|
|
85
|
-
supervertaler-1.9.
|
|
80
|
+
supervertaler-1.9.166.dist-info/licenses/LICENSE,sha256=m28u-4qL5nXIWnJ6xlQVw__H30rWFtRK3pCOais2OuY,1092
|
|
81
|
+
supervertaler-1.9.166.dist-info/METADATA,sha256=JYcWsy2FQHGEDjcC-YPE6OPRI508CdCqAnyycXK82tU,46266
|
|
82
|
+
supervertaler-1.9.166.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
|
|
83
|
+
supervertaler-1.9.166.dist-info/entry_points.txt,sha256=NP4hiCvx-_30YYKqgr-jfJYQvHr1qTYBMfoVmKIXSM8,53
|
|
84
|
+
supervertaler-1.9.166.dist-info/top_level.txt,sha256=9tUHBYUSfaE4S2E4W3eavJsDyYymkwLfeWAHHAPT6Dk,22
|
|
85
|
+
supervertaler-1.9.166.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|