From aa836dda04536029d7b5ffd42bb8faa21fd47165 Mon Sep 17 00:00:00 2001 From: qiyinxi Date: Sat, 5 Sep 2026 19:06:34 +0200 Subject: [PATCH] =?UTF-8?q?fix(i18n):=20HSR=20=E7=94=A8=E6=88=B7=E9=A1=B5?= =?UTF-8?q?=E6=AE=8B=E7=95=99=E7=9A=84=E7=A1=AC=E7=BC=96=E7=A0=81=E4=B8=AD?= =?UTF-8?q?=E6=96=87=E6=96=87=E6=A1=88=E6=8E=A5=E5=85=A5=E5=A4=9A=E8=AF=AD?= =?UTF-8?q?=E8=A8=80=E8=AF=8D=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit HSR 用户页在 PR #487 英文化之后重做过,一批纯展示文案没进词表, 英文与日文界面直接看到中文。本次接入: - HSRUserEdit.vue:页面头部「编辑/添加 HSR 用户」、用户名与剩余天数 label(复用 edit.username / edit.daysLeft)、历战余响与周常的 「本周已完成/未完成」tag、「最近完成:{date}」、服务器选项「官服」 - ManagedTaskSection.vue:「动态 {n} 项」、「读取自:{source}」、 周常/日常(复用 edit.weekly,新增 edit.daily)、引擎名(M7A 复用 edit.directEngineM7a)、「不可用」、「未读取到原生配置」、任务摘要的 已启用/未启用 · {n} 项配置 · {n} 个开关已开 - StageConfigSection.vue:刷取副本四个选项的 label(复用 edit.calyxGolden / calyxCrimson / cavernsCorrosion / ornamentExtraction)、 「请重新选择副本」、「未配置」 serverOptions 与 activeChannelOptions 改为 computed,切换语言时选项 label 能跟着刷新;value 一律保持原值。 刻意保留的中文:StageConfigSection 里 isEowCategory、categoryKeysByChannel、 currentStageColor 拿中文和后端返回的 categoryKey/category 做比对, useHSRPluginApi 比对后端 warning 前缀,翻了就会失配;logger 与报错 toast 按既定口径不翻。 Co-Authored-By: Claude Opus 5 --- frontend/src/i18n/locales/en-US.ts | 17 +++++++++++ frontend/src/i18n/locales/ja-JP.ts | 17 +++++++++++ frontend/src/i18n/locales/zh-CN.ts | 17 +++++++++++ .../src/views/EditView/User/HSRUserEdit.vue | 28 +++++++++++++------ .../User/HSRUserEdit/ManagedTaskSection.vue | 25 +++++++++++------ .../User/HSRUserEdit/StageConfigSection.vue | 16 +++++------ res/version.json | 3 +- 7 files changed, 98 insertions(+), 25 deletions(-) diff --git a/frontend/src/i18n/locales/en-US.ts b/frontend/src/i18n/locales/en-US.ts index f5d269baf..ce3a7c3a4 100644 --- a/frontend/src/i18n/locales/en-US.ts +++ b/frontend/src/i18n/locales/en-US.ts @@ -634,6 +634,23 @@ export default { 'Switching the engine swaps in the native options and stages of that engine. Values changed under the current engine are not carried over, but they are kept and come back when you switch back.', hsrStageMissingForEngine: 'The trailblaze power engine is now {engine}, and no stage is selected under it. Stages are stored per engine, so stages picked under the other engine are not carried over — pick them again. Switching back restores the previous selection.', + editHsrUser: 'Edit the HSR user', + addHsrUser: 'Add an HSR user', + hsrServerCnOfficial: 'CN official', + hsrWeekDone: 'Done this week', + hsrWeekNotDone: 'Not done this week', + hsrLastCompleted: 'Last completed: {date}', + hsrDynamicTaskCount: '{n} dynamic modules', + hsrReadFrom: 'Read from: {source}', + daily: 'Daily', + hsrEngineUnavailable: 'Unavailable', + hsrNativeConfigNotLoaded: 'Native configuration not loaded', + hsrTaskEnabled: 'Enabled', + hsrTaskNotEnabled: 'Not enabled', + hsrTaskFieldCount: '{n} options', + hsrTaskSwitchesOn: '{n} switches on', + hsrRepickStage: 'Pick the stage again', + notConfigured: 'Not configured', howUseThis: 'How to use this', whenSavingMasEncrypts: 'When saving, MAS encrypts the account password. Without SRA configured, or when the SRA module is unused, the password is not used for account switching.', diff --git a/frontend/src/i18n/locales/ja-JP.ts b/frontend/src/i18n/locales/ja-JP.ts index 8b9a483a6..d44567e85 100644 --- a/frontend/src/i18n/locales/ja-JP.ts +++ b/frontend/src/i18n/locales/ja-JP.ts @@ -630,6 +630,23 @@ export default { '実行エンジンを切り替えると、そのエンジン固有のネイティブ設定項目とステージに切り替わります。現在のエンジンで変更した値は引き継がれませんが保持され、戻すと再び表示されます。', hsrStageMissingForEngine: '現在の開拓力エンジンは {engine} で、このエンジンではまだステージが選ばれていません。ステージはエンジンごとに保存されるため、別のエンジンで選んだステージは引き継がれません。選び直してください。元のエンジンに戻すと以前の選択が復元されます。', + editHsrUser: 'HSR ユーザーを編集', + addHsrUser: 'HSR ユーザーを追加', + hsrServerCnOfficial: '公式サーバー', + hsrWeekDone: '今週完了', + hsrWeekNotDone: '今週未完了', + hsrLastCompleted: '最終完了:{date}', + hsrDynamicTaskCount: '動的 {n} 件', + hsrReadFrom: '読み込み元:{source}', + daily: '日課', + hsrEngineUnavailable: '利用不可', + hsrNativeConfigNotLoaded: 'ネイティブ設定を読み込めませんでした', + hsrTaskEnabled: '有効', + hsrTaskNotEnabled: '無効', + hsrTaskFieldCount: '設定 {n} 項目', + hsrTaskSwitchesOn: 'スイッチ {n} 個オン', + hsrRepickStage: 'ステージを選び直してください', + notConfigured: '未設定', howUseThis: '使い方', whenSavingMasEncrypts: '保存時に MAS がアカウントのパスワードを暗号化します。SRA が未設定、または SRA モジュールを使わない場合、パスワードはアカウント切り替えに使われません。', diff --git a/frontend/src/i18n/locales/zh-CN.ts b/frontend/src/i18n/locales/zh-CN.ts index b02aef6d0..68caae464 100644 --- a/frontend/src/i18n/locales/zh-CN.ts +++ b/frontend/src/i18n/locales/zh-CN.ts @@ -611,6 +611,23 @@ export default { '切换执行引擎会改用该引擎自己的一套原生配置项和体力副本;当前引擎下改过的值不会带过去,但会保留,切回时仍在。', hsrStageMissingForEngine: '当前体力执行引擎为 {engine},该引擎下尚未选择副本。副本按引擎分别保存,另一引擎下已选的副本不会自动带过来,请重新选择;切回原引擎时原选择仍保留。', + editHsrUser: '编辑 HSR 用户', + addHsrUser: '添加 HSR 用户', + hsrServerCnOfficial: '官服', + hsrWeekDone: '本周已完成', + hsrWeekNotDone: '本周未完成', + hsrLastCompleted: '最近完成:{date}', + hsrDynamicTaskCount: '动态 {n} 项', + hsrReadFrom: '读取自:{source}', + daily: '日常', + hsrEngineUnavailable: '不可用', + hsrNativeConfigNotLoaded: '未读取到原生配置', + hsrTaskEnabled: '已启用', + hsrTaskNotEnabled: '未启用', + hsrTaskFieldCount: '{n} 项配置', + hsrTaskSwitchesOn: '{n} 个开关已开', + hsrRepickStage: '请重新选择副本', + notConfigured: '未配置', howUseThis: '使用说明', whenSavingMasEncrypts: '保存时 MAS 会自动加密账号密码。未配置 SRA 或未使用 SRA 模块时,账号密码不会用于切号。', diff --git a/frontend/src/views/EditView/User/HSRUserEdit.vue b/frontend/src/views/EditView/User/HSRUserEdit.vue index c6d4a4c8c..125a572b7 100644 --- a/frontend/src/views/EditView/User/HSRUserEdit.vue +++ b/frontend/src/views/EditView/User/HSRUserEdit.vue @@ -5,7 +5,7 @@ :script-name="scriptName" :is-edit="isEdit" script-edit-segment="hsr" - :current-label="isEdit ? '编辑 HSR 用户' : '添加 HSR 用户'" + :current-label="isEdit ? t('edit.editHsrUser') : t('edit.addHsrUser')" :logo-src="hsrLogo" @cancel="handleCancel" /> @@ -39,7 +39,7 @@ @@ -109,7 +109,7 @@ @@ -219,13 +219,17 @@
{{ t('edit.echoOfWar') }} - 本周 {{ eowCompletedThisWeek ? '已完成' : '未完成' }} + {{ eowCompletedThisWeek ? t('edit.hsrWeekDone') : t('edit.hsrWeekNotDone') }} - 最近完成:{{ formData.Data.EchoOfWarLastCompletionDate }} + {{ + t('edit.hsrLastCompleted', { + date: formData.Data.EchoOfWarLastCompletionDate, + }) + }}
@@ -247,13 +251,19 @@
{{ t('edit.weekly') }} - 本周 {{ formData.Data.WeeklyCompletedThisWeek ? '已完成' : '未完成' }} + {{ + formData.Data.WeeklyCompletedThisWeek + ? t('edit.hsrWeekDone') + : t('edit.hsrWeekNotDone') + }} - 最近完成:{{ formData.Data.WeeklyLastCompletionDate }} + {{ + t('edit.hsrLastCompleted', { date: formData.Data.WeeklyLastCompletionDate }) + }}
@@ -424,7 +434,9 @@ const hsrStageOptions = ref(null) const hsrStageOptionsLoading = ref(false) const hsrStageOptionsError = ref('') -const serverOptions = [{ value: 'CN-Official', label: '官服' }] +const serverOptions = computed(() => [ + { value: 'CN-Official', label: t('edit.hsrServerCnOfficial') }, +]) const controlModeOptions = [ { value: 'managed', label: t('edit.masManaged') }, { value: 'direct', label: t('edit.scriptDirectControl') }, diff --git a/frontend/src/views/EditView/User/HSRUserEdit/ManagedTaskSection.vue b/frontend/src/views/EditView/User/HSRUserEdit/ManagedTaskSection.vue index a1cd928b4..28acba1e3 100644 --- a/frontend/src/views/EditView/User/HSRUserEdit/ManagedTaskSection.vue +++ b/frontend/src/views/EditView/User/HSRUserEdit/ManagedTaskSection.vue @@ -36,9 +36,9 @@
{{ t('edit.taskModule') }} - 动态 {{ snapshot.tasks.length }} 项 + {{ + t('edit.hsrDynamicTaskCount', { n: snapshot.tasks.length }) + }}