supervertaler 1.9.190__py3-none-any.whl → 1.9.198__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 +51253 -50498
- modules/keyboard_shortcuts_widget.py +76 -8
- modules/llm_clients.py +58 -33
- modules/quicktrans.py +670 -0
- modules/shortcut_manager.py +19 -5
- modules/statuses.py +2 -2
- modules/superlookup.py +3 -3
- modules/unified_prompt_manager_qt.py +22 -1
- {supervertaler-1.9.190.dist-info → supervertaler-1.9.198.dist-info}/METADATA +1 -1
- {supervertaler-1.9.190.dist-info → supervertaler-1.9.198.dist-info}/RECORD +14 -13
- {supervertaler-1.9.190.dist-info → supervertaler-1.9.198.dist-info}/WHEEL +0 -0
- {supervertaler-1.9.190.dist-info → supervertaler-1.9.198.dist-info}/entry_points.txt +0 -0
- {supervertaler-1.9.190.dist-info → supervertaler-1.9.198.dist-info}/licenses/LICENSE +0 -0
- {supervertaler-1.9.190.dist-info → supervertaler-1.9.198.dist-info}/top_level.txt +0 -0
modules/shortcut_manager.py
CHANGED
|
@@ -584,6 +584,15 @@ class ShortcutManager:
|
|
|
584
584
|
"default": "Ctrl+Shift+F",
|
|
585
585
|
"action": "filter_on_selected_text"
|
|
586
586
|
},
|
|
587
|
+
|
|
588
|
+
# QuickTrans (GT4T-style instant translation popup)
|
|
589
|
+
"mt_quick_lookup": {
|
|
590
|
+
"category": "Translation",
|
|
591
|
+
"description": "QuickTrans (instant translation popup)",
|
|
592
|
+
"default": "Ctrl+M",
|
|
593
|
+
"action": "show_mt_quick_popup",
|
|
594
|
+
"context": "editor"
|
|
595
|
+
},
|
|
587
596
|
}
|
|
588
597
|
|
|
589
598
|
def __init__(self, settings_file: Optional[Path] = None):
|
|
@@ -744,25 +753,30 @@ class ShortcutManager:
|
|
|
744
753
|
def find_conflicts(self, shortcut_id: str, key_sequence: str) -> List[str]:
|
|
745
754
|
"""
|
|
746
755
|
Find conflicts with a proposed shortcut
|
|
747
|
-
|
|
756
|
+
|
|
748
757
|
Args:
|
|
749
758
|
shortcut_id: The shortcut being changed
|
|
750
759
|
key_sequence: The proposed new key sequence
|
|
751
|
-
|
|
760
|
+
|
|
752
761
|
Returns:
|
|
753
|
-
List of conflicting shortcut IDs
|
|
762
|
+
List of conflicting shortcut IDs (only enabled shortcuts)
|
|
754
763
|
"""
|
|
755
764
|
conflicts = []
|
|
756
765
|
for other_id, data in self.get_all_shortcuts().items():
|
|
757
766
|
if other_id != shortcut_id and data["current"] == key_sequence:
|
|
767
|
+
# Skip disabled shortcuts - they don't count as conflicts
|
|
768
|
+
# (their key combination is freed up for other uses)
|
|
769
|
+
if not self.is_enabled(other_id):
|
|
770
|
+
continue
|
|
771
|
+
|
|
758
772
|
# Check if they're in different contexts (context-specific shortcuts don't conflict)
|
|
759
773
|
this_context = self.DEFAULT_SHORTCUTS.get(shortcut_id, {}).get("context")
|
|
760
774
|
other_context = self.DEFAULT_SHORTCUTS.get(other_id, {}).get("context")
|
|
761
|
-
|
|
775
|
+
|
|
762
776
|
# Only conflict if same context or no context specified
|
|
763
777
|
if this_context == other_context or not this_context or not other_context:
|
|
764
778
|
conflicts.append(other_id)
|
|
765
|
-
|
|
779
|
+
|
|
766
780
|
return conflicts
|
|
767
781
|
|
|
768
782
|
def export_shortcuts(self, file_path: Path):
|
modules/statuses.py
CHANGED
|
@@ -20,7 +20,7 @@ STATUSES: Dict[str, StatusDefinition] = {
|
|
|
20
20
|
"not_started": StatusDefinition(
|
|
21
21
|
key="not_started",
|
|
22
22
|
label="Not started",
|
|
23
|
-
icon="❌", # Red X
|
|
23
|
+
icon="❌", # Red X emoji (naturally colored, slightly larger)
|
|
24
24
|
color="#ffe6e6",
|
|
25
25
|
memoq_label="Not started",
|
|
26
26
|
memoQ_equivalents=("not started", "not translated"),
|
|
@@ -46,7 +46,7 @@ STATUSES: Dict[str, StatusDefinition] = {
|
|
|
46
46
|
"confirmed": StatusDefinition(
|
|
47
47
|
key="confirmed",
|
|
48
48
|
label="Confirmed",
|
|
49
|
-
icon="✔", # Checkmark - will be
|
|
49
|
+
icon="✔", # Checkmark (text character - will be black)
|
|
50
50
|
color="#d1ffd6",
|
|
51
51
|
memoq_label="Confirmed",
|
|
52
52
|
memoQ_equivalents=("confirmed",),
|
modules/superlookup.py
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"""
|
|
2
|
-
|
|
2
|
+
SuperLookup Engine
|
|
3
3
|
==================
|
|
4
4
|
System-wide translation lookup that works anywhere on your computer.
|
|
5
5
|
Captures text from any application and provides:
|
|
@@ -37,7 +37,7 @@ class LookupResult:
|
|
|
37
37
|
|
|
38
38
|
class SuperlookupEngine:
|
|
39
39
|
"""
|
|
40
|
-
|
|
40
|
+
SuperLookup text lookup engine.
|
|
41
41
|
Captures text from any application and provides translation results.
|
|
42
42
|
"""
|
|
43
43
|
|
|
@@ -164,7 +164,7 @@ class SuperlookupEngine:
|
|
|
164
164
|
# Use 'source' and 'target' keys (matches database column names)
|
|
165
165
|
source_text = match.get('source', '')
|
|
166
166
|
target_text = match.get('target', '')
|
|
167
|
-
print(f"[
|
|
167
|
+
print(f"[SuperLookup] Extracted: source='{source_text[:50]}...', target='{target_text[:50]}...'")
|
|
168
168
|
results.append(LookupResult(
|
|
169
169
|
source=source_text,
|
|
170
170
|
target=target_text,
|
|
@@ -3795,6 +3795,26 @@ Output complete ACTION."""
|
|
|
3795
3795
|
from PyQt6.QtWidgets import QApplication
|
|
3796
3796
|
QApplication.processEvents()
|
|
3797
3797
|
|
|
3798
|
+
# System prompt that explains the ACTION format to the AI
|
|
3799
|
+
ai_system_prompt = """You are an AI assistant for Supervertaler, a professional translation workbench.
|
|
3800
|
+
|
|
3801
|
+
You can execute actions using a special format. When you need to create, modify, or manage prompts, output ACTION blocks in this EXACT format:
|
|
3802
|
+
|
|
3803
|
+
ACTION:function_name PARAMS:{"param1": "value1", "param2": "value2"}
|
|
3804
|
+
|
|
3805
|
+
Available actions:
|
|
3806
|
+
- create_prompt: Create a new prompt. Required params: name, content. Optional: folder, description, activate
|
|
3807
|
+
- update_prompt: Update an existing prompt. Required params: name. Optional: content, folder, description
|
|
3808
|
+
- delete_prompt: Delete a prompt. Required params: name
|
|
3809
|
+
- list_prompts: List all prompts. Optional params: folder
|
|
3810
|
+
- activate_prompt: Set a prompt as active. Required params: name
|
|
3811
|
+
|
|
3812
|
+
IMPORTANT:
|
|
3813
|
+
1. Output ONLY the ACTION block when asked to create/modify prompts - no explanatory text
|
|
3814
|
+
2. The ACTION must be on a single line (PARAMS JSON can be multiline if needed)
|
|
3815
|
+
3. Use valid JSON for PARAMS (double quotes for strings, escape special characters)
|
|
3816
|
+
4. Do not wrap in code fences or add any markdown formatting"""
|
|
3817
|
+
|
|
3798
3818
|
# Call LLM using translate method with custom prompt
|
|
3799
3819
|
# The translate method accepts a custom_prompt parameter that we can use for any text generation
|
|
3800
3820
|
self.log_message("[AI Assistant] Calling LLM translate method...")
|
|
@@ -3802,7 +3822,8 @@ Output complete ACTION."""
|
|
|
3802
3822
|
text="", # Empty text since we're using custom_prompt
|
|
3803
3823
|
source_lang="en",
|
|
3804
3824
|
target_lang="en",
|
|
3805
|
-
custom_prompt=prompt
|
|
3825
|
+
custom_prompt=prompt,
|
|
3826
|
+
system_prompt=ai_system_prompt
|
|
3806
3827
|
)
|
|
3807
3828
|
|
|
3808
3829
|
# Log the response
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: supervertaler
|
|
3
|
-
Version: 1.9.
|
|
3
|
+
Version: 1.9.198
|
|
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=YY7nUEoaCqP0SZucFNKDqBuGhJDOgcUNb6lPbf9xsvo,2390297
|
|
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
|
|
@@ -22,8 +22,8 @@ modules/find_replace.py,sha256=r9XU19hejjJhItrkzVtn-EKbe8z9Xq-wY77Gt61w468,6342
|
|
|
22
22
|
modules/find_replace_qt.py,sha256=z06yyjOCmpYBrCzZcCv68VK-2o6pjfFCPtbr9o95XH8,18758
|
|
23
23
|
modules/glossary_manager.py,sha256=JDxY9RAGcv-l6Nms4FH7CNDucZdY1TI4WTzyylAuj24,16437
|
|
24
24
|
modules/image_extractor.py,sha256=HI6QHnpkjO35GHzTXbzazYdjoHZPFD44WAa4JGa9bAw,8332
|
|
25
|
-
modules/keyboard_shortcuts_widget.py,sha256=
|
|
26
|
-
modules/llm_clients.py,sha256=
|
|
25
|
+
modules/keyboard_shortcuts_widget.py,sha256=H489eknMDJkYusri1hQYr5MT-NhkVoHWdx9k_NMTr68,26411
|
|
26
|
+
modules/llm_clients.py,sha256=q-E9PnmtAuN8LWs_EKlMV4sXN5Jx2L57kfKCTk9X-24,50012
|
|
27
27
|
modules/llm_leaderboard.py,sha256=MQ-RbjlE10-CdgVHwoVXzXlCuUfulZ839FaF6dKlt1M,29139
|
|
28
28
|
modules/llm_superbench_ui.py,sha256=lmzsL8lt0KzFw-z8De1zb49Emnv7f1dZv_DJmoQz0bQ,60212
|
|
29
29
|
modules/local_llm_setup.py,sha256=33y-D_LKzkn2w8ejyjeKaovf_An6xQ98mKISoqe-Qjc,42661
|
|
@@ -40,13 +40,14 @@ modules/prompt_assistant.py,sha256=shkZqNTvyQKNDO_9aFEu1_gN0zQq0fR5krXkWfnTR2Y,1
|
|
|
40
40
|
modules/prompt_library.py,sha256=t5w4cqB6_Sin4BQDVNALKpfB1EN_oaDeHFwlHxILLSY,26894
|
|
41
41
|
modules/prompt_library_migration.py,sha256=fv3RHhe2-EnH50XW5tyTWy0YP_KJ2EsESuTxR8klfmI,17639
|
|
42
42
|
modules/quick_access_sidebar.py,sha256=RPn5ssvYXlitNMWFZN9Yxv7So8u_z5RGNpHN6N-SFDI,10151
|
|
43
|
+
modules/quicktrans.py,sha256=jnCwaX8tSwaGlM5BxX2NEz5XqkHu9Pnxd8XBRX3OUFM,26291
|
|
43
44
|
modules/ribbon_widget.py,sha256=QNGKxmit_oM5C5nJViadYYEzeRlIdIsla8Bzu_RNGO0,21990
|
|
44
45
|
modules/sdlppx_handler.py,sha256=o6Rj_T0B94toiYlvDDwMYLSz4q6kANgegFaDK5i3yhs,33538
|
|
45
46
|
modules/setup_wizard.py,sha256=7apNkeTcmMyw8pzJOWAmTOncxFvt3klOtmg-kKjQNgQ,13091
|
|
46
|
-
modules/shortcut_manager.py,sha256=
|
|
47
|
+
modules/shortcut_manager.py,sha256=stUQnvo2r-fwFPTTvbhQWmCVSHbJxhzg6NeyzHIR_Sg,32516
|
|
47
48
|
modules/simple_segmenter.py,sha256=-V7L-tjajW1M3DADxvcYEgBu0VLJvmRQl6VB9OshiuM,4480
|
|
48
49
|
modules/spellcheck_manager.py,sha256=jwduHJ66pOKv1MtzSAltxpP8LPgz11FvF6j8h7BiRZY,27592
|
|
49
|
-
modules/statuses.py,sha256
|
|
50
|
+
modules/statuses.py,sha256=--uvjZAd8mfYEyw2zkVlrivqIJRXw_w7ubqqVzRPeIQ,6905
|
|
50
51
|
modules/style_guide_manager.py,sha256=QBvbygF2E-cgRuwJPWmIatwQl37voU1FErYnycv8Sac,10809
|
|
51
52
|
modules/superbench_ui.py,sha256=O8pSb-R8Mul1Qz9-8gbBrFR1j7Z8b8_G0wSTSLSCf2U,55563
|
|
52
53
|
modules/superbrowser.py,sha256=jZw7jNOJyZdLTOVcbAdALH1MYiP43qi_4qGzNWxJ2Hs,13481
|
|
@@ -54,7 +55,7 @@ modules/supercleaner.py,sha256=uRJAEh03Eu4Qtujrf_jxuIyPBbcxKAZzryhV9Chi9ro,22939
|
|
|
54
55
|
modules/supercleaner_ui.py,sha256=sVTnYxlX9R20eWs52BKCeQ15iFVFOIQEl29L72lup1c,18812
|
|
55
56
|
modules/superdocs.py,sha256=vMYyUbHU8zDkS1YMSDF7niDkT8d8FJFDcfIxSktCyGc,522
|
|
56
57
|
modules/superdocs_viewer_qt.py,sha256=dBxKz71m7EH0jPoKfWLXByMXeAgEZa7zMRu13YsMBBI,14975
|
|
57
|
-
modules/superlookup.py,sha256=
|
|
58
|
+
modules/superlookup.py,sha256=0SnIv-L8xNhAS5JuvoFPdp4BoScgACLFUB1fVwFe36Y,8980
|
|
58
59
|
modules/tag_cleaner.py,sha256=u7VOchIWzD4sAhFs3X1Vuo3hX6X72zESQ0AGZE83cYc,8703
|
|
59
60
|
modules/tag_manager.py,sha256=g66S0JSxdguN9AhWzZG3hsIz87Ul51wQ3c2wOCTZVSk,12789
|
|
60
61
|
modules/term_extractor.py,sha256=qPvKNCVXFTGEGwXNvvC0cfCmdb5c3WhzE38EOgKdKUI,11253
|
|
@@ -75,13 +76,13 @@ modules/translation_memory.py,sha256=LnG8csZNL2GTHXT4zk0uecJEtvRc-MKwv7Pt7EX3s7s
|
|
|
75
76
|
modules/translation_results_panel.py,sha256=OWqzV9xmJOi8NGCi3h42nq-qE7-v6WStjQWRsghCVbQ,92044
|
|
76
77
|
modules/translation_services.py,sha256=lyVpWuZK1wtVtYZMDMdLoq1DHBoSaeAnp-Yejb0TlVQ,10530
|
|
77
78
|
modules/unified_prompt_library.py,sha256=96u4WlMwnmmhD4uNJHZ-qVQj8v9_8dA2AVCWpBcwTrg,26006
|
|
78
|
-
modules/unified_prompt_manager_qt.py,sha256=
|
|
79
|
+
modules/unified_prompt_manager_qt.py,sha256=y7xAIM9X7f1afXGE1tOcAc5EY7BKFy53Rgqi3fFzKmQ,173374
|
|
79
80
|
modules/voice_commands.py,sha256=iBb-gjWxRMLhFH7-InSRjYJz1EIDBNA2Pog8V7TtJaY,38516
|
|
80
81
|
modules/voice_dictation.py,sha256=QmitXfkG-vRt5hIQATjphHdhXfqmwhzcQcbXB6aRzIg,16386
|
|
81
82
|
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.
|
|
83
|
+
supervertaler-1.9.198.dist-info/licenses/LICENSE,sha256=m28u-4qL5nXIWnJ6xlQVw__H30rWFtRK3pCOais2OuY,1092
|
|
84
|
+
supervertaler-1.9.198.dist-info/METADATA,sha256=XD0vrT3puNdRtUEj8oHeAnOkSJ7CohlYNWQo5_VkM8M,5725
|
|
85
|
+
supervertaler-1.9.198.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
|
|
86
|
+
supervertaler-1.9.198.dist-info/entry_points.txt,sha256=NP4hiCvx-_30YYKqgr-jfJYQvHr1qTYBMfoVmKIXSM8,53
|
|
87
|
+
supervertaler-1.9.198.dist-info/top_level.txt,sha256=9tUHBYUSfaE4S2E4W3eavJsDyYymkwLfeWAHHAPT6Dk,22
|
|
88
|
+
supervertaler-1.9.198.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|