feat: implement task management store with IPC integration
- Added a new task store in `src-react/stores/task.ts` to manage tasks and their statuses. - Implemented functions for creating, executing, and retrying tasks, along with handling task progress and completion. - Introduced persistence for tasks using IPC. - Created utility functions for normalizing room types and building subtasks. - Added a new CSS file for global styles in `src-react/styles.css`. - Created runtime types in `src-react/types/runtime.ts` and exported them. - Updated the main entry points for Vue and React applications to support dynamic framework loading. - Refactored chat model interfaces and utility functions into `src/shared/chat-model.ts`. - Updated TypeScript configuration to include paths for React components and types. - Enhanced Vite configuration to support both Vue and React frameworks.
This commit is contained in:
112
src-react/i18n/messages.ts
Normal file
112
src-react/i18n/messages.ts
Normal file
@@ -0,0 +1,112 @@
|
||||
import type { LanguageCode } from '../types/runtime';
|
||||
|
||||
export interface MessageTree {
|
||||
[key: string]: string | number | MessageTree;
|
||||
}
|
||||
|
||||
export type I18nMessages = Record<LanguageCode, MessageTree>;
|
||||
|
||||
export const messages: I18nMessages = {
|
||||
en: {
|
||||
app: {
|
||||
title: 'ZN-AI',
|
||||
},
|
||||
window: {
|
||||
minimize: 'Minimize',
|
||||
maximize: 'Maximize',
|
||||
restore: 'Restore',
|
||||
close: 'Close',
|
||||
},
|
||||
dialog: {
|
||||
cancel: 'Cancel',
|
||||
confirm: 'Confirm',
|
||||
},
|
||||
theme: {
|
||||
light: 'Light',
|
||||
dark: 'Dark',
|
||||
system: 'System',
|
||||
},
|
||||
language: {
|
||||
zh: 'Chinese',
|
||||
en: 'English',
|
||||
ja: 'Japanese',
|
||||
},
|
||||
common: {
|
||||
loading: 'Loading...',
|
||||
retry: 'Retry',
|
||||
unknownError: 'Unknown error',
|
||||
},
|
||||
conversation: {
|
||||
newConversation: 'New conversation',
|
||||
emptyState: 'No messages yet',
|
||||
},
|
||||
},
|
||||
zh: {
|
||||
app: {
|
||||
title: 'ZN-AI',
|
||||
},
|
||||
window: {
|
||||
minimize: '最小化',
|
||||
maximize: '最大化',
|
||||
restore: '还原',
|
||||
close: '关闭',
|
||||
},
|
||||
dialog: {
|
||||
cancel: '取消',
|
||||
confirm: '确认',
|
||||
},
|
||||
theme: {
|
||||
light: '浅色',
|
||||
dark: '深色',
|
||||
system: '跟随系统',
|
||||
},
|
||||
language: {
|
||||
zh: '中文',
|
||||
en: '英文',
|
||||
ja: '日语',
|
||||
},
|
||||
common: {
|
||||
loading: '加载中...',
|
||||
retry: '重试',
|
||||
unknownError: '未知错误',
|
||||
},
|
||||
conversation: {
|
||||
newConversation: '新建对话',
|
||||
emptyState: '暂无消息',
|
||||
},
|
||||
},
|
||||
ja: {
|
||||
app: {
|
||||
title: 'ZN-AI',
|
||||
},
|
||||
window: {
|
||||
minimize: '最小化',
|
||||
maximize: '最大化',
|
||||
restore: '復元',
|
||||
close: '閉じる',
|
||||
},
|
||||
dialog: {
|
||||
cancel: 'キャンセル',
|
||||
confirm: '確認',
|
||||
},
|
||||
theme: {
|
||||
light: 'ライト',
|
||||
dark: 'ダーク',
|
||||
system: 'システムに従う',
|
||||
},
|
||||
language: {
|
||||
zh: '中国語',
|
||||
en: '英語',
|
||||
ja: '日本語',
|
||||
},
|
||||
common: {
|
||||
loading: '読み込み中...',
|
||||
retry: '再試行',
|
||||
unknownError: '不明なエラー',
|
||||
},
|
||||
conversation: {
|
||||
newConversation: '新しい会話',
|
||||
emptyState: 'メッセージはまだありません',
|
||||
},
|
||||
},
|
||||
};
|
||||
Reference in New Issue
Block a user