@liujitcn/kratos-admin-system 0.0.25 → 0.0.27

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.
Files changed (62) hide show
  1. package/dist/package/declarations/src/api/system/base_i18n.d.ts +10 -0
  2. package/dist/package/declarations/src/api/system/code_gen_i18n.d.ts +1 -1
  3. package/dist/package/declarations/src/components/DynamicTranslationCell.vue.d.ts +3 -3
  4. package/dist/package/declarations/src/components/dynamicTranslation.d.ts +1 -1
  5. package/dist/package/declarations/src/locales/generated.d.ts +9 -2800
  6. package/dist/package/declarations/src/rpc/common/v1/enum.d.ts +15 -6
  7. package/dist/package/declarations/src/rpc/system/admin/v1/base_api.d.ts +10 -1
  8. package/dist/package/declarations/src/rpc/system/admin/v1/base_config.d.ts +4 -4
  9. package/dist/package/declarations/src/rpc/system/admin/v1/base_dict.d.ts +5 -5
  10. package/dist/package/declarations/src/rpc/system/admin/v1/{base_translation.d.ts → base_i18n.d.ts} +3 -3
  11. package/dist/package/declarations/src/rpc/system/admin/v1/base_menu.d.ts +3 -3
  12. package/dist/package/declarations/src/rpc/system/admin/v1/code_gen_column.d.ts +1 -1
  13. package/dist/package/declarations/src/rpc/system/admin/v1/code_gen_table.d.ts +1 -1
  14. package/dist/package/declarations/src/rpc/system/admin/v1/project_document.d.ts +8 -0
  15. package/dist/package/declarations/src/views/tool/code-gen/components/CodeGenLocaleEditor.vue.d.ts +1 -1
  16. package/dist/package/src/api/base/sse.ts +3 -2
  17. package/dist/package/src/api/system/{base_translation.ts → base_i18n.ts} +5 -5
  18. package/dist/package/src/api/system/code_gen_i18n.ts +1 -1
  19. package/dist/package/src/components/Ai.vue +9 -2
  20. package/dist/package/src/components/DynamicTranslationCell.vue +9 -9
  21. package/dist/package/src/components/DynamicTranslationEditor.vue +3 -3
  22. package/dist/package/src/components/dynamicTranslation.ts +1 -1
  23. package/dist/package/src/locales/README.md +0 -4
  24. package/dist/package/src/locales/en-US.json +2 -0
  25. package/dist/package/src/locales/generated.ts +0 -6
  26. package/dist/package/src/locales/ja-JP.json +721 -719
  27. package/dist/package/src/locales/zh-CN.json +2 -0
  28. package/dist/package/src/locales/zh-TW.json +2 -0
  29. package/dist/package/src/rpc/common/v1/enum.ts +16 -6
  30. package/dist/package/src/rpc/system/admin/v1/base_api.ts +11 -1
  31. package/dist/package/src/rpc/system/admin/v1/base_config.ts +4 -4
  32. package/dist/package/src/rpc/system/admin/v1/base_dict.ts +5 -5
  33. package/dist/package/src/rpc/system/admin/v1/{base_translation.ts → base_i18n.ts} +4 -4
  34. package/dist/package/src/rpc/system/admin/v1/base_menu.ts +3 -3
  35. package/dist/package/src/rpc/system/admin/v1/code_gen_column.ts +1 -1
  36. package/dist/package/src/rpc/system/admin/v1/code_gen_table.ts +1 -1
  37. package/dist/package/src/rpc/system/admin/v1/project_document.ts +9 -0
  38. package/dist/package/src/views/ai/chat/message.ts +12 -2
  39. package/dist/package/src/views/base/api/index.vue +20 -20
  40. package/dist/package/src/views/base/config/index.vue +11 -11
  41. package/dist/package/src/views/base/dept/index.vue +8 -8
  42. package/dist/package/src/views/base/dict/index.vue +9 -9
  43. package/dist/package/src/views/base/dict/item.vue +9 -9
  44. package/dist/package/src/views/base/job/index.vue +11 -11
  45. package/dist/package/src/views/base/language/index.vue +9 -9
  46. package/dist/package/src/views/base/menu/index.vue +14 -9
  47. package/dist/package/src/views/base/post/index.vue +8 -8
  48. package/dist/package/src/views/base/role/index.vue +8 -8
  49. package/dist/package/src/views/base/tenant/index.vue +8 -8
  50. package/dist/package/src/views/base/user/index.vue +8 -8
  51. package/dist/package/src/views/tool/code-gen/columns/index.vue +8 -53
  52. package/dist/package/src/views/tool/code-gen/components/CodeGenLocaleEditor.vue +1 -1
  53. package/dist/package/src/views/tool/code-gen/components/CodeGenProgressDialog.vue +3 -12
  54. package/dist/package/src/views/tool/code-gen/preview/index.vue +3 -6
  55. package/dist/package/src/views/tool/code-gen/proto/index.vue +7 -8
  56. package/dist/package/src/views/tool/code-gen/table/index.vue +2 -2
  57. package/dist/package/src/views/tool/ops-monitoring/index.vue +23 -25
  58. package/package.json +2 -2
  59. package/dist/package/declarations/src/api/system/base_translation.d.ts +0 -10
  60. package/dist/package/src/locales/es-ES.json +0 -933
  61. package/dist/package/src/locales/fr-FR.json +0 -933
  62. package/dist/package/src/locales/ko-KR.json +0 -933
@@ -1,9 +1,18 @@
1
1
  /** 状态 */
2
2
  export declare enum Status {
3
- /** UNKNOWN - 未知状态 */
4
- UNKNOWN = 0,
5
- /** ENABLE - 启用 */
6
- ENABLE = 1,
7
- /** DISABLE - 禁用 */
8
- DISABLE = 2
3
+ /** STATUS_UNSPECIFIED - 未知状态 */
4
+ STATUS_UNSPECIFIED = 0,
5
+ /** STATUS_ENABLE - 启用 */
6
+ STATUS_ENABLE = 1,
7
+ /** STATUS_DISABLE - 禁用 */
8
+ STATUS_DISABLE = 2
9
+ }
10
+ /** 定时任务日志状态 */
11
+ export declare enum BaseJobLogStatus {
12
+ /** BASE_JOB_LOG_STATUS_UNSPECIFIED - 未指定定时任务日志状态 */
13
+ BASE_JOB_LOG_STATUS_UNSPECIFIED = 0,
14
+ /** BASE_JOB_LOG_STATUS_SUCCESS - 成功 */
15
+ BASE_JOB_LOG_STATUS_SUCCESS = 1,
16
+ /** BASE_JOB_LOG_STATUS_FAIL - 失败 */
17
+ BASE_JOB_LOG_STATUS_FAIL = 2
9
18
  }
@@ -162,7 +162,7 @@ export interface OptionOpenApiServiceRequest {
162
162
  }
163
163
  /** OpenAPI业务服务选项响应 */
164
164
  export interface OptionOpenApiServiceResponse {
165
- /** OpenAPI文档选项列表 */
165
+ /** OpenAPI文档列表 */
166
166
  list: OpenApiServiceOption[];
167
167
  }
168
168
  /** OpenAPI业务服务选项 */
@@ -171,6 +171,15 @@ export interface OpenApiServiceOption {
171
171
  key: string;
172
172
  /** OpenAPI文档名称 */
173
173
  name: string;
174
+ /** OpenAPI接口列表 */
175
+ operations: OpenApiServiceOperation[];
176
+ }
177
+ /** OpenAPI业务服务接口 */
178
+ export interface OpenApiServiceOperation {
179
+ /** HTTP请求路径 */
180
+ path: string;
181
+ /** HTTP请求方法 */
182
+ method: string;
174
183
  }
175
184
  /** AdminAPI服务 */
176
185
  export interface BaseApiService {
@@ -1,7 +1,7 @@
1
1
  import type { BaseConfigSite } from "../../../base/v1/config";
2
2
  import type { Status } from "../../../common/v1/enum";
3
3
  import type { Empty } from "../../../google/protobuf/empty";
4
- import type { BaseTranslation } from "./base_translation";
4
+ import type { BaseI18n } from "./base_i18n";
5
5
  /** 系统配置类型。 */
6
6
  export declare enum BaseConfigType {
7
7
  /** BASE_CONFIG_TYPE_UNSPECIFIED - 未指定系统配置类型。 */
@@ -61,9 +61,9 @@ export interface BaseConfigForm {
61
61
  /** 配置value */
62
62
  value: string;
63
63
  /** 配置名称多语言翻 */
64
- name_translations: BaseTranslation[];
64
+ name_translations: BaseI18n[];
65
65
  /** 配置value文本/富文本配置值的多语言翻译 */
66
- value_translations: BaseTranslation[];
66
+ value_translations: BaseI18n[];
67
67
  /** 状态 */
68
68
  status: Status;
69
69
  }
@@ -113,7 +113,7 @@ export interface BaseConfig {
113
113
  /** 更新时间 */
114
114
  updated_at: string;
115
115
  /** 配置名称及文本/富文本配置值的多语言翻译 */
116
- translations: BaseTranslation[];
116
+ translations: BaseI18n[];
117
117
  }
118
118
  /** Admin系统配置服务 */
119
119
  export interface BaseConfigService {
@@ -1,6 +1,6 @@
1
1
  import type { Status } from "../../../common/v1/enum";
2
2
  import type { Empty } from "../../../google/protobuf/empty";
3
- import type { BaseTranslation } from "./base_translation";
3
+ import type { BaseI18n } from "./base_i18n";
4
4
  /** 字典选项查询条件 */
5
5
  export interface OptionBaseDictRequest {
6
6
  }
@@ -81,7 +81,7 @@ export interface BaseDictForm {
81
81
  /** 字典名称 */
82
82
  name: string;
83
83
  /** 非主语言翻译 */
84
- translations: BaseTranslation[];
84
+ translations: BaseI18n[];
85
85
  /** 状态 */
86
86
  status: Status;
87
87
  }
@@ -105,7 +105,7 @@ export interface BaseDictItemForm {
105
105
  /** 排序 */
106
106
  sort: number;
107
107
  /** 非主语言翻译 */
108
- translations: BaseTranslation[];
108
+ translations: BaseI18n[];
109
109
  /** 状态 */
110
110
  status: Status;
111
111
  }
@@ -168,7 +168,7 @@ export interface BaseDict {
168
168
  /** 更新时间 */
169
169
  updated_at: string;
170
170
  /** 非主语言翻译 */
171
- translations: BaseTranslation[];
171
+ translations: BaseI18n[];
172
172
  }
173
173
  /** 字典项 */
174
174
  export interface BaseDictItem {
@@ -191,7 +191,7 @@ export interface BaseDictItem {
191
191
  /** 更新时间 */
192
192
  updated_at: string;
193
193
  /** 非主语言翻译 */
194
- translations: BaseTranslation[];
194
+ translations: BaseI18n[];
195
195
  }
196
196
  /** Admin字典服务 */
197
197
  export interface BaseDictService {
@@ -1,5 +1,5 @@
1
1
  import type { Empty } from "../../../google/protobuf/empty";
2
- /** 统一翻译表目标类型,和 base_translation.target_type 的值一一对应。 */
2
+ /** 统一翻译表目标类型,和 base_i18n.target_type 的值一一对应。 */
3
3
  export declare enum TranslationTargetType {
4
4
  /** TRANSLATION_TARGET_TYPE_UNSPECIFIED - 未指定统一翻译表目标类型。 */
5
5
  TRANSLATION_TARGET_TYPE_UNSPECIFIED = 0,
@@ -47,7 +47,7 @@ export interface UpdateBaseTranslationRequest {
47
47
  name: string;
48
48
  }
49
49
  /** 国际化翻译信息 */
50
- export interface BaseTranslation {
50
+ export interface BaseI18n {
51
51
  /** 翻译记录ID */
52
52
  id: number;
53
53
  /** 翻译目标类型 */
@@ -67,7 +67,7 @@ export interface CodeGenLocaleConfig {
67
67
  left_tree_comment: string;
68
68
  }
69
69
  /** 国际化翻译信息服务。 */
70
- export interface BaseTranslationService {
70
+ export interface BaseI18nService {
71
71
  /** 翻译单个文本。 */
72
72
  DraftBaseTranslation(request: DraftBaseTranslationRequest): Promise<DraftBaseTranslationResponse>;
73
73
  /** 修改国际化翻译信息 */
@@ -1,7 +1,7 @@
1
1
  import type { TreeOptionResponse } from "../../../common/v1/common";
2
2
  import type { Status } from "../../../common/v1/enum";
3
3
  import type { Empty } from "../../../google/protobuf/empty";
4
- import type { BaseTranslation } from "./base_translation";
4
+ import type { BaseI18n } from "./base_i18n";
5
5
  import type { BaseMenuType } from "./common";
6
6
  /** 菜单选项查询条件 */
7
7
  export interface OptionBaseMenuRequest {
@@ -50,7 +50,7 @@ export interface BaseMenuForm {
50
50
  /** 分配的API列表 */
51
51
  api: string[];
52
52
  /** 非主语言翻译 */
53
- translations: BaseTranslation[];
53
+ translations: BaseI18n[];
54
54
  /** 排序 */
55
55
  sort: number;
56
56
  /** 状态 */
@@ -109,7 +109,7 @@ export interface BaseMenu {
109
109
  /** 是否存在子节点 */
110
110
  has_children: boolean;
111
111
  /** 非主语言翻译 */
112
- translations: BaseTranslation[];
112
+ translations: BaseI18n[];
113
113
  }
114
114
  /** 菜单元信息 */
115
115
  export interface BaseMenuMeta {
@@ -1,5 +1,5 @@
1
1
  import type { Empty } from "../../../google/protobuf/empty";
2
- import type { CodeGenLocaleConfig } from "./base_translation";
2
+ import type { CodeGenLocaleConfig } from "./base_i18n";
3
3
  /** 代码生成字段配置查询条件 */
4
4
  export interface ListCodeGenColumnRequest {
5
5
  /** 代码生成表配置ID */
@@ -1,5 +1,5 @@
1
1
  import type { Empty } from "../../../google/protobuf/empty";
2
- import type { CodeGenLocaleConfig } from "./base_translation";
2
+ import type { CodeGenLocaleConfig } from "./base_i18n";
3
3
  /** 代码生成表状态。 */
4
4
  export declare enum CodeGenTableStatus {
5
5
  /** CODE_GEN_TABLE_STATUS_UNSPECIFIED - 未指定代码生成表状态。 */
@@ -54,6 +54,14 @@ export interface ProjectDocument {
54
54
  path: string;
55
55
  /** Markdown文档内容 */
56
56
  content: string;
57
+ /** 按语言标识索引的Markdown翻译内容 */
58
+ locale: Map<string, string>;
59
+ /** Markdown文件更新时间,RFC3339格式 */
60
+ updated_at: string;
61
+ }
62
+ export interface ProjectDocument_LocaleEntry {
63
+ key: string;
64
+ value: string;
57
65
  }
58
66
  /** 项目文档服务 */
59
67
  export interface ProjectDocumentService {
@@ -1,4 +1,4 @@
1
- import type { CodeGenLocaleConfig } from "@liujitcn/kratos-admin-system/rpc/system/admin/v1/base_translation";
1
+ import type { CodeGenLocaleConfig } from "@liujitcn/kratos-admin-system/rpc/system/admin/v1/base_i18n";
2
2
  /** 代码生成多语言编辑器属性。 */
3
3
  interface CodeGenLocaleEditorProps {
4
4
  /** 按语言区域索引的生成配置。 */
@@ -74,9 +74,10 @@ export class SseServiceImpl {
74
74
 
75
75
  /** 构建 SSE 订阅地址。 */
76
76
  private buildSubscribeURL(request: SubscribeSseRequest) {
77
- const url = new URL(`${SSE_URL}/${request.stream}`, window.location.origin);
77
+ const url = new URL(SSE_URL, window.location.origin);
78
+ url.searchParams.set("stream", request.stream);
78
79
  if (request.channel_id) {
79
- url.searchParams.set("channel_id", request.channel_id);
80
+ url.searchParams.set("channel", request.channel_id);
80
81
  }
81
82
  return url.toString();
82
83
  }
@@ -1,16 +1,16 @@
1
1
  import service from "@liujitcn/kratos-admin-core/request";
2
2
  import type { Empty } from "@liujitcn/kratos-admin-system/rpc/google/protobuf/empty";
3
3
  import type {
4
- BaseTranslationService,
4
+ BaseI18nService,
5
5
  DraftBaseTranslationRequest,
6
6
  DraftBaseTranslationResponse,
7
7
  UpdateBaseTranslationRequest
8
- } from "@liujitcn/kratos-admin-system/rpc/system/admin/v1/base_translation";
8
+ } from "@liujitcn/kratos-admin-system/rpc/system/admin/v1/base_i18n";
9
9
 
10
10
  const BASE_TRANSLATION_URL = "/v1/admin/base/translation";
11
11
 
12
- /** BaseTranslationServiceImpl Admin 单条动态翻译服务。 */
13
- export class BaseTranslationServiceImpl implements BaseTranslationService {
12
+ /** BaseI18nServiceImpl Admin 单条动态翻译服务。 */
13
+ export class BaseI18nServiceImpl implements BaseI18nService {
14
14
  /** DraftBaseTranslation 翻译请求中的单个文本。 */
15
15
  DraftBaseTranslation(request: DraftBaseTranslationRequest): Promise<DraftBaseTranslationResponse> {
16
16
  return service<DraftBaseTranslationRequest, DraftBaseTranslationResponse>({
@@ -30,4 +30,4 @@ export class BaseTranslationServiceImpl implements BaseTranslationService {
30
30
  }
31
31
  }
32
32
 
33
- export const defBaseTranslationService = new BaseTranslationServiceImpl();
33
+ export const defBaseI18nService = new BaseI18nServiceImpl();
@@ -1,4 +1,4 @@
1
- import type { CodeGenLocaleConfig } from "@liujitcn/kratos-admin-system/rpc/system/admin/v1/base_translation";
1
+ import type { CodeGenLocaleConfig } from "@liujitcn/kratos-admin-system/rpc/system/admin/v1/base_i18n";
2
2
 
3
3
  /** 代码生成国际化配置的 JSON 兼容形态。 */
4
4
  type CodeGenLocaleConfigRecord = Record<string, CodeGenLocaleConfig>;
@@ -1,6 +1,12 @@
1
1
  <template>
2
- <el-tooltip v-if="aiRoute" effect="dark" content="AI助手" placement="bottom" :show-after="200">
3
- <button class="ai" type="button" aria-label="打开AI助手" @click="openAi">
2
+ <el-tooltip
3
+ v-if="aiRoute"
4
+ effect="dark"
5
+ :content="t('system.ai.chat.title.assistant')"
6
+ placement="bottom"
7
+ :show-after="200"
8
+ >
9
+ <button class="ai" type="button" :aria-label="t('system.ai.chat.action.open_assistant')" @click="openAi">
4
10
  <el-icon><ChatDotRound /></el-icon>
5
11
  </button>
6
12
  </el-tooltip>
@@ -10,6 +16,7 @@
10
16
  import { ChatDotRound } from "@element-plus/icons-vue";
11
17
  import { computed } from "vue";
12
18
  import { useRouter } from "vue-router";
19
+ import { t } from "@liujitcn/kratos-admin-core";
13
20
  import { useAuthStore } from "@liujitcn/kratos-admin-core/stores/runtime";
14
21
  import { navigateTo } from "@liujitcn/kratos-admin-core/navigation";
15
22
 
@@ -8,6 +8,7 @@
8
8
  :title="displaySource"
9
9
  width="760px"
10
10
  append-to-body
11
+ :show-footer="false"
11
12
  :destroy-on-close="true"
12
13
  @closed="handleDialogClosed"
13
14
  >
@@ -29,7 +30,7 @@
29
30
  </span>
30
31
  </template>
31
32
  </el-table-column>
32
- <el-table-column :label="t('common.field.operation')" width="150" fixed="right">
33
+ <el-table-column :label="t('common.field.operation')" width="200" fixed="right">
33
34
  <template #default="{ row }">
34
35
  <el-button v-if="!row.editing" link type="primary" :icon="EditPen" @click="startEdit(row)">
35
36
  {{ t("common.action.edit") }}
@@ -55,9 +56,9 @@ import { Check, Close, EditPen } from "@element-plus/icons-vue";
55
56
  import ProDialog from "@liujitcn/kratos-admin-core/components/Dialog/ProDialog.vue";
56
57
  import { t, useLocaleStore } from "@liujitcn/kratos-admin-core";
57
58
  import { loadEnabledBaseLanguages, useEnabledBaseLanguages } from "@liujitcn/kratos-admin-system/api/system/base_language";
58
- import { defBaseTranslationService } from "@liujitcn/kratos-admin-system/api/system/base_translation";
59
- import type { BaseTranslation } from "@liujitcn/kratos-admin-system/rpc/system/admin/v1/base_translation";
60
- import { TranslationTargetType } from "@liujitcn/kratos-admin-system/rpc/system/admin/v1/base_translation";
59
+ import { defBaseI18nService } from "@liujitcn/kratos-admin-system/api/system/base_i18n";
60
+ import type { BaseI18n } from "@liujitcn/kratos-admin-system/rpc/system/admin/v1/base_i18n";
61
+ import { TranslationTargetType } from "@liujitcn/kratos-admin-system/rpc/system/admin/v1/base_i18n";
61
62
  import { getLanguageLabel } from "./dynamicTranslation";
62
63
 
63
64
  /** DynamicTranslationCellProps 动态翻译列表单元格属性。 */
@@ -69,7 +70,7 @@ interface DynamicTranslationCellProps {
69
70
  /** 目标资源编号。 */
70
71
  targetId?: number;
71
72
  /** 资源列表返回的非主语言翻译。 */
72
- translations?: BaseTranslation[];
73
+ translations?: BaseI18n[];
73
74
  }
74
75
 
75
76
  const props = defineProps<DynamicTranslationCellProps>();
@@ -132,13 +133,13 @@ async function loadTranslations() {
132
133
  const missingRows = rows.filter(row => !row.text);
133
134
  if (missingRows.length === 0) return;
134
135
  if (!props.source) return;
135
- const draft = await defBaseTranslationService.DraftBaseTranslation({ source: props.source });
136
+ const draft = await defBaseI18nService.DraftBaseTranslation({ source: props.source });
136
137
  const translations = new Map(draft.translations.map(item => [item.locale, item.translation]));
137
138
  const results = await Promise.allSettled(
138
139
  missingRows.map(async row => {
139
140
  const translation = translations.get(row.locale);
140
141
  if (!translation) throw new Error("translation not found");
141
- await defBaseTranslationService.UpdateBaseTranslation({
142
+ await defBaseI18nService.UpdateBaseTranslation({
142
143
  id: row.id,
143
144
  target_type: targetType,
144
145
  target_id: targetId,
@@ -203,7 +204,7 @@ async function saveTranslation(row: DynamicTranslationRow) {
203
204
  }
204
205
  row.saving = true;
205
206
  try {
206
- await defBaseTranslationService.UpdateBaseTranslation({
207
+ await defBaseI18nService.UpdateBaseTranslation({
207
208
  id: row.id,
208
209
  target_type: targetType,
209
210
  target_id: targetId,
@@ -235,7 +236,6 @@ function handleDialogClosed() {
235
236
  min-width: 0;
236
237
  max-width: 100%;
237
238
  }
238
-
239
239
  .dynamic-translation-cell__source {
240
240
  min-width: 0;
241
241
  overflow: hidden;
@@ -49,7 +49,7 @@ import { computed, ref, watch } from "vue";
49
49
  import { ElMessage } from "element-plus";
50
50
  import { Promotion } from "@element-plus/icons-vue";
51
51
  import { t, useLocaleStore } from "@liujitcn/kratos-admin-core";
52
- import { defBaseTranslationService } from "@liujitcn/kratos-admin-system/api/system/base_translation";
52
+ import { defBaseI18nService } from "@liujitcn/kratos-admin-system/api/system/base_i18n";
53
53
  import { getLanguageLabel, type DynamicTranslationValue } from "./dynamicTranslation";
54
54
 
55
55
  /** DynamicTranslationEditorProps 动态翻译编辑器属性。 */
@@ -95,7 +95,7 @@ async function handleBatchTranslate() {
95
95
  translating.value = true;
96
96
  try {
97
97
  const pending = localValues.value.filter(item => !item.text && item.locale !== currentLocale.value);
98
- const response = await defBaseTranslationService.DraftBaseTranslation({ source: props.source });
98
+ const response = await defBaseI18nService.DraftBaseTranslation({ source: props.source });
99
99
  const translations = new Map(response.translations.map(item => [item.locale, item.translation]));
100
100
  const failed = pending.filter(item => !translations.has(item.locale)).length;
101
101
  if (translations.size) {
@@ -129,7 +129,7 @@ async function handleTranslate(locale: string) {
129
129
  if (!item || item.text || item.locale === currentLocale.value || !props.source || translating.value || translatingLocale.value) return;
130
130
  translatingLocale.value = locale;
131
131
  try {
132
- const response = await defBaseTranslationService.DraftBaseTranslation({ source: props.source, locale });
132
+ const response = await defBaseI18nService.DraftBaseTranslation({ source: props.source, locale });
133
133
  const translation = response.translations.find(item => item.locale === locale)?.translation;
134
134
  if (!translation) throw new Error("translation not found");
135
135
  const values = localValues.value.map(value => (value.locale === locale ? { ...value, text: translation } : value));
@@ -1,5 +1,5 @@
1
1
  import { getEnabledBaseLanguages } from "@liujitcn/kratos-admin-system/api/system/base_language";
2
- import type { TranslationTargetType } from "@liujitcn/kratos-admin-system/rpc/system/admin/v1/base_translation";
2
+ import type { TranslationTargetType } from "@liujitcn/kratos-admin-system/rpc/system/admin/v1/base_i18n";
3
3
 
4
4
  /** DynamicTranslationValue 动态资源单语言翻译编辑状态。 */
5
5
  export interface DynamicTranslationValue {
@@ -7,10 +7,6 @@
7
7
  | `zh-CN.json` | System 模块简体中文固定 UI 默认语言包,也是所有语言键集合和占位符校验基准。 | 管理端固定文案默认语言及缺失翻译回退。 |
8
8
  | `zh-TW.json` | System 模块繁体中文语言包。 | 管理端切换为繁体中文时由 Vue I18n 使用。 |
9
9
  | `en-US.json` | System 模块英文语言包。 | 管理端切换为英文时由 Vue I18n 使用。 |
10
- | `ja-JP.json` | System 模块日文语言包。 | 管理端切换为日文时由 Vue I18n 使用。 |
11
- | `ko-KR.json` | System 模块韩语语言包。 | 管理端切换为韩语时由 Vue I18n 使用。 |
12
- | `fr-FR.json` | System 模块法语语言包。 | 管理端切换为法语时由 Vue I18n 使用。 |
13
- | `es-ES.json` | System 模块西班牙语语言包。 | 管理端切换为西班牙语时由 Vue I18n 使用。 |
14
10
 
15
11
  ## 命名空间与使用位置
16
12
 
@@ -479,6 +479,7 @@
479
479
  "system.ai.chat.action.collapse_sessions": "Collapse conversations",
480
480
  "system.ai.chat.action.expand_sessions": "Expand conversations",
481
481
  "system.ai.chat.action.new_conversation": "New conversation",
482
+ "system.ai.chat.action.open_assistant": "Open AI assistant",
482
483
  "system.ai.chat.action.conversation_menu": "Conversation actions",
483
484
  "system.ai.chat.action.rename": "Rename",
484
485
  "system.ai.chat.action.continue": "Continue",
@@ -486,6 +487,7 @@
486
487
  "system.ai.chat.title.error_detail": "Error details",
487
488
  "system.ai.chat.title.runtime": "Runtime details",
488
489
  "system.ai.chat.title.recent_conversations": "Recent conversations",
490
+ "system.ai.chat.title.assistant": "AI assistant",
489
491
  "system.ai.chat.field.input_tokens": "Input",
490
492
  "system.ai.chat.field.output_tokens": "Output",
491
493
  "system.ai.chat.field.cache_tokens": "Cache read",
@@ -1,19 +1,13 @@
1
1
  /* 此文件由 scripts/sync_locales.py 生成,请勿手工修改。 */
2
2
  import localeZhCn from './zh-CN.json'
3
3
  import localeEnUs from './en-US.json'
4
- import localeEsEs from './es-ES.json'
5
- import localeFrFr from './fr-FR.json'
6
4
  import localeJaJp from './ja-JP.json'
7
- import localeKoKr from './ko-KR.json'
8
5
  import localeZhTw from './zh-TW.json'
9
6
 
10
7
  export const LOCALE_MESSAGES = {
11
8
  'zh-CN': localeZhCn,
12
9
  'en-US': localeEnUs,
13
- 'es-ES': localeEsEs,
14
- 'fr-FR': localeFrFr,
15
10
  'ja-JP': localeJaJp,
16
- 'ko-KR': localeKoKr,
17
11
  'zh-TW': localeZhTw,
18
12
  } as const satisfies Record<string, Record<string, string>>
19
13