cc-cast 1.3.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +202 -0
- package/README.zh-CN.md +202 -0
- package/dist/claude.d.ts +3 -0
- package/dist/claude.js +27 -0
- package/dist/i18n/en.d.ts +3 -0
- package/dist/i18n/en.js +139 -0
- package/dist/i18n/index.d.ts +6 -0
- package/dist/i18n/index.js +36 -0
- package/dist/i18n/zh.d.ts +120 -0
- package/dist/i18n/zh.js +139 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +1060 -0
- package/dist/store/cc-switch.d.ts +13 -0
- package/dist/store/cc-switch.js +114 -0
- package/dist/store/interface.d.ts +1 -0
- package/dist/store/interface.js +1 -0
- package/dist/store/standalone.d.ts +9 -0
- package/dist/store/standalone.js +65 -0
- package/dist/types.d.ts +17 -0
- package/dist/types.js +1 -0
- package/dist/utils.d.ts +6 -0
- package/dist/utils.js +42 -0
- package/package.json +37 -0
- package/src/claude.ts +32 -0
- package/src/i18n/en.ts +161 -0
- package/src/i18n/index.ts +44 -0
- package/src/i18n/zh.ts +160 -0
- package/src/index.ts +1149 -0
- package/src/store/cc-switch.ts +145 -0
- package/src/store/interface.ts +1 -0
- package/src/store/standalone.ts +80 -0
- package/src/types.ts +19 -0
- package/src/utils.ts +47 -0
- package/tsconfig.json +14 -0
package/src/i18n/zh.ts
ADDED
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
const zh = {
|
|
2
|
+
// program
|
|
3
|
+
"program.description": "Claude Code Model Switcher - 快速切换 Claude Code 自定义模型配置",
|
|
4
|
+
|
|
5
|
+
// common
|
|
6
|
+
"common.not_init": "尚未初始化,请先运行: cc-cast init",
|
|
7
|
+
"common.model": "模型",
|
|
8
|
+
"common.model_default": "默认",
|
|
9
|
+
"common.source": "来源",
|
|
10
|
+
"common.cancelled": "已取消",
|
|
11
|
+
|
|
12
|
+
// error
|
|
13
|
+
"error.not_found": '配置 "{name}" 不存在',
|
|
14
|
+
"error.alias_target_missing": '别名 "{alias}" 指向 "{target}",但该配置不存在',
|
|
15
|
+
"error.invalid_choice": "无效选择",
|
|
16
|
+
|
|
17
|
+
// suggest
|
|
18
|
+
"suggest.did_you_mean": "你是不是想说: {name}?",
|
|
19
|
+
"suggest.did_you_mean_header": "你是不是想说:",
|
|
20
|
+
"suggest.use_list": "使用 cc-cast list 查看所有可用配置",
|
|
21
|
+
|
|
22
|
+
// init
|
|
23
|
+
"init.description": "初始化 cc-cast",
|
|
24
|
+
"init.cc_switch_found":"检测到 cc-switch 已安装,是否从中导入配置?(Y/n) ",
|
|
25
|
+
"init.cc_switch_mode": "✓ 检测到 cc-switch,cc-cast 将直接使用 cc-switch 配置库",
|
|
26
|
+
"init.cc_switch_migrate": "发现 cc-cast 独立配置,是否将其迁移至 cc-switch?(Y/n) ",
|
|
27
|
+
"init.cc_switch_migrate_done": "✓ 已迁移 {count} 个配置至 cc-switch",
|
|
28
|
+
"init.done": "✓ 初始化完成",
|
|
29
|
+
|
|
30
|
+
// list
|
|
31
|
+
"list.description": "列出并选择配置方案",
|
|
32
|
+
"list.empty": "暂无配置方案。使用 cc-cast save <name> 保存当前配置",
|
|
33
|
+
"list.header": "可用配置:",
|
|
34
|
+
"list.select": "选择配置:",
|
|
35
|
+
"list.current_marker": "(当前)",
|
|
36
|
+
"list.choose_number": "输入序号切换 (回车跳过): ",
|
|
37
|
+
|
|
38
|
+
// current
|
|
39
|
+
"current.description": "显示当前生效的配置",
|
|
40
|
+
"current.none": "当前无激活配置",
|
|
41
|
+
"current.settings_header": "当前 settings.json:",
|
|
42
|
+
"current.not_exist": '当前配置 "{name}" 已不存在',
|
|
43
|
+
"current.header": "当前配置: {name}",
|
|
44
|
+
|
|
45
|
+
// use
|
|
46
|
+
"use.description": "切换到指定配置方案",
|
|
47
|
+
"use.done": "✓ 已切换到 {name}",
|
|
48
|
+
"use.restart": "重启 Claude Code 生效",
|
|
49
|
+
"use.cc_switch_running": "检测到 cc-switch GUI 正在运行,为避免配置冲突,仅更新了当前配置标记。请在 cc-switch GUI 中手动切换,或退出 GUI 后重试。",
|
|
50
|
+
|
|
51
|
+
// save
|
|
52
|
+
"save.description": "从当前 settings.json 保存为新配置",
|
|
53
|
+
"save.overwrite": '配置 "{name}" 已存在,将覆盖',
|
|
54
|
+
"save.done": '✓ 已保存当前配置为 "{name}"',
|
|
55
|
+
|
|
56
|
+
// show
|
|
57
|
+
"show.description": "查看配置详情(不指定则显示当前)",
|
|
58
|
+
"show.no_current": "当前无激活配置,请指定名称: cc-cast show <name>",
|
|
59
|
+
"show.all_header": "所有配置:",
|
|
60
|
+
|
|
61
|
+
// remove
|
|
62
|
+
"remove.description": "删除配置方案",
|
|
63
|
+
"remove.select": "选择要删除的配置:",
|
|
64
|
+
"remove.confirm": '确认删除 "{name}"?(y/N) ',
|
|
65
|
+
"remove.done": '✓ 已删除 "{name}"',
|
|
66
|
+
|
|
67
|
+
// alias
|
|
68
|
+
"alias.description": "管理别名",
|
|
69
|
+
"alias.set_description": "设置别名,如: cc-cast alias set or openrouter-opus4.6",
|
|
70
|
+
"alias.set_done": "✓ 别名已设置: {short} → {name}",
|
|
71
|
+
"alias.rm_description": "删除别名",
|
|
72
|
+
"alias.rm_not_found": '别名 "{short}" 不存在',
|
|
73
|
+
"alias.rm_done": '✓ 已删除别名 "{short}"',
|
|
74
|
+
"alias.list_description": "列出所有别名",
|
|
75
|
+
"alias.list_empty": "暂无别名。使用 cc-cast alias set <short> <name> 添加",
|
|
76
|
+
"alias.list_header": "别名列表:",
|
|
77
|
+
|
|
78
|
+
// locale
|
|
79
|
+
"locale.description": "管理界面语言",
|
|
80
|
+
"locale.current": "当前语言: {locale}",
|
|
81
|
+
"locale.set_description": "设置语言 (zh/en)",
|
|
82
|
+
"locale.set_done": "✓ 语言已设置为 {locale}",
|
|
83
|
+
"locale.set_invalid": "不支持的语言: {locale},可选: zh, en",
|
|
84
|
+
"locale.list_description": "列出并选择语言",
|
|
85
|
+
"locale.list_header": "支持的语言:",
|
|
86
|
+
"locale.list_current_marker": "(当前)",
|
|
87
|
+
"locale.select": "选择语言:",
|
|
88
|
+
"locale.choose_number": "输入序号切换 (回车跳过): ",
|
|
89
|
+
|
|
90
|
+
// add
|
|
91
|
+
"add.description": "交互式添加新配置",
|
|
92
|
+
"add.prompt_name": "供应商名称 (如 OpenRouter): ",
|
|
93
|
+
"add.prompt_base_url": "ANTHROPIC_BASE_URL: ",
|
|
94
|
+
"add.prompt_auth_token": "ANTHROPIC_AUTH_TOKEN: ",
|
|
95
|
+
"add.prompt_model": "ANTHROPIC_MODEL: ",
|
|
96
|
+
"add.prompt_default_opus": "ANTHROPIC_DEFAULT_OPUS_MODEL (回车跳过): ",
|
|
97
|
+
"add.prompt_default_sonnet": "ANTHROPIC_DEFAULT_SONNET_MODEL (回车跳过): ",
|
|
98
|
+
"add.prompt_default_haiku": "ANTHROPIC_DEFAULT_HAIKU_MODEL (回车跳过): ",
|
|
99
|
+
"add.mode_select": "选择添加方式:",
|
|
100
|
+
"add.mode_interactive": "逐步填写",
|
|
101
|
+
"add.mode_json": "直接编写 JSON",
|
|
102
|
+
"add.mode_choose": "请选择 (1/2): ",
|
|
103
|
+
"add.json_template_hint": "请在编辑器中填写配置,保存并退出",
|
|
104
|
+
"add.json_parse_error": "JSON 解析失败,请检查格式",
|
|
105
|
+
"add.back_hint": "输入 < 返回上一步",
|
|
106
|
+
"add.name_required": "供应商名称不能为空",
|
|
107
|
+
"add.field_required": "{field} 不能为空",
|
|
108
|
+
"add.already_exists": '配置 "{name}" 已存在,是否覆盖?(y/N) ',
|
|
109
|
+
"add.edit_confirm": "是否在编辑器中编辑配置?(y/N) ",
|
|
110
|
+
"add.preview_header": "配置预览:",
|
|
111
|
+
"add.done": '✓ 已保存配置 "{name}"',
|
|
112
|
+
"add.switch_confirm": "是否立即切换到此配置?(Y/n) ",
|
|
113
|
+
"add.cancelled": "已取消",
|
|
114
|
+
|
|
115
|
+
// modify
|
|
116
|
+
"modify.description": "修改已有配置",
|
|
117
|
+
"modify.select": "选择要修改的配置:",
|
|
118
|
+
"modify.done": '✓ 已更新配置 "{name}"',
|
|
119
|
+
"modify.no_change": "未做任何修改",
|
|
120
|
+
|
|
121
|
+
// alias conflict
|
|
122
|
+
"alias.is_alias": '"{name}" 是别名,指向 "{target}"',
|
|
123
|
+
"alias.conflict": '"{name}" 同时是别名(→ {target})和配置名,使用哪个?',
|
|
124
|
+
"alias.conflict_alias": "别名(→ {target})",
|
|
125
|
+
"alias.conflict_config": "配置 {name}",
|
|
126
|
+
"alias.choose_conflict": "请选择 (1/2): ",
|
|
127
|
+
"alias.rm_which": "要删除哪个?",
|
|
128
|
+
"alias.rm_alias": "别名 {name}",
|
|
129
|
+
"alias.rm_config": "配置 {target}",
|
|
130
|
+
"alias.rm_choose": "请选择 (1/2): ",
|
|
131
|
+
|
|
132
|
+
// sync
|
|
133
|
+
"sync.description": "从 cc-switch 同步配置",
|
|
134
|
+
"sync.no_cc_switch": "未检测到 cc-switch 数据库",
|
|
135
|
+
"sync.empty": "cc-switch 中没有找到 Claude 配置",
|
|
136
|
+
"sync.done": "✓ 已同步 {count} 个配置",
|
|
137
|
+
"sync.current": "当前激活: {name}",
|
|
138
|
+
"sync.no_current": "当前无激活配置",
|
|
139
|
+
|
|
140
|
+
// clear
|
|
141
|
+
"clear.description": "清理 cc-cast 数据文件",
|
|
142
|
+
"clear.confirm": "确认删除所有 cc-cast 数据文件?(y/N) ",
|
|
143
|
+
"clear.cancelled": "已取消清理",
|
|
144
|
+
"clear.removed": "✓ 已删除 {path}",
|
|
145
|
+
"clear.done": "✓ 清理完成",
|
|
146
|
+
|
|
147
|
+
// import
|
|
148
|
+
"import.description": "从 JSON 导入配置(文件或粘贴)",
|
|
149
|
+
"import.paste_hint": "粘贴 JSON,按 Ctrl+D(或 Windows 的 Ctrl+Z)结束:",
|
|
150
|
+
"import.file_not_found": '文件不存在: {file}',
|
|
151
|
+
"import.json_parse_error": "JSON 格式无效",
|
|
152
|
+
"import.invalid_format": "格式错误: 应为以配置名称为键的对象",
|
|
153
|
+
"import.done": "✓ 已导入 {count} 个配置",
|
|
154
|
+
|
|
155
|
+
// store errors
|
|
156
|
+
"store.db_not_found": "cc-switch 数据库不存在: {path}",
|
|
157
|
+
} as const;
|
|
158
|
+
|
|
159
|
+
export type TranslationKey = keyof typeof zh;
|
|
160
|
+
export default zh;
|