release: тема, готовые своды промпта, обучение словаря видно из плашки
This commit is contained in:
@@ -0,0 +1,62 @@
|
||||
// Тема интерфейса: системная или выбранная руками.
|
||||
//
|
||||
// Почему выбор, а не только системная. Владелец 07.09.2026: «необходимо
|
||||
// выбирать тёмный вариант, если это возможно. То есть тёмную тему тоже и
|
||||
// светлую можно выбирать в настройках». Довод тот же, что у языка: человек
|
||||
// держит macOS на автопереключении по времени суток, а конкретное окно хочет
|
||||
// видеть всегда одинаковым — и наоборот.
|
||||
//
|
||||
// Плашки это НЕ касается. Она висит поверх чужого окна и берёт системный вид:
|
||||
// навязать ей тёмное стекло на светлом столе значит поставить чёрный прямоугольник
|
||||
// посреди чужой работы.
|
||||
import AppKit
|
||||
|
||||
/// Ключ выбора темы. В том же домене, что и остальные настройки.
|
||||
public let IRIZ_APPEARANCE_KEY = "ru.iriz.interfaceAppearance"
|
||||
|
||||
public enum IrizAppearanceChoice: String, CaseIterable, Sendable {
|
||||
/// Как в системе. Заводское значение.
|
||||
case auto
|
||||
case light
|
||||
case dark
|
||||
|
||||
/// Имя для списка. По-русски: продукт написан по-русски, перевод берётся
|
||||
/// таблицей, как и всё остальное.
|
||||
public var title: String {
|
||||
switch self {
|
||||
case .auto: return L("appearance.auto", "Как в системе")
|
||||
case .light: return L("appearance.light", "Светлая")
|
||||
case .dark: return L("appearance.dark", "Тёмная")
|
||||
}
|
||||
}
|
||||
|
||||
/// Вид AppKit, который надо навязать. `nil` — не навязывать ничего.
|
||||
public var appearance: NSAppearance? {
|
||||
switch self {
|
||||
case .auto: return nil
|
||||
case .light: return NSAppearance(named: .aqua)
|
||||
case .dark: return NSAppearance(named: .darkAqua)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public func irizAppearanceChoice(defaults: UserDefaults = .standard) -> IrizAppearanceChoice {
|
||||
guard let raw = defaults.string(forKey: IRIZ_APPEARANCE_KEY),
|
||||
let choice = IrizAppearanceChoice(rawValue: raw) else { return .auto }
|
||||
return choice
|
||||
}
|
||||
|
||||
public func setIrizAppearanceChoice(_ choice: IrizAppearanceChoice,
|
||||
defaults: UserDefaults = .standard) {
|
||||
defaults.set(choice.rawValue, forKey: IRIZ_APPEARANCE_KEY)
|
||||
}
|
||||
|
||||
/// Применить выбор ко всему приложению.
|
||||
///
|
||||
/// Ставится на `NSApp`, а не на каждое окно: окон у продукта четыре, и держать
|
||||
/// в каждом свою копию правила значит однажды забыть одно из них. Плашка при
|
||||
/// этом свой вид задаёт сама и системного не теряет.
|
||||
@MainActor
|
||||
public func applyIrizAppearance(defaults: UserDefaults = .standard) {
|
||||
NSApp?.appearance = irizAppearanceChoice(defaults: defaults).appearance
|
||||
}
|
||||
@@ -22,23 +22,20 @@ public let IRIZ_SUBTLE = Color.primary.opacity(0.78)
|
||||
|
||||
/// Тон выбранной капсулы. Смешанный ЦВЕТ, а не accent с прозрачностью:
|
||||
/// `opacity` на стекле схлопывает преломление (правило G04 линтера).
|
||||
/// Золото Пантеона #C9A87A. Канон семьи живёт здесь, а не в системе.
|
||||
/// Тон выбранной строки: СИСТЕМНЫЙ акцент, разбавленный фоном окна.
|
||||
///
|
||||
/// Прежде тон подсветки брался у `NSColor.controlAccentColor` - то есть у
|
||||
/// НАСТРОЙКИ macOS. У владельца она синяя, и весь продукт подсвечивал выбор
|
||||
/// системным синим: боковик настроек, строки, сегменты меню. Отсюда и жалоба
|
||||
/// «сделана как будто бы не по канону» - канон в этом месте зависел от чужого
|
||||
/// переключателя и менялся вместе с ним.
|
||||
public let IRIZ_FAMILY_GOLD = NSColor(srgbRed: 0.788, green: 0.659, blue: 0.478, alpha: 1)
|
||||
/// Пробовали золотом семьи — владелец посмотрел живьём и отказал: «пусть будет
|
||||
/// системный, потому что, например, в анбординге на кнопке „Дальше“ системный».
|
||||
/// Довод сильнее вкуса: системные кнопки в окне никуда не делись, и второй
|
||||
/// акцент рядом с ними читается не каноном, а рассинхроном. Один акцент на
|
||||
/// поверхность — тот, который уже стоит на системных элементах.
|
||||
///
|
||||
/// Замер, из-за которого золото и не прижилось: `blended(0.45)` роняет
|
||||
/// насыщенность #C9A87A с 39 % до 20 % и даёт #D9C7AD — то, что владелец
|
||||
/// назвал «просто кремовый».
|
||||
public let IRIZ_SELECTION_TINT = Color(nsColor: NSColor.controlAccentColor.blended(
|
||||
withFraction: 0.45, of: .windowBackgroundColor) ?? .controlAccentColor)
|
||||
|
||||
/// Тон выбранной строки: золото семьи, разбавленное фоном окна. Разбавление
|
||||
/// оставлено - сквозь тон обязана просвечивать подложка, иначе строка
|
||||
/// перестаёт быть частью поверхности и становится наклейкой.
|
||||
public let IRIZ_SELECTION_TINT = Color(nsColor: IRIZ_FAMILY_GOLD.blended(
|
||||
withFraction: 0.45, of: .windowBackgroundColor) ?? IRIZ_FAMILY_GOLD)
|
||||
|
||||
/// Радиус подсветки строки. Один на продукт: в окне истории он был 8, в меню
|
||||
/// строки меню 5, в превью плашки 14.
|
||||
public let IRIZ_SELECTION_RADIUS: CGFloat = 9
|
||||
|
||||
// MARK: - Движение
|
||||
@@ -103,7 +100,7 @@ public struct IrizSelection: ViewModifier {
|
||||
} else if selected {
|
||||
content.background(
|
||||
RoundedRectangle(cornerRadius: IRIZ_SELECTION_RADIUS, style: .continuous)
|
||||
.fill(IRIZ_SELECTION_TINT)
|
||||
.fill(Color.accentColor)
|
||||
.matchedGeometryEffect(id: group, in: namespace)
|
||||
)
|
||||
} else {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* iriz interface, English */
|
||||
"firstrun.accessibility.body" = "To paste the text into an email or a chat, macOS needs a separate permission. It's called \"Accessibility\".";
|
||||
"firstrun.accessibility.note" = "Without it I'll still turn your speech into text, but there'll be nowhere to put it. Find iriz in the list that opens and turn on the switch: the system won't let me do that for you.";
|
||||
"firstrun.accessibility.note" = "Without it I'll still turn your speech into text, but there'll be nowhere to put it. Find iriz in the list that opens and turn on the switch: the system does not let me do it for you: only a human, with their own hands.";
|
||||
"firstrun.accessibility.title" = "Permission needed to paste text";
|
||||
"firstrun.agent.body" = "A separate key sends what you say to an outside agent instead of the text field: it turns rambling speech into a finished task and hands the text back.";
|
||||
"firstrun.agent.note" = "This is where \"it all runs on your Mac\" ends: the agent is a separate program, and what you say goes there. So the mode stays off until you turn it on yourself.\n\nI looked for agents already installed on your Mac. You can skip this and come back to it in Settings.";
|
||||
@@ -25,7 +25,7 @@
|
||||
"firstrun.microphone.title" = "Microphone needed";
|
||||
"firstrun.model.action" = "Download model";
|
||||
"firstrun.model.body" = "I turn speech into text right on your Mac, no internet. For that I need a model: half a gigabyte, downloaded once.";
|
||||
"firstrun.model.note" = "It's left out of the app on purpose. The model updates more often than the app ships, so it's better to grab a fresh one now than to carry last year's around.\n\nWhile it downloads, keep going: you can grant the permissions right now.";
|
||||
"firstrun.model.note" = "It is deliberately not inside the disk image: the model updates more often than iriz itself. Keep it separate: otherwise an outdated one would ship along with the program.\n\nCarry on while it downloads: you can grant the permissions right now.";
|
||||
"firstrun.model.title" = "Let's get the speech model";
|
||||
"firstrun.modelFailedRetry" = "Try again";
|
||||
"firstrun.modelReady" = "Model is in place";
|
||||
@@ -55,10 +55,10 @@
|
||||
"firstrun.welcome.note" = "It all runs right on your Mac. No audio, no text leaves it.";
|
||||
"firstrun.welcome.title" = "You talk, I type";
|
||||
"firstrun.whenItBreaks.body" = "Text didn't paste? It isn't lost. The badge expands and shows it, and you can copy it from there.";
|
||||
"firstrun.whenItBreaks.note" = "Did I hear a word wrong? Fix it in the dictionary and I'll write it right from then on.\n\nThis window, settings and history open from the menu bar icon.";
|
||||
"firstrun.whenItBreaks.note" = "Misheard a word? Just correct it right in the text. I notice the edit and ask whether to remember it: say yes, and from then on I write it your way. I never put anything into the dictionary on my own.\n\nKey taken by another app? Click it in the settings and set your own shortcut.\n\nThis window, the settings and the history all open from the icon in the menu bar.";
|
||||
"firstrun.whenItBreaks.title" = "If something goes wrong";
|
||||
"firstrun.whereItLives.body" = "I don't have a window of my own, and I'm not in the Dock. My icon is up in the top right, next to the clock.";
|
||||
"firstrun.whereItLives.note" = "History, dictionary and settings open from there.\n\nI start up with your Mac. Don't want that? Turn it off in settings.";
|
||||
"firstrun.whereItLives.body" = "Do not look for me in the Dock: my icon is at the top right, next to the clock. Click it and the menu opens.";
|
||||
"firstrun.whereItLives.note" = "History, replacements, settings and meeting recording all open from that menu. It also shows what I am busy with right now.\n\nI start together with your Mac. Do not want that: turn it off in the settings.";
|
||||
"firstrun.whereItLives.title" = "I live in the menu bar";
|
||||
"firstrun.windowTitle" = "Meet iriz";
|
||||
"history.cancel" = "Cancel";
|
||||
@@ -263,4 +263,19 @@
|
||||
"key.right" = "right";
|
||||
"firstrun.plate.title" = "The plate is always on screen";
|
||||
"firstrun.plate.body" = "A glass drop sits at the bottom of your screen. While you are silent it stays small and does nothing. Start talking and a wave runs through it: that is the answer to «can it hear me».";
|
||||
"firstrun.plate.note" = "Point at it with the mouse and the drop opens into a row of buttons: record, prompt, translate, language, history, settings. Click it and a panel with the text opens.\n\nYou can drag the plate: it snaps to one of twelve spots along the edges of the screen. There are three ways out of the open panel — the cross, Escape, and a click past the buttons.";
|
||||
"firstrun.plate.note" = "Point at it with the mouse and the drop opens into a row of buttons: record, prompt, translate, language, history, settings. Click it and a panel with the text opens.\n\nYou can drag the plate: it snaps to one of twelve spots along the edges of the screen. There are three ways out of the open panel: the cross, Escape, and a click past the buttons.";
|
||||
"settings.napominaniyaNaPlashke" = "Reminders on the plate";
|
||||
"settings.napominaniyaNapominayutKlavishu" = "The reminders name the key that ends the recording, and Escape for cancelling. Off by default: there is no point naming the key you are holding under your finger, and the words cover the wave — the thing the plate exists for. Turn them on for the first few days if that feels calmer.";
|
||||
"settings.klikniPoSochetaniyuChtoby" = "Click the shortcut on the right and press a new one — it gets recorded. The shortcut works right after you press Save. To undo a switch, press the conversion shortcut once more.";
|
||||
"firstrun.changeKeyHint" = "Key already taken? Click it and set your own shortcut";
|
||||
"settings.skachatShablon" = "Download a template";
|
||||
"settings.skachatShablonSlovarya" = "Download a dictionary file template with examples";
|
||||
"settings.shablonSlovarya" = "Dictionary template";
|
||||
"settings.shablonZapisanZapolnite" = "The template is saved. Fill it in and come back here with the Import button.";
|
||||
"settings.temaInterfeysa" = "Interface theme";
|
||||
"settings.temaMenyaetsyaSrazu" = "The theme changes right away, no restart needed. This does not touch the plate: it floats above someone else's window and follows the system. Dark glass on a light desktop would be a black rectangle in the middle of someone else's work.";
|
||||
"appearance.auto" = "Same as the system";
|
||||
"appearance.light" = "Light";
|
||||
"appearance.dark" = "Dark";
|
||||
"settings.gotovyeSvody" = "Ready-made sets:";
|
||||
"settings.svodPodstavlenPravte" = "The set is in. Edit it to taste and press Save.";
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/* iriz 界面,简体中文 */
|
||||
|
||||
"firstrun.accessibility.body" = "要把整理好的文字放进邮件或聊天窗口,macOS 需要单独的权限,叫「辅助功能」。";
|
||||
"firstrun.accessibility.note" = "没有它,我能把你说的话转成文字,却没地方放。在打开的列表里找到 iriz,把开关打开:这一步系统不让我替你做。";
|
||||
"firstrun.accessibility.note" = "没有它,我照样把你的话变成文字,但没地方放。在打开的列表里找到 iriz 并打开开关:系统不让我替你做这件事::只能由人亲手来。";
|
||||
"firstrun.accessibility.title" = "需要插入文字的权限";
|
||||
"firstrun.agent.body" = "另一个按键不会把你说的话送进输入框,而是交给外部智能体:它把零散的话理成一份任务,再把文字送回来。";
|
||||
"firstrun.agent.note" = "到这里,「一切都在你的 Mac 上完成」就结束了:智能体是另一个程序,你说的话会送到那里去。所以这个模式默认关着,除非你自己打开。\n\n我找了找你电脑上已经装好的智能体。也可以先不选,以后在设置里再挑。";
|
||||
@@ -26,7 +26,7 @@
|
||||
"firstrun.microphone.title" = "需要麦克风";
|
||||
"firstrun.model.action" = "下载模型";
|
||||
"firstrun.model.body" = "语音就在你的 Mac 上识别,不联网。这需要一个模型:500 MB,只下一次。";
|
||||
"firstrun.model.note" = "安装包里故意没带它。模型更新得比程序发版还勤,与其一直背着去年的,不如现在就拿新的。\n\n它下载的时候你接着往下走:权限现在就能给。";
|
||||
"firstrun.model.note" = "它故意不放在磁盘映像里:模型的更新比 iriz 本身勤。分开放::不然随程序一起来的就是过时的那个。\n\n下载的时候继续往下走:权限现在就能给。";
|
||||
"firstrun.model.title" = "下载语音识别";
|
||||
"firstrun.modelFailedRetry" = "重试";
|
||||
"firstrun.modelReady" = "模型已就位";
|
||||
@@ -56,10 +56,10 @@
|
||||
"firstrun.welcome.note" = "所有处理都在你的 Mac 上完成。声音和文字都不会发到任何地方。";
|
||||
"firstrun.welcome.title" = "你说,我来打字";
|
||||
"firstrun.whenItBreaks.body" = "文字没插进去?它没丢。提示条会展开把它显示出来,可以从那里复制。";
|
||||
"firstrun.whenItBreaks.note" = "有词听错了?在词库里改一下,之后我就会写对。\n\n这个窗口、设置和历史记录都从菜单栏的图标里打开。";
|
||||
"firstrun.whenItBreaks.note" = "有个词听错了?直接在文字里改掉就行。我会注意到这处修改,并问你要不要记住:你同意了,之后我就照你的写法来。我不会自己往词典里放任何东西。\n\n按键被别的程序占用了?在设置里点它,设你自己的组合。\n\n这个窗口、设置和历史,都从菜单栏的图标打开。";
|
||||
"firstrun.whenItBreaks.title" = "要是出了问题";
|
||||
"firstrun.whereItLives.body" = "我没有单独的窗口,程序坞里也别找。我的图标在右上角,时钟旁边。";
|
||||
"firstrun.whereItLives.note" = "历史记录、词库和设置都从那里打开。\n\n我会跟着 Mac 一起启动。不需要的话,在设置里关掉。";
|
||||
"firstrun.whereItLives.body" = "别在程序坞里找我:我的图标在右上角,时钟旁边。点一下,菜单就打开了。";
|
||||
"firstrun.whereItLives.note" = "历史、替换词典、设置和会议录制都从那个菜单打开。那里也能看到我此刻在忙什么。\n\n我会随 Mac 一起启动。不需要就在设置里关掉。";
|
||||
"firstrun.whereItLives.title" = "我住在菜单栏里";
|
||||
"firstrun.windowTitle" = "认识 iriz";
|
||||
"history.cancel" = "取消";
|
||||
@@ -264,4 +264,19 @@
|
||||
"key.right" = "右";
|
||||
"firstrun.plate.title" = "浮窗一直在屏幕上";
|
||||
"firstrun.plate.body" = "屏幕下方有一颗玻璃小水滴。你不说话时它很小,什么也不做。一开口,里面就有声波流动:这就是“它有没有听见我”的答案。";
|
||||
"firstrun.plate.note" = "把鼠标移上去,水滴会展开成一排按钮:录音、提示词、翻译、语言、历史、设置。点一下,会打开带文字的面板。\n\n浮窗可以拖动,它会吸附到屏幕边缘十二个位置之一。展开的面板有三种关法——叉号、Escape,以及点在按钮以外的地方。";
|
||||
"firstrun.plate.note" = "把鼠标移上去,水滴会展开成一排按钮:录音、提示词、翻译、语言、历史、设置。点一下,会打开带文字的面板。\n\n浮窗可以拖动,它会吸附到屏幕边缘十二个位置之一。展开的面板有三种关法::叉号、Escape,以及点在按钮以外的地方。";
|
||||
"settings.napominaniyaNaPlashke" = "浮窗上的提示";
|
||||
"settings.napominaniyaNapominayutKlavishu" = "提示会告诉你结束录音的那个键,以及取消用的 Escape。默认关闭:手指正按着的键不需要再说一遍,而这些字会盖住声波——浮窗存在的意义就是那条波。头几天想稳一点,可以打开。";
|
||||
"settings.klikniPoSochetaniyuChtoby" = "点右边的快捷键,然后按下新的组合——它就被记下了。点“存储”后快捷键立即生效。要撤销一次切换,再按一次转换快捷键。";
|
||||
"firstrun.changeKeyHint" = "这个键被占用了?点它,设你自己的组合";
|
||||
"settings.skachatShablon" = "下载模板";
|
||||
"settings.skachatShablonSlovarya" = "下载带示例的词典文件模板";
|
||||
"settings.shablonSlovarya" = "词典模板";
|
||||
"settings.shablonZapisanZapolnite" = "模板已保存。填好之后,用“导入”按钮回到这里。";
|
||||
"settings.temaInterfeysa" = "界面主题";
|
||||
"settings.temaMenyaetsyaSrazu" = "主题立即生效,不用重启。这不影响浮窗:它浮在别人的窗口之上,跟随系统。浅色桌面上的深色玻璃会变成别人工作中间的一块黑方块。";
|
||||
"appearance.auto" = "跟随系统";
|
||||
"appearance.light" = "浅色";
|
||||
"appearance.dark" = "深色";
|
||||
"settings.gotovyeSvody" = "现成的规则集:";
|
||||
"settings.svodPodstavlenPravte" = "规则集已填入。按你的需要改,然后点“存储”。";
|
||||
|
||||
Reference in New Issue
Block a user