diff --git a/global.d.ts b/global.d.ts index 0943544..c923813 100644 --- a/global.d.ts +++ b/global.d.ts @@ -32,6 +32,10 @@ declare global { params: [time: string] return: void } + [IPC_EVENTS.RENDERER_IS_READY]: { + params: [] + return: void + } [IPC_EVENTS.CUSTOM_EVENT]: { params: [message: string] return: void diff --git a/locales/en.json b/locales/en.json index 1797133..70680f3 100644 --- a/locales/en.json +++ b/locales/en.json @@ -1,3 +1,143 @@ { - + "window": { + "minimize": "Minimize", + "maximize": "Maximize", + "restore": "Restore", + "close": "Close" + }, + "main": { + "welcome": { + "helloMessage": "Hello, I'm Diona" + }, + "conversation": { + "placeholder": "Type a message...", + "newConversation": "New Conversation", + "selectModel": "Please select model", + "createConversation": "Create Conversation", + "searchPlaceholder": "Search conversations...", + "goSettings": "Go to", + "settings": "Settings Window", + "addModel": "to add a model", + "dialog": { + "title": "Confirm Deletion", + "content": "Are you sure you want to delete this conversation?", + "content_1": "Are you sure you want to delete the selected conversations? This action cannot be undone." + }, + "operations": { + "pin": "Pin Selected", + "del": "Delete Selected", + "selectAll": "Select All", + "cancel": "Cancel" + } + }, + "sidebar": { + "conversations": "Conversations", + "settings": "Settings", + "help": "Help" + }, + "message": { + "dialog": { + "title": "Confirm Deletion", + "messageDelete": "Are you sure you want to delete this message?", + "batchDelete": "Are you sure you want to delete the selected messages?", + "copySuccess": "Copied successfully" + }, + "batchActions": { + "deleteSelected": "Delete Selected" + }, + "rendering": "Thinking...", + "stoppedGeneration": "(Stopped generating)", + "sending": "Sending", + "stopGeneration": "Stop generating", + "send": "Send" + } + }, + "dialog": { + "cancel": "Cancel", + "confirm": "Confirm" + }, + "settings": { + "title": "Settings", + "base": "Basic Settings", + "provider": { + "modelConfig": "Model Configuration" + }, + "theme": { + "label": "Theme Settings", + "dark": "Dark Theme", + "light": "Light Theme", + "system": "System Theme", + "primaryColor": "Primary Color" + }, + "appearance": { + "fontSize": "Font Size", + "fontSizeOptions": { + "10": "Tiny (10px)", + "12": "Small (12px)", + "14": "Normal (14px)", + "16": "Medium (16px)", + "18": "Large (18px)", + "20": "Larger (20px)", + "24": "Extra Large (24px)" + } + }, + "behavior": { + "minimizeToTray": "Minimize to tray when closed" + }, + "language": { + "label": "Language" + }, + "providers": { + "defaultModel": "Default Model", + "apiKey": "API Key", + "apiUrl": "API URL" + } + }, + "menu": { + "conversation": { + "newConversation": "New Conversation", + "sortBy": "Sort By", + "sortByCreateTime": "Sort by Creation Time", + "sortByUpdateTime": "Sort by Update Time", + "sortByName": "Sort by Name", + "sortByModel": "Sort by Model", + "sortAscending": "Ascending", + "sortDescending": "Descending", + "pinConversation": "Pin Conversation", + "unpinConversation": "Unpin Conversation", + "renameConversation": "Rename Conversation", + "delConversation": "Delete Conversation", + "batchOperations": "Batch Operations" + }, + "message": { + "copyMessage": "Copy Message", + "deleteMessage": "Delete Message", + "selectMessage": "Select Message" + } + }, + "tray": { + "tooltip": "Diona Application", + "showWindow": "Show Window", + "exit": "Exit" + }, + "timeAgo": { + "justNow": "Just now", + "minutes": "{count} minutes ago", + "hours": "{count} hours ago", + "days": "{count} days ago", + "months": "{count} months ago", + "years": "{count} years ago", + "weekday": { + "sun": "Sunday", + "mon": "Monday", + "tue": "Tuesday", + "wed": "Wednesday", + "thu": "Thursday", + "fri": "Friday", + "sat": "Saturday" + } + }, + "app": { + "title": "Diona Application" + } } diff --git a/locales/zh.json b/locales/zh.json index 1797133..78a9c7a 100644 --- a/locales/zh.json +++ b/locales/zh.json @@ -1,3 +1,143 @@ { - + "window": { + "minimize": "最小化", + "maximize": "最大化", + "restore": "还原", + "close": "关闭" + }, + "main": { + "welcome": { + "helloMessage": "你好,我是迪奥娜" + }, + "conversation": { + "placeholder": "输入消息...", + "newConversation": "新对话", + "selectModel": "请选择模型", + "createConversation": "创建对话", + "searchPlaceholder": "搜索对话...", + "goSettings": "快去", + "settings": "设置窗口", + "addModel": "添加模型", + "dialog": { + "title": "确认删除", + "content": "确定要删除这个对话吗?", + "content_1": "确定要删除选中的对话吗?此操作不可撤销。" + }, + "operations": { + "pin": "置顶所选", + "del": "删除所选", + "selectAll": "全选", + "cancel": "取消" + } + }, + "sidebar": { + "conversations": "对话", + "settings": "设置", + "help": "帮助" + }, + "message": { + "dialog": { + "title": "确认删除", + "messageDelete": "确认删除该条消息?", + "batchDelete": "确认删除选中的消息?", + "copySuccess": "复制成功" + }, + "batchActions": { + "deleteSelected": "删除选中项" + }, + "rendering": "思考中...", + "stoppedGeneration": "(已停止生成)", + "sending": "发送中", + "stopGeneration": "停止生成", + "send": "发送" + } + }, + "dialog": { + "cancel": "取消", + "confirm": "确认" + }, + "settings": { + "title": "设置", + "base": "基础设置", + "provider": { + "modelConfig": "模型配置" + }, + "providers": { + "defaultModel": "默认模型", + "apiKey": "API密钥", + "apiUrl": "API地址" + }, + "theme": { + "label": "主题设置", + "dark": "深色主题", + "light": "浅色主题", + "system": "跟随系统", + "primaryColor": "主题颜色" + }, + "appearance": { + "fontSize": "字体大小", + "fontSizeOptions": { + "10": "极小 (10px)", + "12": "小 (12px)", + "14": "正常 (14px)", + "16": "中 (16px)", + "18": "大 (18px)", + "20": "较大 (20px)", + "24": "超大 (24px)" + } + }, + "behavior": { + "minimizeToTray": "关闭时最小化到托盘" + }, + "language": { + "label": "语言设置" + } + }, + "menu": { + "conversation": { + "newConversation": "新建对话", + "sortBy": "排序方式", + "sortByCreateTime": "按创建时间排序", + "sortByUpdateTime": "按更新时间排序", + "sortByName": "按名称排序", + "sortByModel": "按模型排序", + "sortAscending": "递增", + "sortDescending": "递减", + "pinConversation": "置顶对话", + "unpinConversation": "取消置顶", + "renameConversation": "重命名对话", + "delConversation": "删除对话", + "batchOperations": "批量操作" + }, + "message": { + "copyMessage": "复制消息", + "deleteMessage": "删除消息", + "selectMessage": "选择消息" + } + }, + "tray": { + "tooltip": "迪奥娜", + "showWindow": "显示窗口", + "exit": "退出" + }, + "timeAgo": { + "justNow": "刚刚", + "minutes": "{count}分钟前", + "hours": "{count}小时前", + "days": "{count}天前", + "months": "{count}个月前", + "years": "{count}年前", + "weekday": { + "sun": "星期日", + "mon": "星期一", + "tue": "星期二", + "wed": "星期三", + "thu": "星期四", + "fri": "星期五", + "sat": "星期六" + } + }, + "app": { + "title": "迪奥娜" + } } diff --git a/src/renderer/auto-imports.d.ts b/src/renderer/auto-imports.d.ts index a0380aa..57d61b8 100644 --- a/src/renderer/auto-imports.d.ts +++ b/src/renderer/auto-imports.d.ts @@ -192,6 +192,7 @@ declare global { const useFullscreen: typeof import('@vueuse/core').useFullscreen const useGamepad: typeof import('@vueuse/core').useGamepad const useGeolocation: typeof import('@vueuse/core').useGeolocation + const useI18n: typeof import('vue-i18n').useI18n const useId: typeof import('vue').useId const useIdle: typeof import('@vueuse/core').useIdle const useImage: typeof import('@vueuse/core').useImage diff --git a/src/renderer/components/HeaderBar/index.vue b/src/renderer/components/HeaderBar/index.vue index 8888b30..9dcbee0 100644 --- a/src/renderer/components/HeaderBar/index.vue +++ b/src/renderer/components/HeaderBar/index.vue @@ -5,14 +5,14 @@
- + - + - +