返回 AiToEarn
messages.ts
根目录 / project / aitoearn-backend / libs / common / src / i18n / messages.ts
1 import template from 'art-template'
2 import { ResponseCode } from '../enums'
3
4 export type Locale = 'en-US' | 'zh-CN'
5
6 // 消息可以是字符串或预编译的模板函数
7 type MessageValue = string | ((data: unknown) => string
8 )
9 export const messages: Record<ResponseCode, Record<Locale, MessageValue>> = {
10 [ResponseCode.Success]: {
11 'en-US': 'Success',
12 'zh-CN': '请求成功',
13 },
14
15 // 10000 (common)
16 [ResponseCode.ValidationFailed]: {
17 'en-US': 'Validation failed',
18 'zh-CN': '参数验证失败',
19 },
20 [ResponseCode.DevOnlyEndpoint]: {
21 'en-US': 'This endpoint is only available in development environment',
22 'zh-CN': '该接口仅在开发环境下可用',
23 },
24
25 // 10100 (s3)
26 [ResponseCode.S3DownloadFileFailed]: {
27 'en-US': 'Failed to download file from S3',
28 'zh-CN': 'S3 文件下载失败',
29 },
30 [ResponseCode.S3UploadFailed]: {
31 'en-US': 'Failed to upload file to S3',
32 'zh-CN': 'S3文件上传失败',
33 },
34 [ResponseCode.InvalidGcsUri]: {
35 'en-US': 'Invalid GCS URI format',
36 'zh-CN': '无效的 GCS URI 格式',
37 },
38 [ResponseCode.ConfigEditorUnsupportedFormat]: {
39 'en-US': 'Unsupported config file format',
40 'zh-CN': '不支持的配置文件格式',
41 },
42 [ResponseCode.ConfigEditorParseFailed]: {
43 'en-US': 'Failed to parse config file',
44 'zh-CN': '配置文件解析失败',
45 },
46 [ResponseCode.ConfigEditorValidationFailed]: {
47 'en-US': 'Config validation failed',
48 'zh-CN': '配置校验失败',
49 },
50 [ResponseCode.ConfigEditorReadFailed]: {
51 'en-US': 'Failed to read config file',
52 'zh-CN': '配置文件读取失败',
53 },
54 [ResponseCode.ConfigEditorWriteFailed]: {
55 'en-US': 'Failed to write config file',
56 'zh-CN': '配置文件写入失败',
57 },
58 [ResponseCode.ConfigEditorConfigPathMissing]: {
59 'en-US': 'Config path is missing',
60 'zh-CN': '配置文件路径缺失',
61 },
62 [ResponseCode.ConfigEditorPm2Unavailable]: {
63 'en-US': 'PM2 is not available',
64 'zh-CN': 'PM2 不可用',
65 },
66 [ResponseCode.ConfigEditorRestartFailed]: {
67 'en-US': 'Failed to restart service with PM2',
68 'zh-CN': 'PM2 重启服务失败',
69 },
70
71 // 12000 (user)
72 [ResponseCode.UserNotFound]: {
73 'en-US': 'User not found',
74 'zh-CN': '用户未找到',
75 },
76 [ResponseCode.UserStorageExceeded]: {
77 'en-US': 'User storage exceeded',
78 'zh-CN': '用户存储空间超限',
79 },
80 [ResponseCode.UserStatusError]: {
81 'en-US': 'User status error',
82 'zh-CN': '用户状态错误',
83 },
84
85 // 12300 (ai)
86 [ResponseCode.InvalidModel]: {
87 'en-US': 'Invalid AI model',
88 'zh-CN': '无效的 AI 模型',
89 },
90 [ResponseCode.AiCallFailed]: {
91 'en-US': template.compile('AI call failed: {{error}}'),
92 'zh-CN': template.compile('AI 调用失败:{{error}}'),
93 },
94 [ResponseCode.InvalidAiTaskId]: {
95 'en-US': 'Invalid AI task ID',
96 'zh-CN': '无效的 AI 任务 ID',
97 },
98 [ResponseCode.AiLogNotFound]: {
99 'en-US': 'AI log not found',
100 'zh-CN': 'AI 日志未找到',
101 },
102 [ResponseCode.DraftGenerationMemoryNotFound]: {
103 'en-US': 'Draft generation memory not found',
104 'zh-CN': '草稿生成 memory 未找到',
105 },
106 [ResponseCode.VideoUploadInvalidInput]: {
107 'en-US': 'Invalid video input type',
108 'zh-CN': '无效的视频输入类型',
109 },
110 [ResponseCode.VideoUploadJobIdNotFound]: {
111 'en-US': 'Failed to get upload job ID',
112 'zh-CN': '获取上传任务 ID 失败',
113 },
114 [ResponseCode.VideoUploadTaskInfoNotFound]: {
115 'en-US': 'Failed to get upload task information',
116 'zh-CN': '获取上传任务信息失败',
117 },
118 [ResponseCode.VideoUploadVidNotFound]: {
119 'en-US': 'Failed to get video ID from upload result',
120 'zh-CN': '从上传结果中获取视频 ID 失败',
121 },
122 [ResponseCode.VideoUploadFailed]: {
123 'en-US': 'Video upload task failed',
124 'zh-CN': '视频上传任务失败',
125 },
126
127 // 12600 (account)
128 [ResponseCode.AccountNotFound]: {
129 'en-US': 'Account not found',
130 'zh-CN': '账号未找到',
131 },
132 [ResponseCode.AccountGroupNotFound]: {
133 'en-US': 'Account group not found',
134 'zh-CN': '账号分组未找到',
135 },
136 [ResponseCode.AccountStatisticsNotFound]: {
137 'en-US': 'Account statistics not found',
138 'zh-CN': '账号不存在',
139 },
140 [ResponseCode.AccountGroupCountryCodeInvalid]: {
141 'en-US': 'Account group country code invalid',
142 'zh-CN': '账号分组国家代码无效',
143 },
144 [ResponseCode.AccountCreateFailed]: {
145 'en-US': 'Account create failed',
146 'zh-CN': '账号创建失败',
147 },
148 [ResponseCode.AccountRefreshTooFrequent]: {
149 'en-US': 'Statistics refresh too frequent, please try again after 10 minutes',
150 'zh-CN': '刷新过于频繁,请10分钟后再试',
151 },
152 [ResponseCode.AccountRefreshNotSupported]: {
153 'en-US': 'This platform does not support manual statistics refresh',
154 'zh-CN': '该平台暂不支持手动刷新统计数据',
155 },
156
157 // 12700 (media)
158 [ResponseCode.MediaNotFound]: {
159 'en-US': 'Media not found',
160 'zh-CN': '媒体文件未找到',
161 },
162 [ResponseCode.MediaGroupNotFound]: {
163 'en-US': 'Media group not found',
164 'zh-CN': '媒体分组未找到',
165 },
166 [ResponseCode.MediaGroupDefaultNotAllowed]: {
167 'en-US': 'Default media group cannot be deleted',
168 'zh-CN': '默认媒体组不能删除',
169 },
170
171 // 12750 (assets)
172 [ResponseCode.AssetNotFound]: {
173 'en-US': 'Asset not found',
174 'zh-CN': '资源未找到',
175 },
176 [ResponseCode.AssetUploadFailed]: {
177 'en-US': 'Failed to upload asset',
178 'zh-CN': '资源上传失败',
179 },
180 [ResponseCode.AssetTooLarge]: {
181 'en-US': 'Asset too large',
182 'zh-CN': '资源过大',
183 },
184
185 // 12800 (material)
186 [ResponseCode.MaterialNotFound]: {
187 'en-US': 'Material not found',
188 'zh-CN': '素材未找到',
189 },
190 [ResponseCode.MaterialGroupNotFound]: {
191 'en-US': 'Material group not found',
192 'zh-CN': '素材分组未找到',
193 },
194 [ResponseCode.MaterialGroupDefaultNotAllowed]: {
195 'en-US': 'Default material group cannot be deleted',
196 'zh-CN': '默认素材组不能删除',
197 },
198 // 12900 (content/material)
199 [ResponseCode.MaterialGroupEmpty]: {
200 'en-US': 'Material group cannot be empty',
201 'zh-CN': '素材组不能为空',
202 },
203 [ResponseCode.MaterialGroupTypeError]: {
204 'en-US': 'Material group type error',
205 'zh-CN': '素材组类型错误',
206 },
207 [ResponseCode.MediaGroupTypeNotSupported]: {
208 'en-US': 'Media group type not supported',
209 'zh-CN': '暂不支持该素材类型',
210 },
211 [ResponseCode.GroupInfoNotFound]: {
212 'en-US': 'Group information not found',
213 'zh-CN': '组信息不存在',
214 },
215
216 // 13200 (admin-operation)
217 [ResponseCode.AdminOperationPasswordError]: {
218 'en-US': 'Incorrect operation password',
219 'zh-CN': '操作密码错误',
220 },
221
222 // 15000 (channel/publish)
223 [ResponseCode.PublishRecordNotFound]: {
224 'en-US': 'publish record with flowId {{flowId}} not found.',
225 'zh-CN': '发布记录未找到',
226 },
227 [ResponseCode.PublishTaskAlreadyPublishing]: {
228 'en-US': 'Publish task is already publishing',
229 'zh-CN': '发布任务正在执行中',
230 },
231 [ResponseCode.PublishTaskAlreadyCompleted]: {
232 'en-US': 'Publish task is already completed',
233 'zh-CN': '发布任务已完成',
234 },
235 [ResponseCode.ChannelAccountNotAuthorized]: {
236 'en-US': 'Account is not authorized. Please re-authorize the account.',
237 'zh-CN': '账号未授权,请重新授权账号',
238 },
239 [ResponseCode.ChannelAuthorizationExpired]: {
240 'en-US': 'Authorization expired. Please re-authorize the account.',
241 'zh-CN': '授权已过期,请重新授权账号',
242 },
243 [ResponseCode.ChannelAccountInfoFailed]: {
244 'en-US': 'Failed to get account information',
245 'zh-CN': '账号信息获取失败',
246 },
247 [ResponseCode.PublishTaskNotFound]: {
248 'en-US': 'Publish task not found',
249 'zh-CN': '未发现任务',
250 },
251 [ResponseCode.ChannelCredentialNotFound]: {
252 'en-US': 'Account credential not found. Please re-authorize the account.',
253 'zh-CN': '账号授权凭证不存在,请重新授权账号',
254 },
255 [ResponseCode.ChannelRefreshTokenNotFound]: {
256 'en-US': 'Refresh token not found. Please re-authorize the account.',
257 'zh-CN': '刷新令牌不存在,请重新授权账号',
258 },
259 [ResponseCode.ChannelRefreshTokenExpired]: {
260 'en-US': 'Refresh token expired. Please re-authorize the account.',
261 'zh-CN': '刷新令牌已过期,请重新授权账号',
262 },
263 [ResponseCode.ChannelRefreshTokenFailed]: {
264 'en-US': 'Failed to refresh authorization. Please re-authorize the account.',
265 'zh-CN': '刷新授权失败,请重新授权账号',
266 },
267 [ResponseCode.ChannelAccessTokenFailed]: {
268 'en-US': 'Failed to get access token. Please re-authorize the account.',
269 'zh-CN': '获取访问令牌失败,请重新授权账号',
270 },
271 [ResponseCode.ChannelPlatformTokenNotFound]: {
272 'en-US': 'Platform authorization token not found. Please re-authorize the account.',
273 'zh-CN': '不存在平台授权令牌,请重新授权账号',
274 },
275 [ResponseCode.ChannelAuthTaskFailed]: {
276 'en-US': 'Failed to create authorization task',
277 'zh-CN': '创建授权任务失败',
278 },
279 [ResponseCode.ChannelAuthorizationFailed]: {
280 'en-US': 'Authorization permission denied',
281 'zh-CN': '授权权限不足',
282 },
283 [ResponseCode.ChannelNoAccountsFound]: {
284 'en-US': 'No accounts found',
285 'zh-CN': '未找到账号',
286 },
287 [ResponseCode.PublishServiceNotFound]: {
288 'en-US': 'publish service for {{publishTask.accountType}} not found',
289 'zh-CN': '未找到发布服务',
290 },
291 [ResponseCode.PublishTaskFailed]: {
292 'en-US': 'task publish failed, accountType: {{accountType}}',
293 'zh-CN': '任务发布失败',
294 },
295 [ResponseCode.PublishTaskInProgress]: {
296 'en-US': 'Task is in progress and cannot be deleted',
297 'zh-CN': '任务正在执行中,无法删除',
298 },
299 [ResponseCode.PublishTaskStatusInvalid]: {
300 'en-US': 'Task has been published or is in progress',
301 'zh-CN': '任务已发布或正在进行中',
302 },
303 [ResponseCode.PublishTimeInvalid]: {
304 'en-US': 'Publish time cannot be in the past',
305 'zh-CN': '发布时间不能小于当前时间',
306 },
307 [ResponseCode.EngagementTaskInProgress]: {
308 'en-US': 'Reply task for this post is already in progress',
309 'zh-CN': '该帖子的回复任务已在进行中',
310 },
311 [ResponseCode.ChannelAccountNotFound]: {
312 'en-US': 'Account not found',
313 'zh-CN': '账户不存在',
314 },
315 [ResponseCode.InteractAccountTypeNotSupported]: {
316 'en-US': 'Account type not supported for interaction',
317 'zh-CN': '暂不支持该账户类型',
318 },
319 [ResponseCode.InteractRecordNotFound]: {
320 'en-US': 'Publish record not found',
321 'zh-CN': '未找到发布记录',
322 },
323 [ResponseCode.ChannelAccountCreateNotSupported]: {
324 'en-US': 'This platform does not support account creation via this endpoint',
325 'zh-CN': '该平台暂不支持通过此接口创建账号',
326 },
327 [ResponseCode.ChannelAccountAlreadyConnectedToAnotherUser]: {
328 'en-US': 'This channel account is already connected to another user',
329 'zh-CN': '该渠道账号已绑定到其他用户',
330 },
331 [ResponseCode.DataCubeAccountTypeNotSupported]: {
332 'en-US': 'Account type not supported for data cube',
333 'zh-CN': '暂不支持该账户类型',
334 },
335 [ResponseCode.ChannelPublishTaskAlreadyExists]: {
336 'en-US': 'publish task with flowId {{flowId}} already exists',
337 'zh-CN': '发布任务已存在',
338 },
339 [ResponseCode.PublishTaskNotPublished]: {
340 'en-US': 'Publish task not published',
341 'zh-CN': '发布任务未发布',
342 },
343 [ResponseCode.PublishTaskAlreadyUpdating]: {
344 'en-US': 'Publish task is already updating',
345 'zh-CN': '发布任务正在更新中',
346 },
347 [ResponseCode.PlatformNotSupported]: {
348 'en-US': 'Platform not supported for update published post',
349 'zh-CN': '暂不支持该平台',
350 },
351 [ResponseCode.PostCategoryNotSupported]: {
352 'en-US': 'Post category not supported for update published post',
353 'zh-CN': '暂不支持该帖子类型',
354 },
355 [ResponseCode.PublishTaskAlreadyWaitingForUpdate]: {
356 'en-US': 'Publish task is already waiting for update',
357 'zh-CN': '发布任务已等待更新',
358 },
359 [ResponseCode.PublishTaskUpdateFailed]: {
360 'en-US': 'Failed to update publish task',
361 'zh-CN': '更新发布任务失败',
362 },
363 [ResponseCode.DeletePostFailed]: {
364 'en-US': 'Failed to delete post',
365 'zh-CN': '删除作品失败',
366 },
367 [ResponseCode.PublishTaskInvalid]: {
368 'en-US': 'Publish task invalid',
369 'zh-CN': '发布任务无效',
370 },
371 [ResponseCode.InvalidWorkLink]: {
372 'en-US': 'Invalid work link',
373 'zh-CN': '作品链接无效',
374 },
375 [ResponseCode.WorkNotBelongToAccount]: {
376 'en-US': 'The work does not belong to this account',
377 'zh-CN': '该作品不属于此账号',
378 },
379 [ResponseCode.PublishResourceUnavailable]: {
380 'en-US': template.compile('Publish resource is not accessible: {{url}} (status: {{status}})'),
381 'zh-CN': template.compile('发布资源不可访问:{{url}}(状态:{{status}})'),
382 },
383 [ResponseCode.ChannelAuthSessionInvalid]: {
384 'en-US': 'Invalid or expired authorization session',
385 'zh-CN': '授权会话无效或已过期',
386 },
387 [ResponseCode.ChannelAuthPlatformMismatch]: {
388 'en-US': 'Authorization platform does not match',
389 'zh-CN': '授权平台不匹配',
390 },
391 [ResponseCode.ChannelAuthSessionCompleted]: {
392 'en-US': 'Authorization session has already been completed',
393 'zh-CN': '授权会话已完成',
394 },
395 [ResponseCode.ChannelAuthCsrfInvalid]: {
396 'en-US': 'Invalid authorization security token',
397 'zh-CN': '授权安全令牌无效',
398 },
399 [ResponseCode.ChannelAuthSelectableAccountsNotFound]: {
400 'en-US': 'No selectable accounts found',
401 'zh-CN': '未找到可选择的账号',
402 },
403 [ResponseCode.ChannelAuthSelectionRequired]: {
404 'en-US': 'Select at least one account to continue',
405 'zh-CN': '请至少选择一个账号继续',
406 },
407 [ResponseCode.ChannelAuthSelectedAccountUnavailable]: {
408 'en-US': 'Selected account is not available in this authorization session',
409 'zh-CN': '所选账号不属于当前授权会话',
410 },
411 [ResponseCode.ChannelAuthCodeMissing]: {
412 'en-US': 'Authorization code is missing',
413 'zh-CN': '缺少授权 code',
414 },
415 [ResponseCode.ChannelAuthRefreshTokenMissing]: {
416 'en-US': 'Refresh token is missing',
417 'zh-CN': '缺少刷新令牌',
418 },
419 [ResponseCode.ChannelAuthPlatformUidMissing]: {
420 'en-US': 'Platform user ID is missing',
421 'zh-CN': '缺少平台用户 ID',
422 },
423 [ResponseCode.ChannelAuthAccountAccessRevoked]: {
424 'en-US': 'Account access has been revoked',
425 'zh-CN': '账号访问权限已失效',
426 },
427 [ResponseCode.ChannelAuthCodeOrStateMissing]: {
428 'en-US': 'Authorization code or state is missing',
429 'zh-CN': '缺少授权 code 或 state',
430 },
431 [ResponseCode.ChannelOAuthIdentityAlreadyConnectedToAnotherUser]: {
432 'en-US': 'This OAuth identity is already connected to another user',
433 'zh-CN': '该 OAuth 身份已绑定到其他用户',
434 },
435 [ResponseCode.ChannelOAuthUserAlreadyConnectedToAnotherIdentity]: {
436 'en-US': 'Current user has already connected another OAuth identity for this platform',
437 'zh-CN': '当前用户已绑定该平台的其他 OAuth 身份',
438 },
439 [ResponseCode.PublishFlowNotFound]: {
440 'en-US': 'Publish flow not found',
441 'zh-CN': '发布流程未找到',
442 },
443 [ResponseCode.ChannelPublishValidationFailed]: {
444 'en-US': 'Publish content validation failed',
445 'zh-CN': '发布内容校验失败',
446 },
447 [ResponseCode.ChannelPublishDuplicateItem]: {
448 'en-US': template.compile('Duplicate publish item for {{platform}} account {{accountId}}'),
449 'zh-CN': template.compile('{{platform}} 账号 {{accountId}} 存在重复发布项'),
450 },
451 [ResponseCode.ChannelPublishMixedRelayAndLocalAccounts]: {
452 'en-US': 'Cannot mix relay and local accounts in one publish flow',
453 'zh-CN': '同一个发布流程不能混用中继账号和本地账号',
454 },
455 [ResponseCode.ChannelPublishQueueRemoveFailed]: {
456 'en-US': 'Failed to remove publish task from queue',
457 'zh-CN': '发布任务移出队列失败',
458 },
459 [ResponseCode.ChannelPublishPlatformCancelFailed]: {
460 'en-US': 'Failed to cancel publish task on platform',
461 'zh-CN': '平台侧取消发布任务失败',
462 },
463 [ResponseCode.ChannelPublishCancelNotSupported]: {
464 'en-US': 'This platform does not support canceling scheduled publish tasks',
465 'zh-CN': '该平台不支持取消已预约的发布任务',
466 },
467 [ResponseCode.ChannelPublishQueueFailed]: {
468 'en-US': 'Failed to queue publish task',
469 'zh-CN': '发布任务入队失败',
470 },
471 [ResponseCode.ChannelPublishTimeUpdateNotAllowed]: {
472 'en-US': 'Publish time cannot be updated for this task status',
473 'zh-CN': '当前任务状态不允许修改发布时间',
474 },
475 [ResponseCode.ChannelPublishNowNotAllowed]: {
476 'en-US': 'This task status cannot be published now',
477 'zh-CN': '当前任务状态不允许立即发布',
478 },
479 [ResponseCode.ChannelPublishUpdateNotAllowed]: {
480 'en-US': 'This task status cannot be updated',
481 'zh-CN': '当前任务状态不允许更新',
482 },
483 [ResponseCode.ChannelPublishPlatformWorkIdMissing]: {
484 'en-US': 'Platform work ID is missing',
485 'zh-CN': '缺少平台作品 ID',
486 },
487 [ResponseCode.ChannelPublishUpdateNotSupported]: {
488 'en-US': 'This platform does not support updating published posts',
489 'zh-CN': '该平台不支持更新已发布作品',
490 },
491 [ResponseCode.ChannelPublishPlatformNotSupported]: {
492 'en-US': 'This platform does not support publishing',
493 'zh-CN': '该平台不支持发布',
494 },
495 [ResponseCode.ChannelPublishPlatformStatusFailed]: {
496 'en-US': template.compile('Platform publish failed with status {{status}}'),
497 'zh-CN': template.compile('平台发布失败,状态码:{{status}}'),
498 },
499 [ResponseCode.ChannelPublishRetryNotAllowed]: {
500 'en-US': 'This publish task cannot be retried',
501 'zh-CN': '当前发布任务不允许重试',
502 },
503 [ResponseCode.ChannelWebhookNotSupported]: {
504 'en-US': 'This platform does not support webhooks',
505 'zh-CN': '该平台不支持 webhook',
506 },
507 [ResponseCode.ChannelWebhookChallengeNotSupported]: {
508 'en-US': 'This platform does not support webhook challenge',
509 'zh-CN': '该平台不支持 webhook 校验请求',
510 },
511 [ResponseCode.ChannelWebhookInvalidSignature]: {
512 'en-US': 'Invalid webhook signature',
513 'zh-CN': 'Webhook 签名无效',
514 },
515 [ResponseCode.ChannelWebhookInvalidVerifyToken]: {
516 'en-US': 'Invalid webhook verify token',
517 'zh-CN': 'Webhook verify token 无效',
518 },
519 [ResponseCode.ChannelWebhookChallengeCodeMissing]: {
520 'en-US': 'Webhook challenge code is missing',
521 'zh-CN': '缺少 webhook challenge code',
522 },
523 [ResponseCode.ChannelWebhookPublishFailed]: {
524 'en-US': template.compile('Publish failed by {{platform}} webhook'),
525 'zh-CN': template.compile('{{platform}} webhook 回调发布失败'),
526 },
527 [ResponseCode.ChannelPlatformApiFailed]: {
528 'en-US': template.compile('{{platform}} platform API request failed'),
529 'zh-CN': template.compile('{{platform}} 平台接口请求失败'),
530 },
531 [ResponseCode.ChannelPlatformServiceUnavailable]: {
532 'en-US': template.compile('{{platform}} platform service is temporarily unavailable, please try again later'),
533 'zh-CN': template.compile('{{platform}} 平台方服务异常,请稍后再试'),
534 },
535 [ResponseCode.ChannelPlatformRateLimited]: {
536 'en-US': template.compile('{{platform}} platform API rate limit reached'),
537 'zh-CN': template.compile('{{platform}} 平台接口触发频率限制'),
538 },
539 [ResponseCode.ChannelPlatformResponseInvalid]: {
540 'en-US': template.compile('{{platform}} platform API returned an invalid response'),
541 'zh-CN': template.compile('{{platform}} 平台接口返回数据无效'),
542 },
543 [ResponseCode.ChannelPlatformMediaUnsupported]: {
544 'en-US': template.compile('{{platform}} does not support this media'),
545 'zh-CN': template.compile('{{platform}} 不支持该媒体'),
546 },
547 [ResponseCode.ChannelPlatformMediaProcessingFailed]: {
548 'en-US': template.compile('{{platform}} media processing failed'),
549 'zh-CN': template.compile('{{platform}} 媒体处理失败'),
550 },
551 [ResponseCode.ChannelPlatformMediaProcessingTimeout]: {
552 'en-US': template.compile('{{platform}} media processing timed out'),
553 'zh-CN': template.compile('{{platform}} 媒体处理超时'),
554 },
555 [ResponseCode.ChannelPlatformAccountMissing]: {
556 'en-US': template.compile('{{platform}} account information is missing'),
557 'zh-CN': template.compile('缺少 {{platform}} 账号信息'),
558 },
559 [ResponseCode.ChannelPlatformPublishOptionMissing]: {
560 'en-US': template.compile('{{platform}} publish option is missing'),
561 'zh-CN': template.compile('缺少 {{platform}} 发布选项'),
562 },
563 [ResponseCode.ChannelPlatformPermissionMissing]: {
564 'en-US': template.compile('{{platform}} account permission is missing'),
565 'zh-CN': template.compile('{{platform}} 账号缺少所需权限'),
566 },
567 [ResponseCode.ChannelPlatformWorkNotFound]: {
568 'en-US': template.compile('{{platform}} work was not found'),
569 'zh-CN': template.compile('未找到 {{platform}} 作品'),
570 },
571 [ResponseCode.ChannelPlatformOperationNotSupported]: {
572 'en-US': template.compile('{{platform}} does not support this operation'),
573 'zh-CN': template.compile('{{platform}} 不支持该操作'),
574 },
575 [ResponseCode.ChannelPaginationModeNotSupported]: {
576 'en-US': template.compile('{{platform}} does not support this pagination mode'),
577 'zh-CN': template.compile('{{platform}} 不支持该分页模式'),
578 },
579 [ResponseCode.ChannelPaginationLimitExceeded]: {
580 'en-US': template.compile('{{platform}} pagination limit exceeds the maximum'),
581 'zh-CN': template.compile('{{platform}} 分页数量超过上限'),
582 },
583 [ResponseCode.ChannelPaginationPageSizeExceeded]: {
584 'en-US': template.compile('{{platform}} pagination page size exceeds the maximum'),
585 'zh-CN': template.compile('{{platform}} 分页页大小超过上限'),
586 },
587 [ResponseCode.ChannelPaginationDirectionNotSupported]: {
588 'en-US': template.compile('{{platform}} does not support this pagination direction'),
589 'zh-CN': template.compile('{{platform}} 不支持该分页方向'),
590 },
591 [ResponseCode.ChannelPublishPermalinkMissing]: {
592 'en-US': 'Published work permalink is missing',
593 'zh-CN': '缺少已发布作品链接',
594 },
595 [ResponseCode.ChannelAccountCreateRequiredFieldMissing]: {
596 'en-US': 'Required channel account creation field is missing',
597 'zh-CN': '缺少渠道账号创建必填字段',
598 },
599
600 // 15100 (short-link)
601 [ResponseCode.ShortLinkNotFound]: {
602 'en-US': 'Short link not found',
603 'zh-CN': '短链接不存在',
604 },
605 [ResponseCode.ShortLinkExpired]: {
606 'en-US': 'Short link has expired',
607 'zh-CN': '短链接已过期',
608 },
609
610 // 16000 (channel/work)
611 [ResponseCode.WorkDetailNotFound]: {
612 'en-US': 'Work detail not found',
613 'zh-CN': '无法获取作品详情',
614 },
615 [ResponseCode.AccountAuthRequired]: {
616 'en-US': 'This platform requires account authorization before submission',
617 'zh-CN': '该平台需要先授权账号才能提交',
618 },
619
620 // 18000 (agent)
621 [ResponseCode.AgentTaskNotFound]: {
622 'en-US': 'Agent task not found',
623 'zh-CN': '代理任务未找到',
624 },
625 [ResponseCode.AgentTaskStatusInvalid]: {
626 'en-US': 'Agent task status is invalid',
627 'zh-CN': '代理任务状态无效',
628 },
629 [ResponseCode.GenerateImagesFailed]: {
630 'en-US': 'Failed to generate images',
631 'zh-CN': '生成图片失败',
632 },
633 [ResponseCode.GenerateVideosFailed]: {
634 'en-US': 'Failed to generate videos',
635 'zh-CN': '生成视频失败',
636 },
637 [ResponseCode.AgentTaskFailed]: {
638 'en-US': 'Agent task failed',
639 'zh-CN': '代理任务失败',
640 },
641 [ResponseCode.DailyTaskQuotaExceeded]: {
642 'en-US': 'Daily task quota exceeded',
643 'zh-CN': '每日代理任务配额已超出',
644 },
645 [ResponseCode.GenerateContentFailed]: {
646 'en-US': 'Failed to generate content',
647 'zh-CN': '生成内容失败',
648 },
649 [ResponseCode.AgentTaskTimeout]: {
650 'en-US': 'Agent task timeout: task has been running for too long without updates',
651 'zh-CN': '代理任务超时:任务运行时间过长且未更新',
652 },
653 [ResponseCode.AgentTaskNotRunning]: {
654 'en-US': 'Agent task is not running',
655 'zh-CN': '代理任务未在运行状态',
656 },
657 [ResponseCode.AgentSessionRecoveryFailed]: {
658 'en-US': 'Failed to recover agent session, please try to create a new conversation',
659 'zh-CN': '恢复代理任务会话失败, 请尝试新建会话',
660 },
661 // 18300 (place-draft)
662 [ResponseCode.PlaceDraftNotFound]: {
663 'en-US': 'Place draft not found',
664 'zh-CN': '地点草稿未找到',
665 },
666
667 // 19000 (api-key / relay)
668 [ResponseCode.ApiKeyInvalid]: {
669 'en-US': 'Invalid API key',
670 'zh-CN': 'API Key 无效',
671 },
672 [ResponseCode.RelayServerUnavailable]: {
673 'en-US': 'Relay server unavailable',
674 'zh-CN': '中转服务器不可用',
675 },
676 }
677
677 lines TYPESCRIPT