style: dim translation explanations
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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..<translation.endIndex, in: translation))
|
||||
}
|
||||
self.output.textStorage?.setAttributedString(rendered)
|
||||
self.setStatus("")
|
||||
self.translateButton.title = "Copy"
|
||||
self.translateButton.toolTip = "Copy the translation and close Conjure (Return)."
|
||||
|
||||
Reference in New Issue
Block a user