dsh-better-chat/src/client/settings-copy.ts

84 lines
3.9 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

export type SettingsCopyKey =
| 'nav'
| 'openTitle'
| 'openDescription'
| 'glassTitle'
| 'glassDescription'
| 'foldTitle'
| 'foldDescription'
| 'foldNone'
| 'foldStandard'
| 'foldSummary'
| 'shortcutTitle'
| 'shortcutDescription'
| 'shortcutAllow'
| 'shortcutAlways'
| 'shortcutReject'
| 'shortcutRecording'
| 'shortcutDisabled'
| 'shortcutDisable'
| 'shortcutReset'
| 'shortcutErrorKey'
| 'shortcutErrorModifier'
| 'shortcutErrorConflict';
export type SettingsCopy = Record<SettingsCopyKey, string>;
export const en: SettingsCopy = {
nav: 'Better Chat',
openTitle: 'Open deliverables in built-in panel',
openDescription: 'Off by default: chips and inline file mentions open in the system app. Turn this on to preview them in the right Sidebar, matching official chat. Reveal and folder actions still use the system file manager.',
glassTitle: 'Translucent frosted glass',
glassDescription: 'Off by default: reading chrome stays opaque, matching the current Host look. Turn this on to let wallpaper and skins show through the panel; path and count chips stay clear until hover or focus.',
foldTitle: 'Auto-fold process',
foldDescription: 'Default on: collapses earlier steps when new thoughts appear. Turn off to keep all thinking and tools expanded in full.',
foldNone: 'Off',
foldStandard: 'On',
foldSummary: 'Summary',
shortcutTitle: 'Approval card shortcuts',
shortcutDescription: 'Click a keycap and press the new combination. Allow-type actions use Enter, reject uses Esc; modifiers are free. Esc alone cancels while recording. Stored in the plugin config.',
shortcutAllow: 'Allow once',
shortcutAlways: 'Always allow',
shortcutReject: 'Reject',
shortcutRecording: 'Press keys…',
shortcutDisabled: 'Not set',
shortcutDisable: 'Clear',
shortcutReset: 'Restore defaults',
shortcutErrorKey: 'Allow actions must use Enter; reject must use Esc.',
shortcutErrorModifier: 'Always allow needs at least one modifier key.',
shortcutErrorConflict: 'That combination is already used by another action.',
};
export const zh: SettingsCopy = {
nav: 'Better Chat',
openTitle: '在内置面板中打开产物',
openDescription: '默认关闭:产物芯片和正文中的文件提及会用系统应用打开。打开后与官方对话一致,在右侧栏预览。访达 / 资源管理器中的显示与打开所在文件夹不受此开关控制。',
glassTitle: '半透明毛玻璃',
glassDescription: '默认关闭:阅读栏保持不透明,和现在的 Host 观感一致。打开后透出宿主壁纸与皮肤;路径、行数等标签静止时透明,悬停或聚焦才显出轮廓。',
foldTitle: '自动折叠过程',
foldDescription: '默认开启:新思考产生时自动折叠此前步骤。关闭后全程展开,完整保留原始思考与工具流。',
foldNone: '关闭',
foldStandard: '开启',
foldSummary: '摘要',
shortcutTitle: '审批卡快捷键',
shortcutDescription: '点键帽后按下新的组合键。允许类只能用 Enter,拒绝只能用 Esc,修饰键随意;录制时单独按 Esc 取消。保存在插件配置里,重启后仍在。',
shortcutAllow: '允许(单次)',
shortcutAlways: '始终允许',
shortcutReject: '拒绝',
shortcutRecording: '按下组合键…',
shortcutDisabled: '未设置',
shortcutDisable: '清除',
shortcutReset: '恢复默认',
shortcutErrorKey: '允许类动作只能用 Enter,拒绝只能用 Esc。',
shortcutErrorModifier: '「始终允许」至少需要一个修饰键(Ctrl/Shift/Alt)。',
shortcutErrorConflict: '这个组合键已经被另一个动作占用。',
};
export function settingsLanguage(tag: string | undefined): 'zh' | 'en' {
return (tag ?? '').toLowerCase().startsWith('zh') ? 'zh' : 'en';
}
export function settingsCopyFor(tag: string | undefined): SettingsCopy {
return settingsLanguage(tag) === 'zh' ? zh : en;
}