fix: fix all hardcoded /zh-cn/ links in home page components (HomeI18n, HomeAppleFooter, HomeFeatures)

This commit is contained in:
sanbuphy
2026-05-21 09:59:12 +08:00
parent df24d8f6de
commit 461ea357ab
8 changed files with 386 additions and 239 deletions
@@ -74,13 +74,11 @@ describe('reading bookmarks', () => {
}
)
assert.equal(
readReadingBookmark(storage, '/easy-vibe/en/stage-1/intro/', 1000)
.title,
readReadingBookmark(storage, '/easy-vibe/en/stage-1/intro/', 1000).title,
'English title'
)
})
it('keeps delayed saves bound to the path captured before navigation', () => {
const storage = createStorage()
let currentPath = '/easy-vibe/zh-cn/page-a/'
@@ -100,22 +98,16 @@ describe('reading bookmarks', () => {
})
)
assert.equal(
readReadingBookmark(storage, currentPath, 1000),
null
)
assert.deepEqual(
readReadingBookmark(storage, scheduledPath, 1000),
{
version: 1,
path: scheduledPath,
title: '页面 A',
section: '小节 A',
scrollY: 240,
progress: 32,
updatedAt: 777
}
)
assert.equal(readReadingBookmark(storage, currentPath, 1000), null)
assert.deepEqual(readReadingBookmark(storage, scheduledPath, 1000), {
version: 1,
path: scheduledPath,
title: '页面 A',
section: '小节 A',
scrollY: 240,
progress: 32,
updatedAt: 777
})
})
it('normalizes invalid numeric values', () => {