feat: 新增首页信息区标题与教程/对比/地区限制/术语/FAQ/安全声明的 i18n 映射

- 为兼容性、教程、对比、地区与时间限制、技术术语说明、常见问题与安全声明等新增 DOM 翻译选择器,补齐 `.compat-title-text` 等标题与描述的本地化映射
- 在 `TEXT_REPLACEMENTS` 中补充首页首页信息区完整中文/英文文案(包含 Giffgaff/Simyo 激活流程、对比项、时间窗口与地区限制、安全声明等)
- 更新首页静态标题结构,将各信息区标题改为 `<span>` 包裹文本,以便 i18n 模块按类名进行动态替换
- 扩展国际化数据文件中的翻译键(`home.compat.*`、`home.tutorial.title`、`home.compare.title`、`home.region.title`、`home.glossary.title`、`home.faq.title`、`home.disclaimer.title`)以同步支持中英文渲染
This commit is contained in:
Abner
2026-05-27 22:22:38 +08:00
parent d5f51e95a3
commit 574fd70025
2 changed files with 108 additions and 8 deletions

View File

@@ -658,7 +658,7 @@
<!-- 设备兼容性 -->
<section class="info-section reveal" aria-labelledby="compat-title">
<h2 id="compat-title" class="section-title"><i class="fas fa-mobile-alt" aria-hidden="true"></i> 设备兼容性</h2>
<h2 id="compat-title" class="section-title"><i class="fas fa-mobile-alt" aria-hidden="true"></i> <span class="compat-title-text">设备兼容性</span></h2>
<p class="section-desc">使用前请确认您的设备支持 eSIM 功能</p>
<div class="compat-grid">
<div class="compat-card">
@@ -675,7 +675,7 @@
<!-- 使用教程 -->
<section class="info-section reveal" aria-labelledby="tutorial-title">
<h2 id="tutorial-title" class="section-title"><i class="fas fa-book-open" aria-hidden="true"></i> 使用教程</h2>
<h2 id="tutorial-title" class="section-title"><i class="fas fa-book-open" aria-hidden="true"></i> <span class="tutorial-title-text">使用教程</span></h2>
<div class="tutorial-grid">
<div class="tutorial-card giffgaff-tutorial">
<h3>Giffgaff eSIM 激活流程</h3>
@@ -705,7 +705,7 @@
<!-- 与官方流程对比 -->
<section class="info-section reveal" aria-labelledby="compare-title">
<h2 id="compare-title" class="section-title"><i class="fas fa-balance-scale" aria-hidden="true"></i> 与官方 App 对比</h2>
<h2 id="compare-title" class="section-title"><i class="fas fa-balance-scale" aria-hidden="true"></i> <span class="compare-title-text">与官方 App 对比</span></h2>
<div class="compare-table-wrapper">
<table class="compare-table">
<thead>
@@ -748,7 +748,7 @@
<!-- 地区与时间限制 -->
<section class="info-section reveal" aria-labelledby="region-title">
<h2 id="region-title" class="section-title"><i class="fas fa-globe-europe" aria-hidden="true"></i> 地区与时间限制</h2>
<h2 id="region-title" class="section-title"><i class="fas fa-globe-europe" aria-hidden="true"></i> <span class="region-title-text">地区与时间限制</span></h2>
<div class="region-grid">
<div class="region-card">
<h3><i class="fas fa-clock" aria-hidden="true"></i> Giffgaff</h3>
@@ -765,7 +765,7 @@
<!-- 技术术语解释 -->
<section class="info-section reveal" aria-labelledby="glossary-title">
<h2 id="glossary-title" class="section-title"><i class="fas fa-book" aria-hidden="true"></i> 技术术语说明</h2>
<h2 id="glossary-title" class="section-title"><i class="fas fa-book" aria-hidden="true"></i> <span class="glossary-title-text">技术术语说明</span></h2>
<div class="glossary-grid">
<div class="glossary-item">
<p class="glossary-term">OAuth 2.0 PKCE</p>
@@ -796,7 +796,7 @@
<!-- FAQ 常见问题 -->
<section class="info-section reveal" aria-labelledby="faq-title">
<h2 id="faq-title" class="section-title"><i class="fas fa-question-circle" aria-hidden="true"></i> 常见问题</h2>
<h2 id="faq-title" class="section-title"><i class="fas fa-question-circle" aria-hidden="true"></i> <span class="faq-title-text">常见问题</span></h2>
<div class="faq-list">
<details class="faq-item">
<summary>无法接收 SMS 短信验证码怎么办?</summary>
@@ -827,7 +827,7 @@
<!-- 安全声明 -->
<section class="info-section reveal" aria-labelledby="disclaimer-title">
<h2 id="disclaimer-title" class="section-title"><i class="fas fa-shield-alt" aria-hidden="true"></i> 安全声明</h2>
<h2 id="disclaimer-title" class="section-title"><i class="fas fa-shield-alt" aria-hidden="true"></i> <span class="disclaimer-title-text">安全声明</span></h2>
<div class="disclaimer-content">
<div class="disclaimer-item warning">
<i class="fas fa-exclamation-triangle" aria-hidden="true"></i>

View File

@@ -53,6 +53,17 @@ export const DOM_TRANSLATIONS = {
{ selector: '.simyo-card .tool-features li:nth-child(4) span', type: 'text', key: 'home.simyo.features.qr' },
{ selector: '.simyo-card .tool-features li:nth-child(5) span', type: 'text', key: 'home.simyo.features.confirm' },
{ selector: '.simyo-card .tool-btn span', type: 'text', key: 'home.simyo.cta' },
{ selector: '.compat-title-text', type: 'text', key: 'home.compat.title' },
{ selector: '.info-section[aria-labelledby="compat-title"] .section-desc', type: 'text', key: 'home.compat.description' },
{ selector: '.compat-card:nth-child(1) p', type: 'html', key: 'home.compat.apple' },
{ selector: '.compat-card:nth-child(2) p', type: 'html', key: 'home.compat.android' },
{ selector: '.compat-check', type: 'html', key: 'home.compat.checkMethod' },
{ selector: '.tutorial-title-text', type: 'text', key: 'home.tutorial.title' },
{ selector: '.compare-title-text', type: 'text', key: 'home.compare.title' },
{ selector: '.region-title-text', type: 'text', key: 'home.region.title' },
{ selector: '.glossary-title-text', type: 'text', key: 'home.glossary.title' },
{ selector: '.faq-title-text', type: 'text', key: 'home.faq.title' },
{ selector: '.disclaimer-title-text', type: 'text', key: 'home.disclaimer.title' },
{ selector: '.footer p', type: 'html', key: 'home.footer.html' }
],
giffgaff: [
@@ -85,7 +96,74 @@ export const DOM_TRANSLATIONS = {
export const TEXT_REPLACEMENTS = {
home: [
// 当前首页已通过 DOM 映射处理
// 教程区域
{ zh: 'Giffgaff eSIM 激活流程', en: 'Giffgaff eSIM activation steps' },
{ zh: '点击「使用 Giffgaff 工具」进入工具页面', en: 'Click "Launch Giffgaff tool" to open the tool' },
{ zh: '使用 Giffgaff 账号完成 OAuth 登录授权', en: 'Sign in with your Giffgaff account via OAuth' },
{ zh: '输入邮箱验证码完成身份验证', en: 'Enter the email verification code' },
{ zh: '完成 MFA 多因素认证(如已启用)', en: 'Complete MFA if enabled' },
{ zh: '查询会员资格并选择 eSIM 操作', en: 'Check membership and select an eSIM action' },
{ zh: '获取 eSIM 下载码或扫描 QR 码激活', en: 'Get the eSIM download code or scan the QR to activate' },
{ zh: '激活时间窗口UK 时间 4:30am - 9:30pm', en: 'Activation window: UK time 4:30am - 9:30pm' },
{ zh: 'Simyo eSIM 管理流程', en: 'Simyo eSIM management steps' },
{ zh: '点击「使用 Simyo 工具」进入工具页面', en: 'Click "Launch Simyo tool" to open the tool' },
{ zh: '使用 Simyo 账号完成登录验证', en: 'Sign in with your Simyo account' },
{ zh: '选择设备更换或 eSIM 激活', en: 'Choose device change or eSIM activation' },
{ zh: '通过 SMS 短信或 iDEAL 支付验证身份', en: 'Verify via SMS or iDEAL payment' },
{ zh: '确认新设备并生成 eSIM 配置', en: 'Confirm the new device and generate the eSIM profile' },
{ zh: '本工具支持生成 eSIM QR 码,简化激活流程', en: 'This tool generates eSIM QR codes to simplify activation' },
// 对比表
{ zh: '对比项', en: 'Feature' },
{ zh: '本工具', en: 'This tool' },
{ zh: '官方 App', en: 'Official App' },
{ zh: '操作平台', en: 'Platform' },
{ zh: '浏览器 Web 端', en: 'Web browser' },
{ zh: '仅移动端 App', en: 'Mobile app only' },
{ zh: 'QR 码生成', en: 'QR code generation' },
{ zh: '自动生成', en: 'Automatic' },
{ zh: 'Simyo 不支持(本工具可生成)', en: 'Not in Simyo app (this tool can generate)' },
{ zh: '认证方式', en: 'Authentication' },
{ zh: 'App 内置登录', en: 'In-app login' },
{ zh: '官方支持', en: 'Official support' },
{ zh: '非官方', en: 'Unofficial' },
{ zh: '服务条款', en: 'Terms of service' },
{ zh: '可能违反', en: 'May violate' },
{ zh: '符合条款', en: 'Compliant' },
// 地区与时间限制
{ zh: '激活时间窗口:', en: 'Activation window:' },
{ zh: 'UK 时间 4:30am - 9:30pm', en: 'UK time 4:30am - 9:30pm' },
{ zh: '请在非工作时间内尝试激活可能失败', en: 'Activation may fail outside this window' },
{ zh: '服务地区:', en: 'Service region:' },
{ zh: '荷兰 (NL)', en: 'Netherlands (NL)' },
{ zh: '仅支持荷兰本地 SIM 卡用户', en: 'Only for local Dutch SIM users' },
// 技术术语描述
{ zh: '一种安全的授权协议,允许第三方应用在无需存储密钥的情况下访问用户数据', en: 'A secure authorization protocol that lets third-party apps access user data without storing secrets' },
{ zh: '一种 API 查询语言,比 REST 更灵活高效地获取所需数据', en: 'A query language for APIs that fetches data more flexibly and efficiently than REST' },
{ zh: '本地配置文件激活字符串,包含 eSIM 下载所需的服务器地址和激活码', en: 'Local Profile Assistant string containing the server address and activation code for eSIM download' },
{ zh: '订阅管理数据准备服务器,负责安全地存储和分发 eSIM 配置文件', en: 'Subscription Manager Data Preparation server that securely stores and delivers eSIM profiles' },
{ zh: '多因素认证,通过多种方式验证用户身份,提高账户安全性', en: 'Multi-Factor Authentication — verifies identity through multiple methods for stronger security' },
{ zh: 'eSIM 的唯一标识号码,可在拨号盘输入 *#06# 查看', en: 'The unique identifier for an eSIM. Dial *#06# to view it' },
// FAQ 问题
{ zh: '无法接收 SMS 短信验证码怎么办?', en: "What if I can't receive the SMS verification code?" },
{ zh: 'eSIM 激活需要多长时间?', en: 'How long does eSIM activation take?' },
{ zh: '是否支持在海外激活 eSIM', en: 'Can I activate eSIM while abroad?' },
{ zh: 'Simyo 支持 QR 码激活吗?', en: 'Does Simyo support QR code activation?' },
{ zh: '使用这个工具安全吗?', en: 'Is this tool safe to use?' },
{ zh: '激活失败怎么办?', en: 'What if activation fails?' },
// FAQ 回答
{ zh: '对于 Simyo 用户,可以选择 iDEAL 支付方式作为替代验证方案。如果仍然无法接收短信,请检查手机号码是否正确,或联系运营商确认短信服务状态。', en: "Simyo users can use iDEAL payment as an alternative. If you still can't receive SMS, verify your phone number or contact your carrier." },
{ zh: '通常在几分钟内完成,最长可能需要 1 小时。如果超过 1 小时仍未激活成功,请检查网络连接或重新尝试。', en: 'Usually completes within minutes, up to 1 hour. If it takes longer, check your connection and try again.' },
{ zh: 'Giffgaff 的 eSIM 激活有 UK 时间窗口限制4:30am - 9:30pm UK 时间。Simyo 主要面向荷兰本地用户,海外激活可能受限。', en: 'Giffgaff eSIM activation has a UK time window (4:30am - 9:30pm UK time). Simyo serves the Netherlands; activation abroad may be restricted.' },
{ zh: 'Simyo 官方 App 不支持 QR 码激活,但本工具可以生成 eSIM QR 码,让您通过扫描方式快速完成激活,无需在 App 内操作。', en: "The Simyo app doesn't support QR activation, but this tool generates eSIM QR codes so you can activate by scanning — no in-app action needed." },
{ zh: '本工具在本地浏览器运行,所有数据处理均在本地进行。但请注意:使用第三方工具可能违反运营商服务条款,建议使用非主力号码进行测试。', en: 'This tool runs entirely in your browser — no data is sent to external servers. However, using third-party tools may violate carrier terms. Use a secondary number for testing.' },
{ zh: '请检查1) 设备是否支持 eSIM2) 网络连接是否正常3) 是否在运营商服务时间内4) 账号状态是否正常。如问题持续,请联系运营商客服。', en: 'Check: 1) Device supports eSIM; 2) Internet connection is stable; 3) Within carrier service hours; 4) Account is in good standing. If issues persist, contact carrier support.' },
// 安全声明
{ zh: '第三方工具风险', en: 'Third-party tool risk' },
{ zh: '本工具为非官方第三方工具,使用可能违反运营商服务条款。请自行评估风险。', en: 'This is an unofficial third-party tool. Using it may violate carrier terms of service. Assess the risk yourself.' },
{ zh: '建议使用非主力号码', en: 'Use a secondary number' },
{ zh: '为避免影响正常通信,建议使用备用号码进行测试和激活操作。', en: 'To avoid disrupting your main line, use a backup number for testing and activation.' },
{ zh: '数据安全', en: 'Data privacy' },
{ zh: '所有数据处理均在本地浏览器完成,不上传任何敏感信息到服务器。', en: 'All data is processed locally in your browser. No sensitive information is uploaded to any server.' }
],
giffgaff: [
{ zh: 'Giffgaff eSIM 工具', en: 'Giffgaff eSIM Tool' },
@@ -239,6 +317,17 @@ export const TRANSLATIONS = {
'home.simyo.features.qr': '一键生成二维码',
'home.simyo.features.confirm': '安装确认功能',
'home.simyo.cta': '使用 Simyo 工具',
'home.compat.title': '设备兼容性',
'home.compat.description': '使用前请确认您的设备支持 eSIM 功能',
'home.compat.apple': 'iPhone XS / XR 及更新机型<br>iPhone SE 2 及更新机型',
'home.compat.android': 'Samsung Galaxy S20 及更新<br>Google Pixel 3 及更新<br>部分 OnePlus、华为机型',
'home.compat.checkMethod': '<strong>检查方法:</strong>在手机拨号盘输入 <code>*#06#</code>,如显示 EID 号码则支持 eSIM',
'home.tutorial.title': '使用教程',
'home.compare.title': '与官方 App 对比',
'home.region.title': '地区与时间限制',
'home.glossary.title': '技术术语说明',
'home.faq.title': '常见问题',
'home.disclaimer.title': '安全声明',
'home.footer.html': '<i class=\"fas fa-info-circle me-2\" aria-hidden=\"true\"></i> 本工具仅供个人使用,请遵守相关服务条款。<br><i class=\"fas fa-shield-alt me-2\" aria-hidden=\"true\"></i> 所有数据处理均在本地进行,保护您的隐私安全。',
'footer.container.ariaLabel': '版权与声明',
'footer.github.ariaLabel': '在 GitHub 上查看源码',
@@ -481,6 +570,17 @@ export const TRANSLATIONS = {
'home.simyo.features.qr': 'One-click QR generation',
'home.simyo.features.confirm': 'Installation confirmation',
'home.simyo.cta': 'Launch Simyo tool',
'home.compat.title': 'Device Compatibility',
'home.compat.description': 'Make sure your device supports eSIM before using this tool',
'home.compat.apple': 'iPhone XS / XR and newer<br>iPhone SE 2 and newer',
'home.compat.android': 'Samsung Galaxy S20 and newer<br>Google Pixel 3 and newer<br>Select OnePlus and Huawei models',
'home.compat.checkMethod': '<strong>How to check:</strong> Dial <code>*#06#</code> on your phone. If an EID number is shown, eSIM is supported.',
'home.tutorial.title': 'Tutorials',
'home.compare.title': 'Comparison with Official App',
'home.region.title': 'Regional & Time Restrictions',
'home.glossary.title': 'Glossary',
'home.faq.title': 'FAQ',
'home.disclaimer.title': 'Disclaimer',
'home.footer.html': '<i class=\"fas fa-info-circle me-2\" aria-hidden=\"true\"></i> For personal use only. Please follow the related terms of service.<br><i class=\"fas fa-shield-alt me-2\" aria-hidden=\"true\"></i> All data processing happens locally to keep your privacy safe.',
'footer.container.ariaLabel': 'Copyright and disclaimer',
'footer.github.ariaLabel': 'View source on GitHub',