supervertaler 1.9.183__py3-none-any.whl → 1.9.184__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.
Potentially problematic release.
This version of supervertaler might be problematic. Click here for more details.
- Supervertaler.py +118 -54
- modules/termview_widget.py +46 -18
- modules/unified_prompt_manager_qt.py +12 -0
- {supervertaler-1.9.183.dist-info → supervertaler-1.9.184.dist-info}/METADATA +1 -1
- {supervertaler-1.9.183.dist-info → supervertaler-1.9.184.dist-info}/RECORD +9 -9
- {supervertaler-1.9.183.dist-info → supervertaler-1.9.184.dist-info}/WHEEL +0 -0
- {supervertaler-1.9.183.dist-info → supervertaler-1.9.184.dist-info}/entry_points.txt +0 -0
- {supervertaler-1.9.183.dist-info → supervertaler-1.9.184.dist-info}/licenses/LICENSE +0 -0
- {supervertaler-1.9.183.dist-info → supervertaler-1.9.184.dist-info}/top_level.txt +0 -0
Supervertaler.py
CHANGED
|
@@ -32,9 +32,9 @@ License: MIT
|
|
|
32
32
|
"""
|
|
33
33
|
|
|
34
34
|
# Version Information.
|
|
35
|
-
__version__ = "1.9.
|
|
35
|
+
__version__ = "1.9.184"
|
|
36
36
|
__phase__ = "0.9"
|
|
37
|
-
__release_date__ = "2026-01
|
|
37
|
+
__release_date__ = "2026-02-01"
|
|
38
38
|
__edition__ = "Qt"
|
|
39
39
|
|
|
40
40
|
import sys
|
|
@@ -1401,10 +1401,15 @@ class ReadOnlyGridTextEditor(QTextEdit):
|
|
|
1401
1401
|
self.setMouseTracking(True)
|
|
1402
1402
|
|
|
1403
1403
|
# Add syntax highlighter for tags (no spellcheck for source cells)
|
|
1404
|
-
# Get invisible char color from main window
|
|
1404
|
+
# Get invisible char color and tag color from main window (theme-aware)
|
|
1405
1405
|
main_window = self._get_main_window()
|
|
1406
1406
|
invisible_char_color = main_window.invisible_char_color if main_window and hasattr(main_window, 'invisible_char_color') else '#999999'
|
|
1407
|
-
|
|
1407
|
+
|
|
1408
|
+
# Use theme-aware tag color (light pink in dark mode, dark red in light mode)
|
|
1409
|
+
is_dark = main_window and hasattr(main_window, 'theme_manager') and main_window.theme_manager and main_window.theme_manager.current_theme.name == "Dark"
|
|
1410
|
+
tag_color = '#FFB6C1' if is_dark else self.tag_highlight_color # Light pink in dark mode
|
|
1411
|
+
|
|
1412
|
+
self.highlighter = TagHighlighter(self.document(), tag_color, invisible_char_color, enable_spellcheck=False)
|
|
1408
1413
|
|
|
1409
1414
|
# Store raw text (with tags) for mode switching
|
|
1410
1415
|
self._raw_text = text
|
|
@@ -2726,10 +2731,15 @@ class EditableGridTextEditor(QTextEdit):
|
|
|
2726
2731
|
self.setPalette(palette)
|
|
2727
2732
|
|
|
2728
2733
|
# Add syntax highlighter for tags (with spellcheck enabled for target cells)
|
|
2729
|
-
# Get invisible char color from main window
|
|
2734
|
+
# Get invisible char color and tag color from main window (theme-aware)
|
|
2730
2735
|
main_window = self._get_main_window()
|
|
2731
2736
|
invisible_char_color = main_window.invisible_char_color if main_window and hasattr(main_window, 'invisible_char_color') else '#999999'
|
|
2732
|
-
|
|
2737
|
+
|
|
2738
|
+
# Use theme-aware tag color (light pink in dark mode, dark red in light mode)
|
|
2739
|
+
is_dark = main_window and hasattr(main_window, 'theme_manager') and main_window.theme_manager and main_window.theme_manager.current_theme.name == "Dark"
|
|
2740
|
+
tag_color = '#FFB6C1' if is_dark else self.tag_highlight_color # Light pink in dark mode
|
|
2741
|
+
|
|
2742
|
+
self.highlighter = TagHighlighter(self.document(), tag_color, invisible_char_color, enable_spellcheck=True)
|
|
2733
2743
|
|
|
2734
2744
|
# Style to look like a normal cell with subtle selection
|
|
2735
2745
|
# Background and text colors now managed by theme system
|
|
@@ -6360,7 +6370,13 @@ class SupervertalerQt(QMainWindow):
|
|
|
6360
6370
|
self.termview_widget.theme_manager = self.theme_manager
|
|
6361
6371
|
if hasattr(self.termview_widget, 'apply_theme'):
|
|
6362
6372
|
self.termview_widget.apply_theme()
|
|
6363
|
-
|
|
6373
|
+
|
|
6374
|
+
# Also update the Match Panel TermView (right panel)
|
|
6375
|
+
if hasattr(self, 'termview_widget_match') and self.termview_widget_match:
|
|
6376
|
+
self.termview_widget_match.theme_manager = self.theme_manager
|
|
6377
|
+
if hasattr(self.termview_widget_match, 'apply_theme'):
|
|
6378
|
+
self.termview_widget_match.apply_theme()
|
|
6379
|
+
|
|
6364
6380
|
if hasattr(self, 'translation_results_panel') and self.translation_results_panel:
|
|
6365
6381
|
self.translation_results_panel.theme_manager = self.theme_manager
|
|
6366
6382
|
# Also update class-level theme_manager for CompactMatchItem
|
|
@@ -29100,6 +29116,9 @@ class SupervertalerQt(QMainWindow):
|
|
|
29100
29116
|
segment_num_color = "black" if theme.name in ["Light (Default)", "Soft Gray", "Warm Cream", "Sepia", "High Contrast"] else theme.text
|
|
29101
29117
|
id_item.setForeground(QColor(segment_num_color))
|
|
29102
29118
|
id_item.setBackground(QColor()) # Default background from theme
|
|
29119
|
+
# Smaller font for segment numbers
|
|
29120
|
+
seg_num_font = QFont(self.default_font_family, max(8, self.default_font_size - 2))
|
|
29121
|
+
id_item.setFont(seg_num_font)
|
|
29103
29122
|
self.table.setItem(row, 0, id_item)
|
|
29104
29123
|
|
|
29105
29124
|
# Type - show segment type based on style and content
|
|
@@ -29182,13 +29201,17 @@ class SupervertalerQt(QMainWindow):
|
|
|
29182
29201
|
type_item = QTableWidgetItem(type_display)
|
|
29183
29202
|
type_item.setFlags(type_item.flags() & ~Qt.ItemFlag.ItemIsEditable) # Read-only
|
|
29184
29203
|
type_item.setTextAlignment(Qt.AlignmentFlag.AlignCenter)
|
|
29185
|
-
|
|
29204
|
+
|
|
29186
29205
|
# Color-code by type for better visibility
|
|
29187
29206
|
if type_display in ("H1", "H2", "H3", "H4", "Title"):
|
|
29188
29207
|
type_item.setForeground(QColor("#1976D2")) # Blue for headings (works in both themes)
|
|
29189
29208
|
elif type_display.startswith("#") or type_display in ("•", "li"):
|
|
29190
29209
|
type_item.setForeground(QColor("#388E3C")) # Green for list items (works in both themes)
|
|
29191
|
-
|
|
29210
|
+
|
|
29211
|
+
# Smaller font for type symbols
|
|
29212
|
+
type_font = QFont(self.default_font_family, max(8, self.default_font_size - 2))
|
|
29213
|
+
type_item.setFont(type_font)
|
|
29214
|
+
|
|
29192
29215
|
self.table.setItem(row, 1, type_item)
|
|
29193
29216
|
|
|
29194
29217
|
# Source - Use read-only QTextEdit widget for easy text selection
|
|
@@ -29465,9 +29488,13 @@ class SupervertalerQt(QMainWindow):
|
|
|
29465
29488
|
termview_layout.setContentsMargins(4, 4, 4, 0)
|
|
29466
29489
|
termview_layout.setSpacing(2)
|
|
29467
29490
|
|
|
29468
|
-
# Termview header label
|
|
29491
|
+
# Termview header label (theme-aware)
|
|
29469
29492
|
termview_header = QLabel("📖 Termview")
|
|
29470
|
-
|
|
29493
|
+
if hasattr(self, 'theme_manager') and self.theme_manager:
|
|
29494
|
+
header_color = self.theme_manager.current_theme.text_disabled
|
|
29495
|
+
else:
|
|
29496
|
+
header_color = "#666"
|
|
29497
|
+
termview_header.setStyleSheet(f"font-weight: bold; font-size: 9px; color: {header_color};")
|
|
29471
29498
|
termview_layout.addWidget(termview_header)
|
|
29472
29499
|
|
|
29473
29500
|
# Third Termview instance for Match Panel
|
|
@@ -29491,11 +29518,19 @@ class SupervertalerQt(QMainWindow):
|
|
|
29491
29518
|
tm_layout = QHBoxLayout(tm_container)
|
|
29492
29519
|
tm_layout.setContentsMargins(0, 0, 0, 0)
|
|
29493
29520
|
tm_layout.setSpacing(0)
|
|
29494
|
-
|
|
29495
|
-
#
|
|
29496
|
-
|
|
29497
|
-
|
|
29498
|
-
|
|
29521
|
+
|
|
29522
|
+
# Get theme-aware colors for TM boxes (same as Compare Panel)
|
|
29523
|
+
if hasattr(self, 'theme_manager') and self.theme_manager:
|
|
29524
|
+
theme = self.theme_manager.current_theme
|
|
29525
|
+
is_dark = getattr(theme, 'is_dark', 'dark' in theme.name.lower())
|
|
29526
|
+
border_color = theme.border
|
|
29527
|
+
text_color = theme.text
|
|
29528
|
+
# Green background - theme-appropriate shade
|
|
29529
|
+
tm_box_bg = theme.panel_success if hasattr(theme, 'panel_success') else ("#1e3a2f" if is_dark else "#d4edda")
|
|
29530
|
+
else:
|
|
29531
|
+
tm_box_bg = "#d4edda" # Green (light mode)
|
|
29532
|
+
text_color = "#333"
|
|
29533
|
+
border_color = "#ddd"
|
|
29499
29534
|
|
|
29500
29535
|
# TM Source box (GREEN, with navigation)
|
|
29501
29536
|
self.match_panel_tm_matches = [] # Separate match list
|
|
@@ -29637,42 +29672,58 @@ class SupervertalerQt(QMainWindow):
|
|
|
29637
29672
|
header_layout.addWidget(nav_label)
|
|
29638
29673
|
|
|
29639
29674
|
if has_navigation:
|
|
29640
|
-
|
|
29641
|
-
|
|
29642
|
-
|
|
29643
|
-
|
|
29644
|
-
|
|
29645
|
-
|
|
29646
|
-
|
|
29647
|
-
|
|
29648
|
-
|
|
29649
|
-
|
|
29650
|
-
|
|
29651
|
-
|
|
29652
|
-
|
|
29653
|
-
|
|
29654
|
-
|
|
29655
|
-
|
|
29656
|
-
|
|
29675
|
+
# Detect theme for arrow color
|
|
29676
|
+
is_dark_theme = hasattr(self, 'theme_manager') and self.theme_manager and 'dark' in self.theme_manager.current_theme.name.lower()
|
|
29677
|
+
arrow_color = "#FFFFFF" if is_dark_theme else "#333333"
|
|
29678
|
+
|
|
29679
|
+
# Create clickable label class with theme update capability
|
|
29680
|
+
from PyQt6.QtCore import pyqtSignal
|
|
29681
|
+
|
|
29682
|
+
class ClickableArrow(QLabel):
|
|
29683
|
+
clicked = pyqtSignal()
|
|
29684
|
+
|
|
29685
|
+
def __init__(self, arrow_symbol, parent=None):
|
|
29686
|
+
"""arrow_symbol: '◀' or '▶'"""
|
|
29687
|
+
self.arrow_symbol = arrow_symbol
|
|
29688
|
+
super().__init__("", parent)
|
|
29689
|
+
self.setCursor(Qt.CursorShape.PointingHandCursor)
|
|
29690
|
+
|
|
29691
|
+
def set_color(self, color):
|
|
29692
|
+
"""Update arrow color for current theme"""
|
|
29693
|
+
self.setStyleSheet(f"""
|
|
29694
|
+
QLabel {{
|
|
29695
|
+
color: {color};
|
|
29696
|
+
background: transparent;
|
|
29697
|
+
border: none;
|
|
29698
|
+
font-size: 11px;
|
|
29699
|
+
font-weight: bold;
|
|
29700
|
+
}}
|
|
29701
|
+
""")
|
|
29702
|
+
self.setText(self.arrow_symbol)
|
|
29703
|
+
|
|
29704
|
+
def mousePressEvent(self, event):
|
|
29705
|
+
self.clicked.emit()
|
|
29706
|
+
super().mousePressEvent(event)
|
|
29707
|
+
|
|
29708
|
+
# Prev arrow - using ◀
|
|
29709
|
+
prev_btn = ClickableArrow("◀")
|
|
29710
|
+
prev_btn.set_color(arrow_color)
|
|
29711
|
+
prev_btn.setFixedSize(16, 16)
|
|
29712
|
+
prev_btn.setAlignment(Qt.AlignmentFlag.AlignCenter)
|
|
29657
29713
|
header_layout.addWidget(prev_btn)
|
|
29658
|
-
|
|
29659
|
-
# Next
|
|
29660
|
-
next_btn =
|
|
29661
|
-
next_btn.
|
|
29662
|
-
next_btn.
|
|
29663
|
-
|
|
29664
|
-
font-size: 9px;
|
|
29665
|
-
padding: 0px;
|
|
29666
|
-
background: transparent;
|
|
29667
|
-
border: 1px solid {border_color};
|
|
29668
|
-
border-radius: 2px;
|
|
29669
|
-
color: {text_color};
|
|
29670
|
-
}}
|
|
29671
|
-
QPushButton:hover {{
|
|
29672
|
-
background: rgba(128,128,128,0.2);
|
|
29673
|
-
}}
|
|
29674
|
-
""")
|
|
29714
|
+
|
|
29715
|
+
# Next arrow - using ▶
|
|
29716
|
+
next_btn = ClickableArrow("▶")
|
|
29717
|
+
next_btn.set_color(arrow_color)
|
|
29718
|
+
next_btn.setFixedSize(16, 16)
|
|
29719
|
+
next_btn.setAlignment(Qt.AlignmentFlag.AlignCenter)
|
|
29675
29720
|
header_layout.addWidget(next_btn)
|
|
29721
|
+
|
|
29722
|
+
# Store reference for theme updates
|
|
29723
|
+
if not hasattr(self, 'theme_aware_arrows'):
|
|
29724
|
+
self.theme_aware_arrows = []
|
|
29725
|
+
self.theme_aware_arrows.extend([prev_btn, next_btn])
|
|
29726
|
+
|
|
29676
29727
|
nav_buttons = [prev_btn, next_btn]
|
|
29677
29728
|
|
|
29678
29729
|
header_layout.addStretch()
|
|
@@ -30601,8 +30652,8 @@ class SupervertalerQt(QMainWindow):
|
|
|
30601
30652
|
status_label = QLabel(status_def.icon)
|
|
30602
30653
|
status_label.setAlignment(Qt.AlignmentFlag.AlignVCenter | Qt.AlignmentFlag.AlignLeft)
|
|
30603
30654
|
status_label.setToolTip(status_def.label)
|
|
30604
|
-
#
|
|
30605
|
-
font_size = "
|
|
30655
|
+
# Smaller red X for "not_started" to match green checkmark visual size
|
|
30656
|
+
font_size = "8px" if segment.status == "not_started" else "13px"
|
|
30606
30657
|
# Make confirmed checkmark green
|
|
30607
30658
|
color = "color: #2e7d32;" if segment.status == "confirmed" else ""
|
|
30608
30659
|
|
|
@@ -30779,7 +30830,7 @@ class SupervertalerQt(QMainWindow):
|
|
|
30779
30830
|
|
|
30780
30831
|
self.table.setFont(font)
|
|
30781
30832
|
|
|
30782
|
-
# Also update header font
|
|
30833
|
+
# Also update header font - same size as grid content, just bold
|
|
30783
30834
|
header_font = QFont(self.default_font_family, self.default_font_size, QFont.Weight.Bold)
|
|
30784
30835
|
self.table.horizontalHeader().setFont(header_font)
|
|
30785
30836
|
|
|
@@ -43938,7 +43989,15 @@ OUTPUT ONLY THE SEGMENT MARKERS. DO NOT ADD EXPLANATIONS BEFORE OR AFTER."""
|
|
|
43938
43989
|
# Reapply alternating row colors with new theme
|
|
43939
43990
|
if hasattr(self, 'apply_alternating_row_colors'):
|
|
43940
43991
|
self.apply_alternating_row_colors()
|
|
43941
|
-
|
|
43992
|
+
|
|
43993
|
+
# Update navigation arrow colors based on theme
|
|
43994
|
+
if hasattr(self, 'theme_aware_arrows'):
|
|
43995
|
+
is_dark = theme.name == "Dark"
|
|
43996
|
+
arrow_color = "#FFFFFF" if is_dark else "#333333"
|
|
43997
|
+
for arrow in self.theme_aware_arrows:
|
|
43998
|
+
if hasattr(arrow, 'set_color'):
|
|
43999
|
+
arrow.set_color(arrow_color)
|
|
44000
|
+
|
|
43942
44001
|
# Refresh segment numbers color
|
|
43943
44002
|
if hasattr(self, 'table') and self.table:
|
|
43944
44003
|
# Determine segment number color based on theme
|
|
@@ -43975,6 +44034,11 @@ OUTPUT ONLY THE SEGMENT MARKERS. DO NOT ADD EXPLANATIONS BEFORE OR AFTER."""
|
|
|
43975
44034
|
if hasattr(self.termview_widget, 'apply_theme'):
|
|
43976
44035
|
self.termview_widget.apply_theme()
|
|
43977
44036
|
|
|
44037
|
+
# Also refresh Match Panel TermView (right panel)
|
|
44038
|
+
if hasattr(self, 'termview_widget_match') and self.termview_widget_match:
|
|
44039
|
+
if hasattr(self.termview_widget_match, 'apply_theme'):
|
|
44040
|
+
self.termview_widget_match.apply_theme()
|
|
44041
|
+
|
|
43978
44042
|
def show_file_progress_dialog(self):
|
|
43979
44043
|
"""Show File Progress dialog for multi-file projects.
|
|
43980
44044
|
|
modules/termview_widget.py
CHANGED
|
@@ -172,7 +172,7 @@ class TermBlock(QWidget):
|
|
|
172
172
|
# Get theme colors
|
|
173
173
|
is_dark = self.theme_manager and self.theme_manager.current_theme.name == "Dark"
|
|
174
174
|
separator_color = "#555555" if is_dark else "#CCCCCC"
|
|
175
|
-
source_text_color = "#
|
|
175
|
+
source_text_color = "#FFFFFF" if is_dark else "#333"
|
|
176
176
|
no_match_color = "#666666" if is_dark else "#ddd"
|
|
177
177
|
no_match_bg = "#2A2A2A" if is_dark else "#F5F5F5"
|
|
178
178
|
|
|
@@ -224,10 +224,17 @@ class TermBlock(QWidget):
|
|
|
224
224
|
if self.translations:
|
|
225
225
|
target_text = primary_translation.get('target_term', primary_translation.get('target', ''))
|
|
226
226
|
termbase_name = primary_translation.get('termbase_name', '')
|
|
227
|
-
|
|
228
|
-
# Background color based on termbase type
|
|
229
|
-
|
|
230
|
-
|
|
227
|
+
|
|
228
|
+
# Background color based on termbase type (theme-aware)
|
|
229
|
+
is_dark = self.theme_manager and self.theme_manager.current_theme.name == "Dark"
|
|
230
|
+
if is_dark:
|
|
231
|
+
# Dark mode: darker backgrounds
|
|
232
|
+
bg_color = "#4A2D3A" if self.is_effective_project else "#2D3E4A" # Dark pink/blue
|
|
233
|
+
hover_color = "#5A3D4A" if self.is_effective_project else "#3D4E5A" # Lighter on hover
|
|
234
|
+
else:
|
|
235
|
+
# Light mode: original colors
|
|
236
|
+
bg_color = "#FFE5F0" if self.is_effective_project else "#D6EBFF" # Pink for project, light blue for regular
|
|
237
|
+
hover_color = "#FFD0E8" if self.is_effective_project else "#BBDEFB" # Slightly darker on hover
|
|
231
238
|
|
|
232
239
|
# Create horizontal layout for target + shortcut badge
|
|
233
240
|
# Apply background to container so it covers both text and badge
|
|
@@ -251,9 +258,11 @@ class TermBlock(QWidget):
|
|
|
251
258
|
target_font.setBold(self.font_bold)
|
|
252
259
|
target_label.setFont(target_font)
|
|
253
260
|
target_label.setAlignment(Qt.AlignmentFlag.AlignCenter)
|
|
261
|
+
# Theme-aware text color
|
|
262
|
+
target_text_color = "#B0C4DE" if is_dark else "#0052A3" # Light blue in dark mode
|
|
254
263
|
target_label.setStyleSheet(f"""
|
|
255
264
|
QLabel {{
|
|
256
|
-
color:
|
|
265
|
+
color: {target_text_color};
|
|
257
266
|
padding: 0px;
|
|
258
267
|
background-color: transparent;
|
|
259
268
|
border: none;
|
|
@@ -312,11 +321,12 @@ class TermBlock(QWidget):
|
|
|
312
321
|
if len(self.translations) > 1:
|
|
313
322
|
count_label = QLabel(f"+{len(self.translations) - 1}")
|
|
314
323
|
count_label.setAlignment(Qt.AlignmentFlag.AlignCenter)
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
324
|
+
count_color = "#AAA" if is_dark else "#999" # Lighter in dark mode
|
|
325
|
+
count_label.setStyleSheet(f"""
|
|
326
|
+
QLabel {{
|
|
327
|
+
color: {count_color};
|
|
318
328
|
font-size: 7px;
|
|
319
|
-
}
|
|
329
|
+
}}
|
|
320
330
|
""")
|
|
321
331
|
layout.addWidget(count_label)
|
|
322
332
|
return
|
|
@@ -336,10 +346,13 @@ class TermBlock(QWidget):
|
|
|
336
346
|
badge_label = QLabel(badge_text)
|
|
337
347
|
badge_label.setAlignment(Qt.AlignmentFlag.AlignCenter)
|
|
338
348
|
badge_label.setFixedSize(badge_width, 14)
|
|
349
|
+
# Theme-aware badge colors
|
|
350
|
+
badge_bg = "#4A90E2" if is_dark else "#1976D2" # Lighter blue in dark mode
|
|
351
|
+
badge_text_color = "#FFFFFF" if is_dark else "white"
|
|
339
352
|
badge_label.setStyleSheet(f"""
|
|
340
353
|
QLabel {{
|
|
341
|
-
background-color:
|
|
342
|
-
color:
|
|
354
|
+
background-color: {badge_bg};
|
|
355
|
+
color: {badge_text_color};
|
|
343
356
|
font-size: 9px;
|
|
344
357
|
font-weight: bold;
|
|
345
358
|
border-radius: 7px;
|
|
@@ -352,16 +365,17 @@ class TermBlock(QWidget):
|
|
|
352
365
|
target_layout.addWidget(badge_label)
|
|
353
366
|
|
|
354
367
|
layout.addWidget(target_container)
|
|
355
|
-
|
|
368
|
+
|
|
356
369
|
# Show count if multiple translations - very compact
|
|
357
370
|
if len(self.translations) > 1:
|
|
358
371
|
count_label = QLabel(f"+{len(self.translations) - 1}")
|
|
359
372
|
count_label.setAlignment(Qt.AlignmentFlag.AlignCenter)
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
373
|
+
count_color = "#AAA" if is_dark else "#999" # Lighter in dark mode
|
|
374
|
+
count_label.setStyleSheet(f"""
|
|
375
|
+
QLabel {{
|
|
376
|
+
color: {count_color};
|
|
363
377
|
font-size: 7px;
|
|
364
|
-
}
|
|
378
|
+
}}
|
|
365
379
|
""")
|
|
366
380
|
layout.addWidget(count_label)
|
|
367
381
|
else:
|
|
@@ -439,7 +453,7 @@ class NTBlock(QWidget):
|
|
|
439
453
|
|
|
440
454
|
# Get theme colors
|
|
441
455
|
is_dark = self.theme_manager and self.theme_manager.current_theme.name == "Dark"
|
|
442
|
-
source_text_color = "#
|
|
456
|
+
source_text_color = "#FFFFFF" if is_dark else "#5D4E37"
|
|
443
457
|
|
|
444
458
|
# Pastel yellow border for non-translatables
|
|
445
459
|
border_color = "#E6C200" # Darker yellow for border
|
|
@@ -637,6 +651,17 @@ class TermviewWidget(QWidget):
|
|
|
637
651
|
is_dark = theme.name == "Dark"
|
|
638
652
|
info_label_color = "#909090" if is_dark else info_text
|
|
639
653
|
self.info_label.setStyleSheet(f"color: {info_label_color}; font-size: 10px; padding: 5px;")
|
|
654
|
+
|
|
655
|
+
# Refresh term blocks to pick up new theme colors
|
|
656
|
+
if hasattr(self, '_last_termbase_matches') and hasattr(self, '_last_nt_matches') and hasattr(self, 'current_source'):
|
|
657
|
+
# Re-render with stored matches to apply new theme colors
|
|
658
|
+
if self.current_source:
|
|
659
|
+
self.update_with_matches(
|
|
660
|
+
self.current_source,
|
|
661
|
+
self._last_termbase_matches or [],
|
|
662
|
+
self._last_nt_matches,
|
|
663
|
+
self._status_hint if hasattr(self, '_status_hint') else None
|
|
664
|
+
)
|
|
640
665
|
|
|
641
666
|
def set_font_settings(self, font_family: str = "Segoe UI", font_size: int = 10, bold: bool = False):
|
|
642
667
|
"""Update font settings for Termview
|
|
@@ -707,6 +732,9 @@ class TermviewWidget(QWidget):
|
|
|
707
732
|
status_hint: Optional hint about why there might be no matches (e.g., 'no_termbases_activated', 'wrong_language')
|
|
708
733
|
"""
|
|
709
734
|
self.current_source = source_text
|
|
735
|
+
# Store matches for theme refresh
|
|
736
|
+
self._last_termbase_matches = termbase_matches
|
|
737
|
+
self._last_nt_matches = nt_matches
|
|
710
738
|
|
|
711
739
|
# Clear existing blocks and shortcut mappings
|
|
712
740
|
self.clear_terms()
|
|
@@ -2372,8 +2372,20 @@ class UnifiedPromptManagerQt:
|
|
|
2372
2372
|
else:
|
|
2373
2373
|
# Name unchanged, just update in place
|
|
2374
2374
|
if self.library.save_prompt(path, prompt_data):
|
|
2375
|
+
# Refresh active prompts if this prompt is currently active or attached
|
|
2376
|
+
# This ensures "Preview Combined" shows the updated content immediately
|
|
2377
|
+
if self.library.active_primary_prompt_path == path:
|
|
2378
|
+
# Update cached primary prompt content
|
|
2379
|
+
self.library.active_primary_prompt = self.library.prompts[path]['content']
|
|
2380
|
+
|
|
2381
|
+
if path in self.library.attached_prompt_paths:
|
|
2382
|
+
# Update cached attached prompt content
|
|
2383
|
+
idx = self.library.attached_prompt_paths.index(path)
|
|
2384
|
+
self.library.attached_prompts[idx] = self.library.prompts[path]['content']
|
|
2385
|
+
|
|
2375
2386
|
QMessageBox.information(self.main_widget, "Saved", "Prompt updated successfully!")
|
|
2376
2387
|
self._refresh_tree()
|
|
2388
|
+
self._update_attached_list() # Refresh attached list to show updated names
|
|
2377
2389
|
else:
|
|
2378
2390
|
QMessageBox.warning(self.main_widget, "Error", "Failed to save prompt")
|
|
2379
2391
|
else:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: supervertaler
|
|
3
|
-
Version: 1.9.
|
|
3
|
+
Version: 1.9.184
|
|
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
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
Supervertaler.py,sha256=
|
|
1
|
+
Supervertaler.py,sha256=J2_iqhhPh9GFGeJxEZkGeZs-nxoB7OZAfaujHjVsF8s,2342058
|
|
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
|
|
@@ -61,7 +61,7 @@ modules/term_extractor.py,sha256=qPvKNCVXFTGEGwXNvvC0cfCmdb5c3WhzE38EOgKdKUI,112
|
|
|
61
61
|
modules/termbase_entry_editor.py,sha256=iWO9CgLjMomGAqBXDsGAX7TFJvDOp2s_taS4gBL1rZY,35818
|
|
62
62
|
modules/termbase_import_export.py,sha256=16IAY04IS_rgt0GH5UOUzUI5NoqAli4JMfMquxmFBm0,23552
|
|
63
63
|
modules/termbase_manager.py,sha256=XAVrz-wt8jKcjoD6ocHoXewY5PN0A0GeqFEctsv0jS8,48697
|
|
64
|
-
modules/termview_widget.py,sha256=
|
|
64
|
+
modules/termview_widget.py,sha256=FsNnSWh86PCnmKcC3fFJS8MJNdVvRpgE5e8-u4jAosY,55742
|
|
65
65
|
modules/theme_manager.py,sha256=Qk_jfCmfm7fjdMAOyBHpD18w3MiRfWBZk0cHTw6yAAg,18639
|
|
66
66
|
modules/tm_editor_dialog.py,sha256=AzGwq4QW641uFJdF8DljLTRRp4FLoYX3Pe4rlTjQWNg,3517
|
|
67
67
|
modules/tm_manager_qt.py,sha256=h2bvXkRuboHf_RRz9-5FX35GVRlpXgRDWeXyj1QWtPs,54406
|
|
@@ -75,13 +75,13 @@ modules/translation_memory.py,sha256=LnG8csZNL2GTHXT4zk0uecJEtvRc-MKwv7Pt7EX3s7s
|
|
|
75
75
|
modules/translation_results_panel.py,sha256=OWqzV9xmJOi8NGCi3h42nq-qE7-v6WStjQWRsghCVbQ,92044
|
|
76
76
|
modules/translation_services.py,sha256=lyVpWuZK1wtVtYZMDMdLoq1DHBoSaeAnp-Yejb0TlVQ,10530
|
|
77
77
|
modules/unified_prompt_library.py,sha256=96u4WlMwnmmhD4uNJHZ-qVQj8v9_8dA2AVCWpBcwTrg,26006
|
|
78
|
-
modules/unified_prompt_manager_qt.py,sha256=
|
|
78
|
+
modules/unified_prompt_manager_qt.py,sha256=HkGUnH0wlfxt-hVe-nKCeWLyProYdefuuq2slqv8hI4,172160
|
|
79
79
|
modules/voice_commands.py,sha256=iBb-gjWxRMLhFH7-InSRjYJz1EIDBNA2Pog8V7TtJaY,38516
|
|
80
80
|
modules/voice_dictation.py,sha256=QmitXfkG-vRt5hIQATjphHdhXfqmwhzcQcbXB6aRzIg,16386
|
|
81
81
|
modules/voice_dictation_lite.py,sha256=jorY0BmWE-8VczbtGrWwt1zbnOctMoSlWOsQrcufBcc,9423
|
|
82
|
-
supervertaler-1.9.
|
|
83
|
-
supervertaler-1.9.
|
|
84
|
-
supervertaler-1.9.
|
|
85
|
-
supervertaler-1.9.
|
|
86
|
-
supervertaler-1.9.
|
|
87
|
-
supervertaler-1.9.
|
|
82
|
+
supervertaler-1.9.184.dist-info/licenses/LICENSE,sha256=m28u-4qL5nXIWnJ6xlQVw__H30rWFtRK3pCOais2OuY,1092
|
|
83
|
+
supervertaler-1.9.184.dist-info/METADATA,sha256=VDzAyylsZ4F4KS2d6gA9EJ-EQO-2oncJpEhgXiEiHoo,5725
|
|
84
|
+
supervertaler-1.9.184.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
|
|
85
|
+
supervertaler-1.9.184.dist-info/entry_points.txt,sha256=NP4hiCvx-_30YYKqgr-jfJYQvHr1qTYBMfoVmKIXSM8,53
|
|
86
|
+
supervertaler-1.9.184.dist-info/top_level.txt,sha256=9tUHBYUSfaE4S2E4W3eavJsDyYymkwLfeWAHHAPT6Dk,22
|
|
87
|
+
supervertaler-1.9.184.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|