Repository navigation
fix(web): 英文模式下页面说明、空状态与提示仍显示中文 #1530
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Robert0622
wants to merge
1
commit into
Tencent:main
Choose a base branch
from
Robert0622:fix/en-i18n-inline-copy
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+254
−17
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[P2] 英文模式下需求列表表头的 10 个列单元格被合并成一个文本节点,表头与数据列错位
触发条件:英文模式(
localStorage['loopforge.lang']='en')打开「需求」页。app/issues.js:161渲染的表头是<div class="issue-table-row issue-table-head">下 10 个兄弟<span>(编号/标题/来源/…/操作),每个 span 是 grid 的一列。原因:
mergeRuns把这 10 个span当成同一句被行内标签切开的文案;matchRun允许用多个互不相关的词条拼接覆盖整段(编号+标题+来源+…),覆盖率满足后就把 10 个单元格删掉、换成一个文本节点。预期 / 实际
<span>:<span>ID</span><span>Title</span>…,与数据行 10 列对齐。IDTitleSourceAssigneeRepositoryPriorityLinked LOOPCurrent stageProgressActions,挤在第一列里横向溢出(约 451px 宽),后面 9 列表头空白、与数据列不再对齐。复现
web/i18n-en.js+web/i18n.js,<html data-lang="en">):{"cells":4,"html":"<span>ID</span><span>Title</span><span>Source</span><span>Assignee</span>"}{"cells":0,"html":"IDTitleSourceAssignee"}web/,API 用 webtest 的createFetchRouter默认数据,英文模式打开/#issues):#issueBoard .issue-table-head子元素 main 10 个、head 0 个;数据行 10 个单元格在两边位置一致(0,76,337,…,1150px),head 表头文本只有一段。影响范围:同一根因在其他页面也会把带独立样式的兄弟元素压成一行纯文本(在 head 上用
Element.remove/replaceWith埋点统计到,main 上没有):平台管理概览卡.platform-metric-info的 label/数字/说明三行、个人信息浮层.upp-name-row的名字与「已登录」徽标、.upp-info-item的 label/value、流程设置.flow-settings-sec-head的标题与副标题、span.required-badge「必填」等,样式(class)随元素一起丢失。中文模式不受影响。修复方向:只在单个词条完整覆盖合并后的整段时才合并(即
dict[flatten(nodes).trim()]命中),不要用多个词条拼接;或者跳过带 class、作为 grid/flex 子项的元素。顺手可以给表头这类结构加个回归用例。