悬浮提示

This commit is contained in:
tianmo committed 2026-09-19 16:05:54 +08:00
1 parent e60506ef96
commit b258d736fd
19 files changed
+38 -36

No files matched your search

+2
View File
@@ -14,6 +14,8 @@ for (const root of roots) {
const manifest = JSON.parse(fs.readFileSync(path.join(root, 'manifest.json'), 'utf8'));
for (const lang of manifest.languages) {
const table = JSON.parse(fs.readFileSync(path.join(root, '_locales', lang + '.json'), 'utf8'));
assert.equal(table.viewer.thumbnailTitle, table.viewer.groupThumbnailTitle, `${root}/${lang}: thumbnail button hints must match`);
if (lang === 'zh_CN') assert.equal(table.viewer.thumbnailTitle, '左键点击生成静态缩略图,右键点击生成动态缩略图');
for (const match of html.matchAll(/(?:\bt\(['"]|data-i18n(?:-title|-aria-label)?=")([^'"]+)/g)) {
assert.equal(typeof match[1].split('.').reduce((obj, key) => obj && obj[key], table), 'string', `${root}/${lang}: ${match[1]}`);
}