Skip to content

Commit cd9df8a

Browse files
michaelbeijerclaude
andcommitted
Fix default prompt flags and change QuickLauncher shortcuts
Default prompts now include quicklauncher, quicklauncher_grid, and read_only flags in YAML frontmatter. Category-based QuickLauncher detection uses startswith() instead of exact match. Existing v1.9.369 default prompts are automatically rewritten on startup. QuickLauncher shortcut changed from Alt+K to Ctrl+Q (in-app) and Ctrl+Alt+K to Ctrl+Alt+Q (global). Co-Authored-By: Claude Opus 4.6 <[email protected]>
1 parent f560bb8 commit cd9df8a

7 files changed

Lines changed: 34 additions & 12 deletions

File tree

CHANGELOG.md

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

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

5-
**Current Version:** v1.9.369 (March 31, 2026)
5+
**Current Version:** v1.9.370 (March 31, 2026)
66

77

8+
## v1.9.370 - March 31, 2026
9+
10+
### Fixed
11+
- **Default prompt QuickLauncher flags** – QuickLauncher default prompts now correctly have `quicklauncher: true` and `quicklauncher_grid: true` written to their YAML frontmatter, so "Show in QuickLauncher (in-app)" and "Show in QuickLauncher (global)" are pre-selected
12+
- **Default prompt read-only flag** – all default prompts now include `read_only: true` in their YAML frontmatter
13+
- **Category-based QuickLauncher detection** – prompts with subcategories like `QuickLauncher/Default` are now correctly detected as QuickLauncher prompts (was previously checking for exact match only)
14+
- **Existing default prompts updated on startup** – default prompts created by v1.9.369 are automatically rewritten on next launch to include the new flags
15+
16+
---
17+
818
## v1.9.369 - March 31, 2026
919

1020
### Added

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, Mistral, Ollama), translation memory, glossary management, and seamless CAT tool integration (memoQ, Trados, CafeTran, Phrase, Déjà Vu).
88

9-
**Latest release:** v1.9.369default prompt system with six auto-created prompts shared with Supervertaler for Trados.
9+
**Latest release:** v1.9.370fix QuickLauncher flags and read-only state for default prompts.
1010

1111
---
1212

Supervertaler.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8673,8 +8673,8 @@ def create_shortcut(shortcut_id: str, default_key: str, handler):
86738673
# Ctrl+N - Focus Segment Note tab
86748674
create_shortcut("editor_focus_notes", "Ctrl+N", self.focus_segment_notes)
86758675

8676-
# Alt+K - Open QuickLauncher directly
8677-
create_shortcut("editor_open_quicklauncher", "Alt+K", self.open_quicklauncher)
8676+
# Ctrl+Q - Open QuickLauncher directly
8677+
create_shortcut("editor_open_quicklauncher", "Ctrl+Q", self.open_quicklauncher)
86788678

86798679
# Lone Ctrl tap — Term Insert Popup (memoQ-style glossary + NT insert list).
86808680
# Implemented as an app-level event filter rather than a QShortcut because
@@ -55651,7 +55651,7 @@ def register_global_hotkey(self):
5565155651
else:
5565255652
sl_shortcut = 'ctrl+alt+l'
5565355653
qt_shortcut = 'ctrl+alt+m'
55654-
qm_shortcut = 'ctrl+alt+k'
55654+
qm_shortcut = 'ctrl+alt+q'
5565555655

5565655656
# On macOS, replace 'alt' with 'cmd' in the shortcuts
5565755657
if IS_MACOS:
@@ -55730,7 +55730,7 @@ def _on_pynput_quicktrans(self):
5573055730
print(f"[QuickTrans] Error signaling main thread: {e}")
5573155731

5573255732
def _on_pynput_quicklauncher(self):
55733-
"""Called from pynput background thread when Ctrl+Alt+K is pressed.
55733+
"""Called from pynput background thread when Ctrl+Alt+Q is pressed.
5573455734

5573555735
IMPORTANT: Do NO work here -- see _on_pynput_superlookup docstring.
5573655736
"""

modules/keyboard_shortcuts_widget.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ def init_ui(self):
383383
else:
384384
sl_key = format_shortcut_for_display('Ctrl+Alt+L')
385385
qt_key = format_shortcut_for_display('Ctrl+Alt+M')
386-
qm_key = format_shortcut_for_display('Ctrl+Alt+K')
386+
qm_key = format_shortcut_for_display('Ctrl+Alt+Q')
387387
hotkey_info = QLabel(
388388
f"Global hotkeys allow {sl_key} (Superlookup), "
389389
f"{qt_key} (QuickTrans), and "

modules/shortcut_manager.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -573,7 +573,7 @@ class ShortcutManager:
573573
"editor_open_quicklauncher": {
574574
"category": "Editor",
575575
"description": "Open QuickLauncher for AI prompt actions",
576-
"default": "Alt+K",
576+
"default": "Ctrl+Q",
577577
"action": "open_quicklauncher",
578578
"context": "grid_editor"
579579
},
@@ -627,7 +627,7 @@ class ShortcutManager:
627627
"global_quicklauncher": {
628628
"category": "Global",
629629
"description": "QuickLauncher (global — works from any app)",
630-
"default": "Ctrl+Alt+K",
630+
"default": "Ctrl+Alt+Q",
631631
"action": "global_quicklauncher",
632632
"context": "global"
633633
},

modules/unified_prompt_library.py

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ def _parse_markdown(self, filepath: Path) -> Optional[Dict]:
200200
prompt_data['quicklauncher'] = prompt_data['sv_quickmenu']
201201
if 'quickmenu' in prompt_data and 'quicklauncher' not in prompt_data:
202202
prompt_data['quicklauncher'] = prompt_data['quickmenu']
203-
if str(prompt_data.get('category', '')).lower() == 'quicklauncher':
203+
if str(prompt_data.get('category', '')).lower().startswith('quicklauncher'):
204204
prompt_data['quicklauncher'] = True
205205
prompt_data['quicklauncher'] = bool(
206206
prompt_data.get('quicklauncher', prompt_data.get('quick_run', False))
@@ -267,7 +267,7 @@ def _parse_markdown(self, filepath: Path) -> Optional[Dict]:
267267
if 'quickmenu' in prompt_data and 'quicklauncher' not in prompt_data:
268268
prompt_data['quicklauncher'] = prompt_data['quickmenu']
269269
# category: QuickLauncher sets the quicklauncher flag (matches Trados behaviour)
270-
if str(prompt_data.get('category', '')).lower() == 'quicklauncher':
270+
if str(prompt_data.get('category', '')).lower().startswith('quicklauncher'):
271271
prompt_data['quicklauncher'] = True
272272
prompt_data['quicklauncher'] = bool(
273273
prompt_data.get('quicklauncher', prompt_data.get('quick_run', False))
@@ -1050,6 +1050,12 @@ def ensure_default_prompts(self):
10501050
if not filepath.exists():
10511051
self._write_default_prompt_file(filepath, defn)
10521052
self.log(f" \u2713 Created default prompt: {defn['name']}")
1053+
else:
1054+
# Rewrite if file is missing new flags (e.g. quicklauncher, read_only)
1055+
existing = filepath.read_text(encoding='utf-8')
1056+
if 'read_only: true' not in existing:
1057+
self._write_default_prompt_file(filepath, defn)
1058+
self.log(f" \u2713 Updated default prompt: {defn['name']}")
10531059

10541060
def restore_default_prompts(self):
10551061
"""
@@ -1083,6 +1089,12 @@ def _write_default_prompt_file(self, filepath: Path, defn: Dict):
10831089
if defn.get('category'):
10841090
lines.append(f'category: "{defn["category"]}"')
10851091
lines.append('default: true')
1092+
lines.append('read_only: true')
1093+
# QuickLauncher prompts get both in-app and global grid flags
1094+
is_ql = str(defn.get('category', '')).lower().startswith('quicklauncher')
1095+
if is_ql:
1096+
lines.append('quicklauncher: true')
1097+
lines.append('quicklauncher_grid: true')
10861098
lines.append('---')
10871099
lines.append('')
10881100
lines.append(defn.get('content', ''))

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.369"
7+
version = "1.9.370"
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)