fix(i18n): HSR 用户页残留的硬编码中文文案接入词表 - #571
Merged
qiyinxi merged 1 commit intoSep 5, 2026
Merged
Conversation
HSR 用户页在 PR AUTO-MAS-Project#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 <noreply@anthropic.com>
审查者指南本 PR 补齐 HSR 用户页遗漏的用户可见文案国际化:在三份词表中新增并复用翻译 key,替换用户编辑、任务管理和阶段配置组件中的硬编码中文,同时有意保留协议判断及其他非用户可见字符串不变。 本地化 HSR 用户页渲染时序图sequenceDiagram
participant User
participant HSRUserEdit
participant ManagedTaskSection
participant StageConfigSection
participant I18n
User->>HSRUserEdit: Open HSR user page
HSRUserEdit->>I18n: t(edit.editHsrUser)
HSRUserEdit->>I18n: t(edit.hsrWeekDone / edit.hsrLastCompleted)
HSRUserEdit->>I18n: t(edit.hsrServerCnOfficial)
HSRUserEdit->>ManagedTaskSection: Render managed tasks
ManagedTaskSection->>I18n: t(edit.hsrDynamicTaskCount / edit.hsrTaskEnabled)
ManagedTaskSection->>I18n: t(edit.hsrReadFrom / edit.daily)
HSRUserEdit->>StageConfigSection: Render stage configuration
StageConfigSection->>I18n: t(edit.calyxGolden / edit.hsrRepickStage)
I18n-->>User: Display selected locale text
文件级变更
提示与命令与 Sourcery 交互
自定义你的使用体验访问你的控制面板以:
获取帮助Original review guide in EnglishReviewer's Guide本 PR 补齐 HSR 用户页遗漏的用户可见文案国际化:在三份词表中新增并复用翻译 key,替换用户编辑、任务管理和阶段配置组件中的硬编码中文,同时有意保留协议判断及其他非用户可见字符串不变。 Sequence diagram for localized HSR user page renderingsequenceDiagram
participant User
participant HSRUserEdit
participant ManagedTaskSection
participant StageConfigSection
participant I18n
User->>HSRUserEdit: Open HSR user page
HSRUserEdit->>I18n: t(edit.editHsrUser)
HSRUserEdit->>I18n: t(edit.hsrWeekDone / edit.hsrLastCompleted)
HSRUserEdit->>I18n: t(edit.hsrServerCnOfficial)
HSRUserEdit->>ManagedTaskSection: Render managed tasks
ManagedTaskSection->>I18n: t(edit.hsrDynamicTaskCount / edit.hsrTaskEnabled)
ManagedTaskSection->>I18n: t(edit.hsrReadFrom / edit.daily)
HSRUserEdit->>StageConfigSection: Render stage configuration
StageConfigSection->>I18n: t(edit.calyxGolden / edit.hsrRepickStage)
I18n-->>User: Display selected locale text
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
补一个在上一个 PR 合并时掉队的提交。
#569 合并时,GitHub 的 PR 对象没有跟上分支的最后一次推送(head 停在倒数第二个提交,
updated_at也没动),所以这一条没有进 dev。分支本身当时是完整的,掉的是整个提交,没有掉一半——dev 上组件仍是硬编码中文、也没有引用不存在的 key,所以合并后的状态是自洽的,只是这项改进缺了。内容
HSR 用户页有一批面向用户的文案从未进过词表,英文和日文用户直接看到中文:页面标题、「用户名」与「剩余天数」两个标签、历战余响与周常的「本周已完成 / 未完成」和「最近完成」、服务器的「官服」、刷取副本下拉的四个副本名、以及 MAS 管控任务列表里的「动态 N 项」「读取自」「周常 / 日常」「三月七」「未读取到原生配置」「已启用 · N 项配置」等。
这几个组件是在上一轮英文化(#487)之后才重做的,所以漏在了外面。仓库的前端 Skill 把「面向用户的文案走词表」列为红线。
新增 17 个 key,三份词表顺序一致;能复用的既有 key 都复用了(
edit.username、edit.daysLeft、edit.weekly、edit.calyxGolden等)。英文与日文用游戏官方术语。刻意没动的中文
按仓库既定口径,被程序拿去做判断的中文一律不翻:
StageConfigSection里categoryKeysByChannel、isEowCategory、stageTagColor拿去和后端返回的categoryKey比对的那几处,以及useHSRPluginApi里比对后端 warning 前缀的字串,全部保持原样。日志与报错提示同样按既定口径跳过。下拉选项只翻label,value一个没动。本地验证
🤖 Generated with Claude Code
Sourcery 摘要
为支持的语言本地化 HSR 用户页面中剩余的面向用户的文本。
错误修复:
功能增强:
Original summary in English
Summary by Sourcery
Localize the remaining user-facing HSR user-page text across supported languages.
Bug Fixes:
Enhancements: