From 5e504d00f9413f74a52247ac708e4a97a9eff94d Mon Sep 17 00:00:00 2001 From: hl-valdemar Date: Sun, 18 Oct 2026 11:43:03 +0200 Subject: [PATCH] style: dim translation explanations --- README.md | 2 ++ Sources/Conjure/TranslationController.swift | 10 +++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 46f3dc5..f18b03e 100644 --- a/README.md +++ b/README.md @@ -140,6 +140,8 @@ Search for **Conjure Translate**, identified by its centered ๐ŸŒ icon, and open With **OpenAI ยท gpt-6-luna**, enter the text first, then press Return or **Add context**. The original text stays visible while the search bar becomes a second input for the situation: where you encountered it, who said it to whom, or the intended tone. Press Return or **Translate** to send both inputs. Context is optional; Return with blank context translates without it, rather than swapping languages. OpenAI returns the translation first, followed by a one- or two-sentence explanation in the target language. Context helps resolve meaning, tone, and register; if the text conflicts with the situation, the explanation flags the mismatch instead of silently changing the meaning. Nothing is sent when advancing to the context step. +The translation uses the primary text color; OpenAI's explanation below the blank line uses dimmed secondary text to distinguish it from the translation. + When the translation is available, the action changes to **Copy**: press Return or click it to copy the full output (including OpenAI's explanation) and close Conjure. Command-C still copies selected output. Editing the current input clears the result; editing context keeps the original text. The action is disabled while translating. The footer places the current primary action and its Return keycap before **Actions**, whose Command and K keys use separate keycaps, matching the launcher. diff --git a/Sources/Conjure/TranslationController.swift b/Sources/Conjure/TranslationController.swift index 7e07c4c..b1935a6 100644 --- a/Sources/Conjure/TranslationController.swift +++ b/Sources/Conjure/TranslationController.swift @@ -380,7 +380,15 @@ final class TranslationController: NSViewController { ? myMemoryTranslate(text, source, target) : openAITranslate(text, source, target, key, context) guard !Task.isCancelled, let self else { return } - self.output.string = translation + let rendered = NSMutableAttributedString(string: translation, attributes: [ + .font: NSFont.systemFont(ofSize: 20), + .foregroundColor: SunsetPalette.text, + ]) + if !myMemory, let separator = translation.range(of: "\n\n") { + rendered.addAttribute(.foregroundColor, value: SunsetPalette.secondaryText, + range: NSRange(separator.upperBound..