Skip to content

Private AI meeting notes that stay on your computer. No meeting bot. Free and open source for Mac, Windows and Linux. An alternative to Granola, Otter and Fireflies.

Settings: a Summary language setting writes new and rewritten summaries in the language you pick, or the meeting's by default

Eric Brownrout49ddc43efab7
diff --git a/app/e2e/language.spec.ts b/app/e2e/language.spec.ts
index 9d9a0a8a..3a844866 100644
--- a/app/e2e/language.spec.ts
+++ b/app/e2e/language.spec.ts
@@ -72,3 +72,26 @@ test('picking a language in Settings changes everything at once, menus too, and
await expect.poll(() => tray(app)).toContain('Open Yogurt')
} finally { await app.close() }
})
+
+test('summary language defaults to the meeting and persists independently of app and spoken languages', async () => {
+ const a = await launch('en-US')
+ let { app, page } = a
+ try {
+ await page.getByTestId('settings-open').click()
+ const picker = page.getByTestId('settings-summary-language')
+ await expect(picker).toHaveValue('')
+ await expect(picker.locator('option').first()).toHaveText('Same as the meeting')
+ await expect(picker.locator('option')).toHaveCount(33)
+ await picker.selectOption('fr')
+ await expect(page.getByTestId('settings-app-language')).toHaveValue('')
+ await expect(page.getByTestId('settings-spoken-en')).toHaveAttribute('aria-checked', 'true')
+ await expect.poll(() => page.evaluate(() => window.yogurt.settings.get().then(s => s.summaryLanguage))).toBe('fr')
+ await app.close()
+ ;({ app, page } = await launch('en-US', a.userData))
+ await page.getByTestId('settings-open').click()
+ await expect(page.getByTestId('settings-summary-language')).toHaveValue('fr')
+ await page.getByTestId('settings-summary-language').selectOption('')
+ await expect.poll(() => page.evaluate(() => window.yogurt.settings.get().then(s => s.summaryLanguage))).toBe('')
+ await expect(page.getByTestId('settings-heading')).toHaveText('Settings')
+ } finally { await app.close() }
+})
diff --git a/app/src/main/index.ts b/app/src/main/index.ts
index a40fd2b4..263221d6 100644
--- a/app/src/main/index.ts
+++ b/app/src/main/index.ts
@@ -19,7 +19,7 @@ import { basename, join } from 'node:path'
import { pathToFileURL } from 'node:url'
import { isFake, userDataDir } from './paths'
import { logToFile } from './log'
-import { loadSettings, localeOf, keepsRecording, recordingReminderOn, spokenSetting, stopsWhenCallEnds, updateSettings, visibilityOf } from './settings'
+import { loadSettings, localeOf, keepsRecording, recordingReminderOn, spokenSetting, stopsWhenCallEnds, updateSettings, visibilityOf, summaryLanguageSetting } from './settings'
import { CALL_GONE_MS, useCallApps } from './detect'
import { systemLocale } from './locale'
import { language as uiLanguage, onLanguage, setLanguage, t } from '../shared/i18n'
@@ -611,6 +611,7 @@ app.whenReady().then(() => {
summarized: id => { folderSuggestions.schedule(id); void removeRecording(id, true) },
// Windows and Linux: a note waiting while the model loads says so (a Mac shows what it always did)
showLoading: platform !== 'darwin',
+ summaryLanguage: () => summaryLanguageSetting(loadSettings(settingsFile)),
store, queue, model, language: meetingLanguage, onStop: onMeetingStopSaved, named: (id) => callNames.finished(id), earlier: (id) => readAhead.parts(id), me,
transcribed: async (id) => { await recordingFinished(id); await transcriptFinished(id) },
send: (v) => win?.webContents.send('notes:changed', v),
diff --git a/app/src/main/notes/enhance.ts b/app/src/main/notes/enhance.ts
index f43b1be2..706c9077 100644
--- a/app/src/main/notes/enhance.ts
+++ b/app/src/main/notes/enhance.ts
@@ -1,4 +1,5 @@
import type { Person, Segment } from '../store'
+import { LOCALES } from '../../shared/i18n'
import { respell, spellingLine, type MeetingWords } from '../vocab'
/**
@@ -54,6 +55,7 @@ export function transcriptText(segments: Segment[]): string {
type PromptInput = {
title: string; attendees: Person[]; mine: string; transcript: string; language: string
+ summaryLanguage?: string
/** the person who recorded it, so the invite's other person is known */
me?: string
/** how long the meeting was */
@@ -88,7 +90,7 @@ function onlyOther(attendees: Person[], me = ''): string | undefined {
* (names, title, the person's notes), then how to write.
*/
export function enhancePrompt(i: PromptInput): string {
- const lang = i.language || 'the language most of the transcript is in'
+ const lang = i.summaryLanguage || i.language || 'the language most of the transcript is in'
const people = i.attendees.map((a) => a.name).filter(Boolean)
const other = onlyOther(i.attendees, i.me)
const mine = i.mine.trim()
@@ -108,7 +110,9 @@ export function enhancePrompt(i: PromptInput): string {
'',
...(mine ? ['Notes they typed, before or during the meeting. They show what they care about and flagged, and facts they know that may not have been said. They are hints for writing the notes, not text to copy:', '<notes>', mine, '</notes>', ''] : []),
'How to write them, so they read at a glance:',
- `- Write in ${lang}, headings too.`,
+ i.summaryLanguage
+ ? `- By default, write in ${lang}, headings too. A rewrite note asking for another language takes precedence over this default.`
+ : `- Write in ${lang}, headings too.`,
peopleRule,
...(i.spelling ? [i.spelling] : []),
'- Markdown only. Start right away with the first "## " topic: no title, no introduction, nothing after the last bullet.',
@@ -124,7 +128,7 @@ export function enhancePrompt(i: PromptInput): string {
'- Their notes can be a plan or a script made before the meeting: a question or step in it goes in only if the transcript shows it was asked or done, with what came of it.',
] : []),
'- Use only what was said or typed. Never make anything up.',
- `- Last, "## Next steps" (in ${lang}) only if someone said they would do something after the meeting: one bullet each, as "- **Name:** what they will do, by when" (when only if it was said), "**You:**" for the person these notes are for, plain words for someone without a name, like "**The designer:**". Leave out jokes and personal errands. Otherwise leave the section out.`,
+ `- Last, "## Next steps" (in ${i.summaryLanguage ? 'the same language as the rest of the notes' : lang}) only if someone said they would do something after the meeting: one bullet each, as "- **Name:** what they will do, by when" (when only if it was said), "**You:**" for the person these notes are for, plain words for someone without a name, like "**The designer:**". Leave out jokes and personal errands. Otherwise leave the section out.`,
'',
'The shape, with made-up placeholders:',
'## <topic>',
@@ -284,6 +288,8 @@ const nextStepsPrompt = (language: string) =>
export type EnhanceInput = {
meeting: { title: string; attendees: Person[] }; mine: string; segments: Segment[]; language: string | null
+ /** a locale from Settings; a rewrite note may override it */
+ summaryLanguage?: string
/** the person who recorded it */
me?: string
/** the meeting's names and companies: the transcript is respelled with them, and the model told how they are spelled */
@@ -354,10 +360,11 @@ function oneMic(segments: Segment[]): boolean {
*/
export async function enhance(input: EnhanceInput, llm: Llm, onToken: (text: string) => void, onPart?: (part: number, of: number) => void, earlier: PartSummary[] = []): Promise<string> {
const language = languageName(input.language)
+ const summaryLanguage = LOCALES.find((l) => l.id === input.summaryLanguage)?.english
let first = Infinity, last = -Infinity
for (const s of input.segments) { first = Math.min(first, s.startMs); last = Math.max(last, s.endMs) }
const minutes = input.segments.length ? (last - first) / 60_000 : undefined
- const base = { title: input.meeting.title, attendees: input.meeting.attendees, mine: input.mine, language, minutes, me: input.me, spelling: input.words && spellingLine(input.words), oneMic: oneMic(input.segments) }
+ const base = { title: input.meeting.title, attendees: input.meeting.attendees, mine: input.mine, language, summaryLanguage, minutes, me: input.me, spelling: input.words && spellingLine(input.words), oneMic: oneMic(input.segments) }
const segments = input.words ? input.segments.map((x) => ({ ...x, text: respell(x.text, input.words!) })) : input.segments
let transcript = transcriptText(segments)
let parts = false
@@ -400,12 +407,12 @@ export async function enhance(input: EnhanceInput, llm: Llm, onToken: (text: str
held += t
if (held.trimStart().startsWith('#')) { showing = true; onToken(`\n${held.trimStart()}`) }
}
- const more = tidyNotes(await llm.chat(nextStepsPrompt(language), show, { maxTokens: 400, before: [prompt, md] }))
+ const more = tidyNotes(await llm.chat(nextStepsPrompt(summaryLanguage ? 'the same language as the notes; write the bullets in that language too' : language), show, { maxTokens: 400, before: [prompt, md] }))
// only a real next-steps list is kept; anything else it said is dropped
if (OWNER.test(more)) md = `${md}\n${more}`
}
// a title is nice to have: one that fails or comes out empty leaves the meeting's as it is
- if (written) input.titleLater?.((model) => model.chat(titlePrompt(language, input.me, input.meeting.attendees), () => {}, { maxTokens: 40, before: [prompt, written], temperature: 0.3 })
+ if (written) input.titleLater?.((model) => model.chat(titlePrompt(summaryLanguage ? '' : language, input.me, input.meeting.attendees), () => {}, { maxTokens: 40, before: [prompt, written], temperature: 0.3 })
.then((raw) => cleanTitle(raw, input.me), (e) => { console.error('a title from the notes failed', e); return '' }))
return markMine(withoutCopies(md, input.mine), input.mine)
}
diff --git a/app/src/main/notes/index.ts b/app/src/main/notes/index.ts
index dc5f4cbd..c10b8009 100644
--- a/app/src/main/notes/index.ts
+++ b/app/src/main/notes/index.ts
@@ -31,6 +31,8 @@ export function hookNotes(p: {
named?: (id: string) => Promise<void>
/** the language most of the meeting was in, when the transcription knows it */
language: (id: string) => string | null
+ /** read when writing, so regenerations use the current default */
+ summaryLanguage?: () => string
onStop: (fn: (m: Meeting) => void) => unknown
/** a meeting's notes changed: status, draft or saved text */
send: (v: NoteView) => void
@@ -137,7 +139,7 @@ export function hookNotes(p: {
// a generic title (or one made from earlier notes) gets one from these notes; theirs or the calendar's never
const retitle = (x: Meeting) => x.titleSource === 'generic' || x.titleSource === 'auto'
let askTitle: ((llm: Llm) => Promise<string>) | undefined
- const md = await enhance({ meeting: m, mine, segments, language, me: p.me?.(), words: meetingWords(m), ...(retitle(m) ? { titleLater: (ask) => { askTitle = ask } } : {}) }, llm, (t) => {
+ const md = await enhance({ meeting: m, mine, segments, language, summaryLanguage: p.summaryLanguage?.(), me: p.me?.(), words: meetingWords(m), ...(retitle(m) ? { titleLater: (ask) => { askTitle = ask } } : {}) }, llm, (t) => {
if (quiet) return
draft += t
if (timer) return
@@ -194,7 +196,7 @@ export function hookNotes(p: {
const n = currentNotes(id)
// shortcut: title-only refreshes read the first 6000 characters; expand if long notes need later context.
const context = (n.enhanced ?? n.mine).slice(0, 6000)
- const t = cleanTitle(await (ask ? ask(llm) : llm.chat(`${titlePrompt(languageName(m.language ?? p.language(id)), me, m.attendees)}\n\nNotes:\n${context}`,
+ const t = cleanTitle(await (ask ? ask(llm) : llm.chat(`${titlePrompt(p.summaryLanguage?.() ? '' : languageName(m.language ?? p.language(id)), me, m.attendees)}\n\nNotes:\n${context}`,
() => {}, { maxTokens: 40, temperature: 0.3 })), me)
// renamed or people changed while it was asked for: discard the obsolete answer.
if (!t || signal.aborted || !current()) return
diff --git a/app/src/main/preferences.ts b/app/src/main/preferences.ts
index 1bbe7a04..c195cd5b 100644
--- a/app/src/main/preferences.ts
+++ b/app/src/main/preferences.ts
@@ -1,5 +1,5 @@
import { BrowserWindow, ipcMain, nativeTheme } from 'electron'
-import { loadSettings, localeOf, recordingReminderOn, spokenSetting, stopsWhenCallEnds, updateSettings, visibilityOf } from './settings'
+import { loadSettings, localeOf, recordingReminderOn, spokenSetting, stopsWhenCallEnds, updateSettings, visibilityOf, summaryLanguageSetting } from './settings'
import { systemLocale } from './locale'
import { PERMISSION_KINDS, type PermissionKind, type Permissions } from './permissions'
import { firstRunPlan, missing, nudge } from '../shared/onboarding'
@@ -51,7 +51,7 @@ export function hookPreferences(d: { file: string; permissions: Permissions; ask
// what the Mac says, so a change in System Settings shows here
// locale: every window (main, card, widget) shows the interface language
// language: the one picked ('' is the Mac's); locale: the one in use; systemLocale: the Mac's, for the picker
- return { theme: s.theme ?? 'system', openAtLogin: d.loginOn(s.openAtLogin), showInMenuBar: s.showInMenuBar !== false, appVisibility: !visible.showInMenuBar ? 'dock' : visible.showInDock ? 'both' : 'menu-bar', language: isLocale(s.language) ? s.language : '', locale: localeOf(s, systemLocale()), systemLocale: systemLocale(), myName: s.myName?.trim() || d.macName(), macName: d.macName(), stopWhenCallEnds: stopsWhenCallEnds(s), recordingReminder: recordingReminderOn(s), keepRecordings: s.keepRecordings !== false, jargon: cleanJargon(s.jargon), spoken: spokenSetting(s) }
+ return { theme: s.theme ?? 'system', openAtLogin: d.loginOn(s.openAtLogin), showInMenuBar: s.showInMenuBar !== false, appVisibility: !visible.showInMenuBar ? 'dock' : visible.showInDock ? 'both' : 'menu-bar', language: isLocale(s.language) ? s.language : '', locale: localeOf(s, systemLocale()), systemLocale: systemLocale(), myName: s.myName?.trim() || d.macName(), macName: d.macName(), stopWhenCallEnds: stopsWhenCallEnds(s), recordingReminder: recordingReminderOn(s), keepRecordings: s.keepRecordings !== false, jargon: cleanJargon(s.jargon), spoken: spokenSetting(s), summaryLanguage: summaryLanguageSetting(s) }
})
// what the person is called in meetings (who "You" is when naming voices); blank: the Mac's full name again
ipcMain.handle('settings:name', (_e, v: unknown) => {
@@ -67,6 +67,10 @@ export function hookPreferences(d: { file: string; permissions: Permissions; ask
for (const w of BrowserWindow.getAllWindows()) if (!w.isDestroyed()) w.webContents.send('settings:language', locale)
return locale
})
+ ipcMain.handle('settings:summary-language', (_e, v: unknown) => {
+ if (v !== '' && !isLocale(v)) return
+ updateSettings(d.file, { summaryLanguage: v || undefined })
+ })
ipcMain.handle('settings:theme', (_e, v: unknown) => {
if (v !== 'light' && v !== 'dark' && v !== 'system') return
nativeTheme.themeSource = v
diff --git a/app/src/main/settings.ts b/app/src/main/settings.ts
index f0a96bf6..ced66a70 100644
--- a/app/src/main/settings.ts
+++ b/app/src/main/settings.ts
@@ -44,12 +44,16 @@ export type Settings = { theme?: 'light' | 'dark'; language?: string; /** what t
jargon?: string[]
/** the language people speak in meetings: English only unless 'multi' (shared/spoken.ts) */
spoken?: Spoken
+ /** the default for newly written summaries; the meeting's language when left out */
+ summaryLanguage?: string
/** new versions download by themselves; on unless turned off */
autoUpdate?: boolean }
/** "English only" unless Multi-language was picked */
export const spokenSetting = (s: Settings): Spoken => spokenOf(s.spoken)
+export const summaryLanguageSetting = (s: Settings): string => isLocale(s.summaryLanguage) ? s.summaryLanguage : ''
+
/** "Finish recording when the call ends": on by default */
export const stopsWhenCallEnds = (s: Settings): boolean => s.stopWhenCallEnds !== false
export const recordingReminderOn = (s: Settings): boolean => s.recordingReminder !== false
diff --git a/app/src/preload/index.ts b/app/src/preload/index.ts
index b82499a5..ad7c2ad7 100644
--- a/app/src/preload/index.ts
+++ b/app/src/preload/index.ts
@@ -234,6 +234,7 @@ const api: YogurtApi = {
setKeepRecordings: (on) => ipcRenderer.invoke('settings:keep-recordings', on),
setJargon: (terms) => ipcRenderer.invoke('settings:jargon', terms),
setLanguage: (id) => ipcRenderer.invoke('settings:language', id),
+ setSummaryLanguage: (id) => ipcRenderer.invoke('settings:summary-language', id),
onLanguage: (cb) => { const f = (_e: unknown, locale: string) => cb(locale); ipcRenderer.on('settings:language', f); return () => { ipcRenderer.off('settings:language', f) } },
setSpoken: (v) => ipcRenderer.invoke('settings:spoken', v),
},
diff --git a/app/src/renderer/src/screens/Settings.tsx b/app/src/renderer/src/screens/Settings.tsx
index ae77f155..7bddf69e 100644
--- a/app/src/renderer/src/screens/Settings.tsx
+++ b/app/src/renderer/src/screens/Settings.tsx
@@ -1,6 +1,6 @@
import { LoadingContent } from '../components/LoadingContent'
import { useCallback, useEffect, useRef, useState } from 'react'
-import { Check, ChevronDown, Copy, Download, ExternalLink, Globe, Lock, Upload } from 'lucide-react'
+import { Check, ChevronDown, Copy, Download, ExternalLink, Globe, Lock, Upload, FileText } from 'lucide-react'
import type { Access, AppVisibility, McpStatus, PermissionKind, PermissionStatus, SetupState, Theme, UpdateStatus } from '../../../shared/types'
import { notesDownloadText, notesUpgradeSize } from '../notesSetup'
import { permissionCopy } from '../permissionCopy'
@@ -157,6 +157,7 @@ export function Settings({ revision = 0, focus }: { revision?: number; focus?: s
<h2 className="settings-section-heading">{t('Language')}</h2>
<div data-testid="settings-language" className="settings-group">
<AppLanguage />
+ <SummaryLanguage />
<SpokenSetting />
<Jargon />
</div>
@@ -249,6 +250,31 @@ function AppLanguage() {
)
}
+function SummaryLanguage() {
+ const [language, setLanguage] = useState<string>()
+ useEffect(() => { void window.yogurt.settings.get().then((s) => setLanguage(s.summaryLanguage)) }, [])
+ const pick = (value: string) => {
+ setLanguage(value)
+ void window.yogurt.settings.setSummaryLanguage(value)
+ }
+ return (
+ <LoadingContent pending={language === undefined}><div className="settings-row">
+ <span className="settings-permission-icon"><FileText size={17} strokeWidth={1.75} aria-hidden="true" /></span>
+ <div className="settings-row-copy">
+ <label htmlFor="settings-summary-language" className="settings-label">{t('Summary language')}</label>
+ <p id="settings-summary-language-description" className="settings-description">{t('Used for new summaries and when you write them again.')}</p>
+ </div>
+ <span className="settings-select-wrap">
+ <select id="settings-summary-language" data-testid="settings-summary-language" aria-describedby="settings-summary-language-description" value={language ?? ''} disabled={language === undefined} onChange={(e) => pick(e.target.value)} className="settings-select">
+ <option value="">{t('Same as the meeting')}</option>
+ {LOCALES.map((l) => <option key={l.id} value={l.id} lang={l.id}>{l.name}</option>)}
+ </select>
+ <ChevronDown size={14} aria-hidden="true" />
+ </span>
+ </div></LoadingContent>
+ )
+}
+
export function PermissionRow({ kind, status, onAsk }: { kind: PermissionKind; status?: Access; onAsk(): void }) {
const c = permissionCopy(kind)
const Icon = c.icon
diff --git a/app/src/renderer/src/setup.css b/app/src/renderer/src/setup.css
index d2628a1f..ed7954c3 100644
--- a/app/src/renderer/src/setup.css
+++ b/app/src/renderer/src/setup.css
@@ -30,7 +30,7 @@
.settings-select-wrap { position:relative;display:inline-flex;flex:none;max-width:100%; }
.settings-select { appearance:none;width:auto;min-width:170px;max-width:100%;height:34px;padding-inline:12px 34px;border:1px solid var(--control-border);border-radius:7px;background:var(--control);box-shadow:0 1px 2px #00000008,inset 0 1px 0 #ffffff08;color:var(--ink);font-size:13px; }
.settings-select-wrap>svg { position:absolute;inset-inline-end:12px;top:50%;transform:translateY(-50%);pointer-events:none;color:var(--muted); }
-#settings-app-language { width:240px; }
+#settings-app-language,#settings-summary-language { width:240px; }
.settings-select:focus-visible { outline:2px solid var(--focus);outline-offset:2px; }
.settings-name-field:focus-visible { outline:2px solid var(--focus);outline-offset:2px; }
.settings-toggle { position:relative;flex:none;width:38px;height:22px;border:1px solid var(--control-border);border-radius:12px;background:var(--control-pressed);box-shadow:inset 0 1px 2px #00000014;transition:background-color var(--dur-micro) ease,border-color var(--dur-micro) ease; }
diff --git a/app/src/shared/locales/ar.json b/app/src/shared/locales/ar.json
index e989dbfe..99cb417d 100644
--- a/app/src/shared/locales/ar.json
+++ b/app/src/shared/locales/ar.json
@@ -733,5 +733,8 @@
"Show Yogurt in": "إظهار Yogurt في",
"Menu bar and Dock": "شريط القوائم وDock",
"Menu bar only": "شريط القوائم فقط",
- "Dock only": "Dock فقط"
+ "Dock only": "Dock فقط",
+ "Summary language": "لغة الملخص",
+ "Same as the meeting": "نفس لغة الاجتماع",
+ "Used for new summaries and when you write them again.": "تُستخدم للملخصات الجديدة وعند إعادة كتابتها."
}
diff --git a/app/src/shared/locales/bn.json b/app/src/shared/locales/bn.json
index fbec664f..3fce3f91 100644
--- a/app/src/shared/locales/bn.json
+++ b/app/src/shared/locales/bn.json
@@ -665,5 +665,8 @@
"Show Yogurt in": "Yogurt দেখানোর স্থান",
"Menu bar and Dock": "মেনু বার এবং Dock",
"Menu bar only": "শুধু মেনু বার",
- "Dock only": "শুধু Dock"
+ "Dock only": "শুধু Dock",
+ "Summary language": "সারাংশের ভাষা",
+ "Same as the meeting": "মিটিংয়ের ভাষা",
+ "Used for new summaries and when you write them again.": "নতুন সারাংশ ও সারাংশ আবার লেখার সময় ব্যবহৃত হয়।"
}
diff --git a/app/src/shared/locales/cs.json b/app/src/shared/locales/cs.json
index 73e1a371..4b8384ac 100644
--- a/app/src/shared/locales/cs.json
+++ b/app/src/shared/locales/cs.json
@@ -708,5 +708,8 @@
"Show Yogurt in": "Zobrazovat Yogurt v",
"Menu bar and Dock": "Řádek nabídek a Dock",
"Menu bar only": "Pouze řádek nabídek",
- "Dock only": "Pouze Dock"
+ "Dock only": "Pouze Dock",
+ "Summary language": "Jazyk shrnutí",
+ "Same as the meeting": "Stejný jako na schůzce",
+ "Used for new summaries and when you write them again.": "Použije se pro nová i znovu vytvořená shrnutí."
}
diff --git a/app/src/shared/locales/da.json b/app/src/shared/locales/da.json
index 61040882..f53d41b9 100644
--- a/app/src/shared/locales/da.json
+++ b/app/src/shared/locales/da.json
@@ -677,5 +677,8 @@
"Show Yogurt in": "Vis Yogurt i",
"Menu bar and Dock": "Menulinje og Dock",
"Menu bar only": "Kun menulinjen",
- "Dock only": "Kun Dock"
+ "Dock only": "Kun Dock",
+ "Summary language": "Opsummeringssprog",
+ "Same as the meeting": "Samme som mødet",
+ "Used for new summaries and when you write them again.": "Bruges til nye opsummeringer, og når du skriver dem igen."
}
diff --git a/app/src/shared/locales/de.json b/app/src/shared/locales/de.json
index e499fa1c..94f16e3f 100644
--- a/app/src/shared/locales/de.json
+++ b/app/src/shared/locales/de.json
@@ -677,5 +677,8 @@
"Show Yogurt in": "Yogurt anzeigen in",
"Menu bar and Dock": "Menüleiste und Dock",
"Menu bar only": "Nur Menüleiste",
- "Dock only": "Nur Dock"
+ "Dock only": "Nur Dock",
+ "Summary language": "Sprache der Zusammenfassung",
+ "Same as the meeting": "Wie im Meeting",
+ "Used for new summaries and when you write them again.": "Gilt für neue und neu geschriebene Zusammenfassungen."
}
diff --git a/app/src/shared/locales/el.json b/app/src/shared/locales/el.json
index f7369709..1f3696d9 100644
--- a/app/src/shared/locales/el.json
+++ b/app/src/shared/locales/el.json
@@ -680,5 +680,8 @@
"Show Yogurt in": "Εμφάνιση Yogurt σε",
"Menu bar and Dock": "Γραμμή μενού και Dock",
"Menu bar only": "Μόνο γραμμή μενού",
- "Dock only": "Μόνο Dock"
+ "Dock only": "Μόνο Dock",
+ "Summary language": "Γλώσσα σύνοψης",
+ "Same as the meeting": "Ίδια με τη συνάντηση",
+ "Used for new summaries and when you write them again.": "Χρησιμοποιείται για νέες συνόψεις και όταν τις ξαναγράφετε."
}
diff --git a/app/src/shared/locales/en.json b/app/src/shared/locales/en.json
index 9c85edc5..f2308ca2 100644
--- a/app/src/shared/locales/en.json
+++ b/app/src/shared/locales/en.json
@@ -197,5 +197,8 @@
"Show Yogurt in": "Show Yogurt in",
"Menu bar and Dock": "Menu bar and Dock",
"Menu bar only": "Menu bar only",
- "Dock only": "Dock only"
+ "Dock only": "Dock only",
+ "Summary language": "Summary language",
+ "Same as the meeting": "Same as the meeting",
+ "Used for new summaries and when you write them again.": "Used for new summaries and when you write them again."
}
diff --git a/app/src/shared/locales/es.json b/app/src/shared/locales/es.json
index 532e794f..ffdbb44d 100644
--- a/app/src/shared/locales/es.json
+++ b/app/src/shared/locales/es.json
@@ -690,5 +690,8 @@
"Show Yogurt in": "Mostrar Yogurt en",
"Menu bar and Dock": "Barra de menús y Dock",
"Menu bar only": "Solo barra de menús",
- "Dock only": "Solo Dock"
+ "Dock only": "Solo Dock",
+ "Summary language": "Idioma del resumen",
+ "Same as the meeting": "El de la reunión",
+ "Used for new summaries and when you write them again.": "Se usa en resúmenes nuevos y cuando los vuelves a escribir."
}
diff --git a/app/src/shared/locales/fi.json b/app/src/shared/locales/fi.json
index fcae137e..5e7e86bc 100644
--- a/app/src/shared/locales/fi.json
+++ b/app/src/shared/locales/fi.json
@@ -683,5 +683,8 @@
"Show Yogurt in": "Yogurtin sijainti",
"Menu bar and Dock": "Valikkorivi ja Dock",
"Menu bar only": "Vain valikkorivi",
- "Dock only": "Vain Dock"
+ "Dock only": "Vain Dock",
+ "Summary language": "Yhteenvedon kieli",
+ "Same as the meeting": "Sama kuin kokouksessa",
+ "Used for new summaries and when you write them again.": "Käytetään uusissa ja uudelleen kirjoitetuissa yhteenvedoissa."
}
diff --git a/app/src/shared/locales/fil.json b/app/src/shared/locales/fil.json
index 3e670d2a..106e15a1 100644
--- a/app/src/shared/locales/fil.json
+++ b/app/src/shared/locales/fil.json
@@ -677,5 +677,8 @@
"Show Yogurt in": "Ipakita ang Yogurt sa",
"Menu bar and Dock": "Menu bar at Dock",
"Menu bar only": "Menu bar lang",
- "Dock only": "Dock lang"
+ "Dock only": "Dock lang",
+ "Summary language": "Wika ng buod",
+ "Same as the meeting": "Tulad ng sa pulong",
+ "Used for new summaries and when you write them again.": "Gagamitin sa mga bagong buod at kapag isinulat muli ang mga ito."
}
diff --git a/app/src/shared/locales/fr.json b/app/src/shared/locales/fr.json
index a660c4a8..9790260a 100644
--- a/app/src/shared/locales/fr.json
+++ b/app/src/shared/locales/fr.json
@@ -693,5 +693,8 @@
"Show Yogurt in": "Afficher Yogurt dans",
"Menu bar and Dock": "Barre des menus et Dock",
"Menu bar only": "Barre des menus uniquement",
- "Dock only": "Dock uniquement"
+ "Dock only": "Dock uniquement",
+ "Summary language": "Langue des résumés",
+ "Same as the meeting": "Celle de la réunion",
+ "Used for new summaries and when you write them again.": "Utilisée pour les nouveaux résumés et leur réécriture."
}
diff --git a/app/src/shared/locales/he.json b/app/src/shared/locales/he.json
index b4649e9a..f966756b 100644
--- a/app/src/shared/locales/he.json
+++ b/app/src/shared/locales/he.json
@@ -687,5 +687,8 @@
"Show Yogurt in": "הצגת Yogurt ב",
"Menu bar and Dock": "שורת התפריטים ו-Dock",
"Menu bar only": "שורת התפריטים בלבד",
- "Dock only": "Dock בלבד"
+ "Dock only": "Dock בלבד",
+ "Summary language": "שפת הסיכום",
+ "Same as the meeting": "כמו בפגישה",
+ "Used for new summaries and when you write them again.": "משמשת לסיכומים חדשים ולכתיבה מחדש שלהם."
}
diff --git a/app/src/shared/locales/hi.json b/app/src/shared/locales/hi.json
index dbe92bec..d2cb3a72 100644
--- a/app/src/shared/locales/hi.json
+++ b/app/src/shared/locales/hi.json
@@ -665,5 +665,8 @@
"Show Yogurt in": "Yogurt दिखाएँ",
"Menu bar and Dock": "मेनू बार और Dock",
"Menu bar only": "केवल मेनू बार",
- "Dock only": "केवल Dock"
+ "Dock only": "केवल Dock",
+ "Summary language": "सारांश की भाषा",
+ "Same as the meeting": "मीटिंग की भाषा",
+ "Used for new summaries and when you write them again.": "नए सारांशों और उन्हें दोबारा लिखते समय इस्तेमाल होती है।"
}
diff --git a/app/src/shared/locales/hu.json b/app/src/shared/locales/hu.json
index 649a50c7..44eef143 100644
--- a/app/src/shared/locales/hu.json
+++ b/app/src/shared/locales/hu.json
@@ -665,5 +665,8 @@
"Show Yogurt in": "Yogurt megjelenítése",
"Menu bar and Dock": "Menüsáv és Dock",
"Menu bar only": "Csak a menüsáv",
- "Dock only": "Csak a Dock"
+ "Dock only": "Csak a Dock",
+ "Summary language": "Összefoglaló nyelve",
+ "Same as the meeting": "A megbeszélés nyelve",
+ "Used for new summaries and when you write them again.": "Új és újraírt összefoglalókhoz használjuk."
}
diff --git a/app/src/shared/locales/id.json b/app/src/shared/locales/id.json
index c9eaf480..72b92c9a 100644
--- a/app/src/shared/locales/id.json
+++ b/app/src/shared/locales/id.json
@@ -635,5 +635,8 @@
"Show Yogurt in": "Tampilkan Yogurt di",
"Menu bar and Dock": "Bar menu dan Dock",
"Menu bar only": "Hanya bar menu",
- "Dock only": "Hanya Dock"
+ "Dock only": "Hanya Dock",
+ "Summary language": "Bahasa ringkasan",
+ "Same as the meeting": "Sama dengan rapat",
+ "Used for new summaries and when you write them again.": "Digunakan untuk ringkasan baru dan saat menulisnya ulang."
}
diff --git a/app/src/shared/locales/it.json b/app/src/shared/locales/it.json
index ed65ea0d..6a109ed1 100644
--- a/app/src/shared/locales/it.json
+++ b/app/src/shared/locales/it.json
@@ -696,5 +696,8 @@
"Show Yogurt in": "Mostra Yogurt in",
"Menu bar and Dock": "Barra dei menu e Dock",
"Menu bar only": "Solo barra dei menu",
- "Dock only": "Solo Dock"
+ "Dock only": "Solo Dock",
+ "Summary language": "Lingua dei riepiloghi",
+ "Same as the meeting": "Quella della riunione",
+ "Used for new summaries and when you write them again.": "Usata per i nuovi riepiloghi e quando li riscrivi."
}
diff --git a/app/src/shared/locales/ja.json b/app/src/shared/locales/ja.json
index eb20772a..89653379 100644
--- a/app/src/shared/locales/ja.json
+++ b/app/src/shared/locales/ja.json
@@ -635,5 +635,8 @@
"Show Yogurt in": "Yogurtの表示場所",
"Menu bar and Dock": "メニューバーとDock",
"Menu bar only": "メニューバーのみ",
- "Dock only": "Dockのみ"
+ "Dock only": "Dockのみ",
+ "Summary language": "要約の言語",
+ "Same as the meeting": "会議と同じ",
+ "Used for new summaries and when you write them again.": "新しい要約と書き直す要約に使用します。"
}
diff --git a/app/src/shared/locales/ko.json b/app/src/shared/locales/ko.json
index 2e20241b..af2705c9 100644
--- a/app/src/shared/locales/ko.json
+++ b/app/src/shared/locales/ko.json
@@ -635,5 +635,8 @@
"Show Yogurt in": "Yogurt 표시 위치",
"Menu bar and Dock": "메뉴 막대 및 Dock",
"Menu bar only": "메뉴 막대만",
- "Dock only": "Dock만"
+ "Dock only": "Dock만",
+ "Summary language": "요약 언어",
+ "Same as the meeting": "회의와 동일",
+ "Used for new summaries and when you write them again.": "새 요약과 다시 작성하는 요약에 사용됩니다."
}
diff --git a/app/src/shared/locales/ms.json b/app/src/shared/locales/ms.json
index 0b166ced..cfba6ef3 100644
--- a/app/src/shared/locales/ms.json
+++ b/app/src/shared/locales/ms.json
@@ -635,5 +635,8 @@
"Show Yogurt in": "Paparkan Yogurt di",
"Menu bar and Dock": "Bar menu dan Dock",
"Menu bar only": "Bar menu sahaja",
- "Dock only": "Dock sahaja"
+ "Dock only": "Dock sahaja",
+ "Summary language": "Bahasa ringkasan",
+ "Same as the meeting": "Sama seperti mesyuarat",
+ "Used for new summaries and when you write them again.": "Digunakan untuk ringkasan baharu dan apabila ditulis semula."
}
diff --git a/app/src/shared/locales/nb.json b/app/src/shared/locales/nb.json
index 7094fc47..d513b9f8 100644
--- a/app/src/shared/locales/nb.json
+++ b/app/src/shared/locales/nb.json
@@ -677,5 +677,8 @@
"Show Yogurt in": "Vis Yogurt i",
"Menu bar and Dock": "Menylinje og Dock",
"Menu bar only": "Bare menylinjen",
- "Dock only": "Bare Dock"
+ "Dock only": "Bare Dock",
+ "Summary language": "Oppsummeringsspråk",
+ "Same as the meeting": "Samme som møtet",
+ "Used for new summaries and when you write them again.": "Brukes til nye oppsummeringer og når du skriver dem på nytt."
}
diff --git a/app/src/shared/locales/nl.json b/app/src/shared/locales/nl.json
index 804d9d92..909baa90 100644
--- a/app/src/shared/locales/nl.json
+++ b/app/src/shared/locales/nl.json
@@ -677,5 +677,8 @@
"Show Yogurt in": "Yogurt weergeven in",
"Menu bar and Dock": "Menubalk en Dock",
"Menu bar only": "Alleen menubalk",
- "Dock only": "Alleen Dock"
+ "Dock only": "Alleen Dock",
+ "Summary language": "Taal van samenvattingen",
+ "Same as the meeting": "Dezelfde als de vergadering",
+ "Used for new summaries and when you write them again.": "Voor nieuwe samenvattingen en wanneer je ze opnieuw schrijft."
}
diff --git a/app/src/shared/locales/pl.json b/app/src/shared/locales/pl.json
index 1a0d7593..f278d456 100644
--- a/app/src/shared/locales/pl.json
+++ b/app/src/shared/locales/pl.json
@@ -713,5 +713,8 @@
"Show Yogurt in": "Pokaż Yogurt w",
"Menu bar and Dock": "Pasek menu i Dock",
"Menu bar only": "Tylko pasek menu",
- "Dock only": "Tylko Dock"
+ "Dock only": "Tylko Dock",
+ "Summary language": "Język podsumowań",
+ "Same as the meeting": "Taki jak na spotkaniu",
+ "Used for new summaries and when you write them again.": "Używany w nowych i ponownie tworzonych podsumowaniach."
}
diff --git a/app/src/shared/locales/pt-BR.json b/app/src/shared/locales/pt-BR.json
index da2ae619..a0caff1d 100644
--- a/app/src/shared/locales/pt-BR.json
+++ b/app/src/shared/locales/pt-BR.json
@@ -693,5 +693,8 @@
"Show Yogurt in": "Mostrar Yogurt em",
"Menu bar and Dock": "Barra de menus e Dock",
"Menu bar only": "Apenas barra de menus",
- "Dock only": "Apenas Dock"
+ "Dock only": "Apenas Dock",
+ "Summary language": "Idioma do resumo",
+ "Same as the meeting": "O mesmo da reunião",
+ "Used for new summaries and when you write them again.": "Usado em novos resumos e quando você os reescreve."
}
diff --git a/app/src/shared/locales/ro.json b/app/src/shared/locales/ro.json
index 6ee5e59d..fbb3334a 100644
--- a/app/src/shared/locales/ro.json
+++ b/app/src/shared/locales/ro.json
@@ -694,5 +694,8 @@
"Show Yogurt in": "Afișează Yogurt în",
"Menu bar and Dock": "Bara de meniu și Dock",
"Menu bar only": "Doar bara de meniu",
- "Dock only": "Doar Dock"
+ "Dock only": "Doar Dock",
+ "Summary language": "Limba rezumatului",
+ "Same as the meeting": "Aceeași ca în întâlnire",
+ "Used for new summaries and when you write them again.": "Folosită pentru rezumate noi și când le rescrii."
}
diff --git a/app/src/shared/locales/ru.json b/app/src/shared/locales/ru.json
index fd9f6b12..4de5ee3e 100644
--- a/app/src/shared/locales/ru.json
+++ b/app/src/shared/locales/ru.json
@@ -705,5 +705,8 @@
"Show Yogurt in": "Показывать Yogurt в",
"Menu bar and Dock": "Строка меню и Dock",
"Menu bar only": "Только строка меню",
- "Dock only": "Только Dock"
+ "Dock only": "Только Dock",
+ "Summary language": "Язык сводки",
+ "Same as the meeting": "Как на встрече",
+ "Used for new summaries and when you write them again.": "Используется для новых и повторно созданных сводок."
}
diff --git a/app/src/shared/locales/sv.json b/app/src/shared/locales/sv.json
index 6ac6854f..1ad1583f 100644
--- a/app/src/shared/locales/sv.json
+++ b/app/src/shared/locales/sv.json
@@ -677,5 +677,8 @@
"Show Yogurt in": "Visa Yogurt i",
"Menu bar and Dock": "Menyrad och Dock",
"Menu bar only": "Endast menyraden",
- "Dock only": "Endast Dock"
+ "Dock only": "Endast Dock",
+ "Summary language": "Sammanfattningsspråk",
+ "Same as the meeting": "Samma som mötet",
+ "Used for new summaries and when you write them again.": "Används för nya sammanfattningar och när du skriver om dem."
}
diff --git a/app/src/shared/locales/th.json b/app/src/shared/locales/th.json
index 69e04548..183d3041 100644
--- a/app/src/shared/locales/th.json
+++ b/app/src/shared/locales/th.json
@@ -635,5 +635,8 @@
"Show Yogurt in": "แสดง Yogurt ใน",
"Menu bar and Dock": "แถบเมนูและ Dock",
"Menu bar only": "แถบเมนูเท่านั้น",
- "Dock only": "Dock เท่านั้น"
+ "Dock only": "Dock เท่านั้น",
+ "Summary language": "ภาษาสรุป",
+ "Same as the meeting": "ภาษาเดียวกับการประชุม",
+ "Used for new summaries and when you write them again.": "ใช้สำหรับสรุปใหม่และเมื่อเขียนสรุปอีกครั้ง"
}
diff --git a/app/src/shared/locales/tr.json b/app/src/shared/locales/tr.json
index 0b2cf572..aa2a45f6 100644
--- a/app/src/shared/locales/tr.json
+++ b/app/src/shared/locales/tr.json
@@ -665,5 +665,8 @@
"Show Yogurt in": "Yogurt’u göster",
"Menu bar and Dock": "Menü çubuğu ve Dock",
"Menu bar only": "Yalnızca menü çubuğu",
- "Dock only": "Yalnızca Dock"
+ "Dock only": "Yalnızca Dock",
+ "Summary language": "Özet dili",
+ "Same as the meeting": "Toplantıyla aynı",
+ "Used for new summaries and when you write them again.": "Yeni özetlerde ve özetleri yeniden yazarken kullanılır."
}
diff --git a/app/src/shared/locales/uk.json b/app/src/shared/locales/uk.json
index 159dd3a0..36ea0b4d 100644
--- a/app/src/shared/locales/uk.json
+++ b/app/src/shared/locales/uk.json
@@ -705,5 +705,8 @@
"Show Yogurt in": "Показувати Yogurt у",
"Menu bar and Dock": "Рядок меню та Dock",
"Menu bar only": "Лише рядок меню",
- "Dock only": "Лише Dock"
+ "Dock only": "Лише Dock",
+ "Summary language": "Мова підсумку",
+ "Same as the meeting": "Як на зустрічі",
+ "Used for new summaries and when you write them again.": "Використовується для нових і повторно створених підсумків."
}
diff --git a/app/src/shared/locales/vi.json b/app/src/shared/locales/vi.json
index e90b2105..ff0e8a74 100644
--- a/app/src/shared/locales/vi.json
+++ b/app/src/shared/locales/vi.json
@@ -635,5 +635,8 @@
"Show Yogurt in": "Hiển thị Yogurt trong",
"Menu bar and Dock": "Thanh menu và Dock",
"Menu bar only": "Chỉ thanh menu",
- "Dock only": "Chỉ Dock"
+ "Dock only": "Chỉ Dock",
+ "Summary language": "Ngôn ngữ tóm tắt",
+ "Same as the meeting": "Giống cuộc họp",
+ "Used for new summaries and when you write them again.": "Dùng cho bản tóm tắt mới và khi bạn viết lại."
}
diff --git a/app/src/shared/locales/zh-CN.json b/app/src/shared/locales/zh-CN.json
index 56280c69..b20d15b8 100644
--- a/app/src/shared/locales/zh-CN.json
+++ b/app/src/shared/locales/zh-CN.json
@@ -635,5 +635,8 @@
"Show Yogurt in": "Yogurt 显示位置",
"Menu bar and Dock": "菜单栏和 Dock",
"Menu bar only": "仅菜单栏",
- "Dock only": "仅 Dock"
+ "Dock only": "仅 Dock",
+ "Summary language": "摘要语言",
+ "Same as the meeting": "与会议相同",
+ "Used for new summaries and when you write them again.": "用于新摘要和重新生成的摘要。"
}
diff --git a/app/src/shared/locales/zh-TW.json b/app/src/shared/locales/zh-TW.json
index 05ddb249..841dff52 100644
--- a/app/src/shared/locales/zh-TW.json
+++ b/app/src/shared/locales/zh-TW.json
@@ -635,5 +635,8 @@
"Show Yogurt in": "Yogurt 顯示位置",
"Menu bar and Dock": "選單列與 Dock",
"Menu bar only": "僅選單列",
- "Dock only": "僅 Dock"
+ "Dock only": "僅 Dock",
+ "Summary language": "摘要語言",
+ "Same as the meeting": "與會議相同",
+ "Used for new summaries and when you write them again.": "用於新摘要和重新產生的摘要。"
}
diff --git a/app/src/shared/types.ts b/app/src/shared/types.ts
index c4289e1b..4a8e24b2 100644
--- a/app/src/shared/types.ts
+++ b/app/src/shared/types.ts
@@ -249,7 +249,7 @@ export type YogurtApi = {
}
settings: {
/** myName: what the person is called in meetings (their Mac's full name, macName, when they never changed it) */
- get(): Promise<{ theme: Theme; openAtLogin: boolean; showInMenuBar: boolean; appVisibility: AppVisibility; /** the language picked; '' follows the Mac */ language: string; /** the language in use */ locale: string; /** the Mac's language, among Yogurt's */ systemLocale: string; myName: string; macName: string; /** a recording stops by itself when its call ends (off: ask first) */ stopWhenCallEnds: boolean; recordingReminder: boolean; keepRecordings: boolean; /** personal jargon, spelled as typed */ jargon: string[]; /** the language people speak in meetings */ spoken: import('./spoken').Spoken }>
+ get(): Promise<{ theme: Theme; openAtLogin: boolean; showInMenuBar: boolean; appVisibility: AppVisibility; /** the language picked; '' follows the Mac */ language: string; /** the language in use */ locale: string; /** the Mac's language, among Yogurt's */ systemLocale: string; myName: string; macName: string; /** a recording stops by itself when its call ends (off: ask first) */ stopWhenCallEnds: boolean; recordingReminder: boolean; keepRecordings: boolean; /** personal jargon, spelled as typed */ jargon: string[]; /** the language people speak in meetings */ spoken: import('./spoken').Spoken; /** default summary language; '' follows the meeting */ summaryLanguage: string }>
/** blank goes back to the Mac's full name */
setName(name: string): Promise<void>
setTheme(v: Theme): Promise<void>
@@ -263,6 +263,7 @@ export type YogurtApi = {
setJargon(terms: string[]): Promise<string[]>
/** the interface language ('' follows the Mac); gives back the one now in use */
setLanguage(id: string): Promise<string>
+ setSummaryLanguage(id: string): Promise<void>
/** every window hears the language change, wherever it was picked */
onLanguage(cb: (locale: string) => void): () => void
/** English only or Multi-language: the meeting being recorded and the next ones */
diff --git a/app/test/enhance.test.ts b/app/test/enhance.test.ts
index fb990c09..7010a246 100644
--- a/app/test/enhance.test.ts
+++ b/app/test/enhance.test.ts
@@ -386,3 +386,55 @@ it('excludes the owner in the shared title prompt and rejects names despite mode
segments: [seg('me', 0, 'Plan the release')], language: 'en', titleLater: a => { ask = a } }, llm, () => {})
expect(await ask(llm)).toBe('')
})
+
+describe('summary language preference', () => {
+ it.each([
+ { language: 'es', summaryLanguage: undefined, expected: 'Spanish' },
+ { language: null, summaryLanguage: '', expected: 'the language most of the transcript is in' },
+ { language: 'es', summaryLanguage: 'fr', expected: 'French' },
+ { language: null, summaryLanguage: 'zh-TW', expected: 'Chinese (Traditional)' },
+ { language: 'es', summaryLanguage: 'unknown', expected: 'Spanish' },
+ ])('uses $expected for notes, next steps and the deferred title', async ({ language, summaryLanguage, expected }) => {
+ const calls: Array<{ prompt: string; before?: string[] }> = []
+ const selected = summaryLanguage === 'fr' || summaryLanguage === 'zh-TW'
+ const llm: Llm = {
+ contextSize: 100_000, count: async (xs) => xs.map(words),
+ chat: async (prompt, onToken, o) => {
+ calls.push({ prompt, before: o?.before })
+ const reply = calls.length === 1 ? '## Plan\n- Ship Tuesday.' : calls.length === 2 ? '## Next steps\n- **You:** Send the plan.' : 'Shipping plan'
+ onToken(reply); return reply
+ },
+ }
+ let title!: (model: Llm) => Promise<string>
+ await enhance({ meeting: { title: '', attendees: [] }, mine: '', segments: [seg('me', 0, 'Send the plan.')], language, summaryLanguage, titleLater: (ask) => { title = ask } }, llm, () => {})
+ await title(llm)
+ expect(calls).toHaveLength(3)
+ expect(calls[0].prompt).toContain(selected ? `By default, write in ${expected}, headings too.` : `Write in ${expected}, headings too.`)
+ expect(calls[0].prompt).toContain(`"## Next steps" (in ${selected ? 'the same language as the rest of the notes' : expected})`)
+ if (selected) {
+ expect(calls[0].prompt).toContain('A rewrite note asking for another language takes precedence over this default.')
+ expect(calls[1].prompt).toContain('heading in the same language as the notes; write the bullets in that language too')
+ expect(calls[2].prompt).toContain('title, in the same language as the notes')
+ for (const call of calls.slice(1)) expect(call.prompt).not.toContain(expected)
+ } else {
+ expect(calls[0].prompt).not.toContain('By default')
+ expect(calls[1].prompt).toContain(`heading in ${language ? expected : 'the same language'}`)
+ expect(calls[2].prompt).toContain(`title, in ${language ? expected : 'the same language as the notes'}`)
+ }
+ for (const call of calls.slice(1)) expect(call.before).toEqual([calls[0].prompt, '## Plan\n- Ship Tuesday.'])
+ })
+
+ it('uses the selected language for final notes even when reusing meeting-language part summaries', async () => {
+ const segments = [seg('me', 0, 'Send the plan.')]
+ const prompts: string[] = []
+ const llm: Llm = {
+ contextSize: 100_000, count: async (xs) => xs.map(words),
+ chat: async (prompt) => { prompts.push(prompt); return '## Plan\n- **You:** Send it.' },
+ }
+ await enhance({ meeting: { title: '', attendees: [] }, mine: '', segments, language: 'es', summaryLanguage: 'de' }, llm, () => {}, undefined,
+ [{ lines: transcriptText(segments).split('\n'), summary: '### Plan\n- Enviar el plan.' }])
+ expect(prompts).toHaveLength(1)
+ expect(prompts[0]).toContain('Enviar el plan.')
+ expect(prompts[0]).toContain('By default, write in German')
+ })
+})
diff --git a/app/test/i18n-tables.test.ts b/app/test/i18n-tables.test.ts
index 657795c3..6333c060 100644
--- a/app/test/i18n-tables.test.ts
+++ b/app/test/i18n-tables.test.ts
@@ -266,3 +266,14 @@ it('translates the searched scope line in every locale', () => {
}
}
})
+
+it('translates the summary language setting in every locale', () => {
+ for (const key of ['Summary language', 'Same as the meeting', 'Used for new summaries and when you write them again.']) {
+ expect(keys).toContain(key)
+ for (const { id } of LOCALES) {
+ expect(load(id)[key]).toBeTypeOf('string')
+ expect(load(id)[key]).not.toBe('')
+ if (id !== 'en') expect(load(id)[key]).not.toBe(key)
+ }
+ }
+})
diff --git a/app/test/notes.test.ts b/app/test/notes.test.ts
index e73d002b..5e6b77b8 100644
--- a/app/test/notes.test.ts
+++ b/app/test/notes.test.ts
@@ -16,7 +16,7 @@ afterEach(() => {
})
const wait = (ms = 5) => new Promise((r) => setTimeout(r, ms))
-function setup(o: { me?: string; named?: () => Promise<void>; namesWaitMs?: number; reply?: string | ((prompt: string) => string); during?: () => void; load?: Promise<void>; title?: string; recording?: () => boolean; smallMac?: boolean; showLoading?: boolean } = {}) {
+function setup(o: { summaryLanguage?: () => string; me?: string; named?: () => Promise<void>; namesWaitMs?: number; reply?: string | ((prompt: string) => string); during?: () => void; load?: Promise<void>; title?: string; recording?: () => boolean; smallMac?: boolean; showLoading?: boolean } = {}) {
const d = mkdtempSync(join(tmpdir(), 'yogurt-notes-'))
dirs.push(d)
const store = openStore(join(d, 'yogurt.db'))
@@ -37,7 +37,7 @@ function setup(o: { me?: string; named?: () => Promise<void>; namesWaitMs?: numb
const queue = createQueue({ recording: o.recording ?? (() => false), smallMac: o.smallMac ?? false })
const notes = hookNotes({
store, queue, model: { llm: async () => { await o.load; return llm }, needsLoad: () => true }, showLoading: o.showLoading,
- transcribed: () => transcript, named: o.named, namesWaitMs: o.namesWaitMs, language: () => 'spanish',
+ transcribed: () => transcript, named: o.named, namesWaitMs: o.namesWaitMs, language: () => 'spanish', summaryLanguage: o.summaryLanguage,
onStop: (fn) => stops.push(fn), send: (v) => sent.push(v), changed: (id) => changed.push(id), peopleRewriteMs: 30, me: () => o.me ?? '',
})
return { store, m, notes, sent, prompts, changed, queue, stop: () => stops.forEach((f) => f(m)), transcribed }
@@ -475,3 +475,35 @@ it('still refreshes the auto title when an editor keeps changes over an attendee
expect(s.store.meeting(s.m.id)!.title).toBe('Planning with Guest')
expect(s.prompts.filter(p => p.startsWith('Now give this meeting a title'))).toHaveLength(1)
})
+
+it('reads the summary default for each new write without changing saved notes or the meeting language', async () => {
+ let language = 'fr'
+ const s = setup({ summaryLanguage: () => language, reply: '## Plan\n- **You:** Send the plan.' })
+ s.store.updateMeeting(s.m.id, { language: 'es' })
+ s.stop(); s.transcribed(); await s.notes.written(s.m.id)
+ expect(s.prompts[0]).toContain('By default, write in French')
+ const saved = s.store.notes(s.m.id)
+ language = 'de'
+ expect(s.notes.view(s.m.id).enhanced).toBe(saved.enhanced)
+ expect(s.prompts).toHaveLength(1)
+ await s.notes.writeAgain(s.m.id)
+ expect(s.prompts.at(-1)).toContain('By default, write in German')
+ language = ''
+ await s.notes.writeAgain(s.m.id)
+ expect(s.prompts.at(-1)).toContain('Write in Spanish')
+ expect(s.prompts.at(-1)).not.toContain('By default')
+ expect(s.store.meeting(s.m.id)?.language).toBe('es')
+})
+
+it('a title-only refresh follows the retained summary language when a default is selected', async () => {
+ const s = setup({ summaryLanguage: () => 'fr', reply: 'Plan de lancement' })
+ s.store.updateMeeting(s.m.id, { titleSource: 'auto', state: 'done', language: 'es' })
+ s.notes.setEnhanced(s.m.id, '## Plan\n- Envoyer le plan.')
+ s.notes.applyPeople(s.m.id)
+ await vi.waitFor(() => expect(s.store.meeting(s.m.id)?.title).toBe('Plan de lancement'))
+ expect(s.prompts).toHaveLength(1)
+ expect(s.prompts[0]).toContain('title, in the same language as the notes')
+ expect(s.prompts[0]).toContain('Envoyer le plan.')
+ expect(s.prompts[0]).not.toContain('Spanish')
+ expect(s.store.notes(s.m.id).enhanced).toBe('## Plan\n- Envoyer le plan.')
+})
diff --git a/app/test/summaryLanguage.test.ts b/app/test/summaryLanguage.test.ts
new file mode 100644
index 00000000..7a03a89c
--- /dev/null
+++ b/app/test/summaryLanguage.test.ts
@@ -0,0 +1,39 @@
+import { afterEach, expect, it, vi } from 'vitest'
+import { mkdtempSync, rmSync } from 'node:fs'
+import { tmpdir } from 'node:os'
+import { join } from 'node:path'
+
+const handlers = vi.hoisted(() => new Map<string, (...args: any[]) => any>())
+vi.mock('electron', () => ({ app: { getPreferredSystemLanguages: () => ['en-US'] }, ipcMain: { handle: (name: string, fn: (...args: any[]) => any) => handlers.set(name, fn) }, BrowserWindow: {}, nativeTheme: {} }))
+import { hookPreferences } from '../src/main/preferences'
+import { loadSettings, summaryLanguageSetting, updateSettings } from '../src/main/settings'
+import { LOCALES } from '../src/shared/i18n'
+
+const dirs: string[] = []
+afterEach(() => { dirs.splice(0).forEach((dir) => rmSync(dir, { recursive: true, force: true })); handlers.clear() })
+
+it('defaults to the meeting, validates IPC, persists every offered language and resets without changing other preferences', () => {
+ const dir = mkdtempSync(join(tmpdir(), 'yogurt-summary-language-')); dirs.push(dir)
+ const file = join(dir, 'settings.json')
+ const deps = { file, permissions: {} as Parameters<typeof hookPreferences>[0]['permissions'], ask: false, setLogin() {}, loginOn: () => false, macName: () => '', relaunch: () => false, setTrayVisible() {}, setDockVisible() {} }
+ hookPreferences(deps)
+ const get = () => handlers.get('settings:get')!()
+ const set = (value: unknown) => handlers.get('settings:summary-language')!(null, value)
+ expect(get().summaryLanguage).toBe('')
+ updateSettings(file, { language: 'ja', spoken: 'multi', theme: 'dark' })
+ for (const { id } of LOCALES) {
+ set(id)
+ hookPreferences(deps)
+ expect(get().summaryLanguage).toBe(id)
+ expect(summaryLanguageSetting(loadSettings(file))).toBe(id)
+ }
+ set('fr')
+ for (const value of [null, undefined, true, 1, {}, [], 'auto', 'xx', 'FR', 'fr-FR', ' French ']) set(value)
+ expect(get().summaryLanguage).toBe('fr')
+ set('')
+ expect(get()).toMatchObject({ summaryLanguage: '', language: 'ja', locale: 'ja', spoken: 'multi', theme: 'dark' })
+ expect(loadSettings(file)).toEqual({ language: 'ja', spoken: 'multi', theme: 'dark' })
+ updateSettings(file, { summaryLanguage: 'unavailable' })
+ expect(get().summaryLanguage).toBe('')
+ expect(summaryLanguageSetting(loadSettings(file))).toBe('')
+})