refactor(i18n): 全工程面向国际用户与全球现代商务重构,彻底清理出海跨境等单向视角表达并对齐自动化测试
这个提交包含在:
@@ -82,7 +82,7 @@ test('5. 工作台 i18n 必须覆盖 KPI、雷达动态与快捷入口,且含
|
||||
assert.ok(!EMOJI_RE.test(localeContent), '语言包严禁 emoji');
|
||||
});
|
||||
|
||||
test('6. 专业出海运营官视角:包含全球雷达监控、渠道漏斗与效率工具,全屏仅 1 个主 CTA', () => {
|
||||
test('6. 专业运营官视角:包含全球雷达监控、渠道漏斗与效率工具,全屏仅 1 个主 CTA', () => {
|
||||
const content = fs.readFileSync(pagePath, 'utf-8');
|
||||
const localeContent = fs.readFileSync(localePath, 'utf-8');
|
||||
|
||||
@@ -118,7 +118,7 @@ test('6. 专业出海运营官视角:包含全球雷达监控、渠道漏斗
|
||||
assert.ok(!EMOJI_RE.test(content), '页面代码严禁 emoji');
|
||||
});
|
||||
|
||||
test('7. 出海运营快捷中枢:覆盖8大核心业务快捷入口与运营预警,全屏仅1个主CTA', () => {
|
||||
test('7. 全球运营快捷中枢:覆盖8大核心业务快捷入口与运营预警,全屏仅1个主CTA', () => {
|
||||
const content = fs.readFileSync(pagePath, 'utf-8');
|
||||
const localeContent = fs.readFileSync(localePath, 'utf-8');
|
||||
|
||||
@@ -152,4 +152,37 @@ test('7. 出海运营快捷中枢:覆盖8大核心业务快捷入口与运营
|
||||
assert.ok(!EMOJI_RE.test(content), '页面代码严禁 emoji');
|
||||
});
|
||||
|
||||
test('8. 实时雷达数据专家重构:相对时间、本地环境优雅降级、名片归属与科学意向分分级', () => {
|
||||
const content = fs.readFileSync(pagePath, 'utf-8');
|
||||
const localeContent = fs.readFileSync(localePath, 'utf-8');
|
||||
|
||||
// 1. 相对时间与本地化支持
|
||||
const radarKeys = [
|
||||
'workplace.radar.localEnv',
|
||||
'workplace.radar.justNow',
|
||||
'workplace.radar.minsAgo',
|
||||
'workplace.radar.hoursAgo',
|
||||
'workplace.radar.bounce',
|
||||
'workplace.radar.cardFallback',
|
||||
];
|
||||
for (const key of radarKeys) {
|
||||
assert.ok(
|
||||
localeContent.includes(key),
|
||||
`语言包必须包含雷达数据语义化词条: ${key}`
|
||||
);
|
||||
}
|
||||
|
||||
// 2. 页面中实现相对时间格式化与本地环境优雅降级
|
||||
assert.ok(content.includes('formatRelativeTime'), '必须包含相对时间计算逻辑');
|
||||
assert.ok(content.includes('formatLocation'), '必须包含本地环境优雅降级逻辑');
|
||||
assert.ok(content.includes('formatStayText'), '必须包含跳出/停留文案格式化');
|
||||
assert.ok(content.includes('getIntentTagColor'), '必须包含科学意向分语义色彩分级');
|
||||
|
||||
// 3. 规范约束
|
||||
assert.ok(!EMOJI_RE.test(localeContent), '语言包严禁 emoji');
|
||||
assert.ok(!EMOJI_RE.test(content), '页面代码严禁 emoji');
|
||||
assert.ok(!/\bany\b/.test(content), '严禁使用 any');
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
在新工单中引用
屏蔽一个用户