// Pellex lightweight production i18n.
// Keeps the Claude Design components intact, then translates exact visible strings for TC/SC.

const PELLEX_LANGS = ['en', 'tc', 'sc'];
const PELLEX_LANG_LABEL = { en: 'EN', tc: '繁中', sc: '简中' };
const PELLEX_HTML_LANG = { en: 'en', tc: 'zh-Hant', sc: 'zh-Hans' };

const PELLEX_I18N = {
  tc: {
    'Get the kit': '取得套件',
    'Show me the route': '查看路線圖',
    'See the $9 Starter Kit': '查看 $9 入門套件',
    'Free · No credit card · ~5 min read': '免費 · 無需信用卡 · 約 5 分鐘閱讀',
    'Beginner-safe': '新手友善',
    'No code': '無需寫程式',
    '1 weekend': '一個週末',
    'For total beginners': '為完全新手而設',
    'Stop trading hours for dollars.': '停止用時間換收入。',
    'Build a tiny AI asset that earns while you sleep.': '建立一個小型 AI 資產，讓它在你睡覺時也能運作。',
    'Pellex walks you through a 4-step playbook to launch your first AI side-business — even if you have never sold a digital product before.': 'Pellex 用 4 個步驟帶你推出第一個 AI 副業，即使你從未賣過數位產品也可以開始。',
    'Your tiny machine': '你的小型機器',
    'YOUR TINY MACHINE': '你的小型機器',
    '● live': '● 運作中',
    'Free traffic asset': '免費流量資產',
    '$9 prompt pack': '$9 提示詞套件',
    'Cleaning Quote Follow-up Kit': '清潔報價跟進套件',
    'Automated delivery': '自動交付',
    'Stripe → Email → Notion': 'Stripe → 電郵 → Notion',
    '0 min / sale': '每筆銷售 0 分鐘',
    'MONTH 1 RESULT': '第一個月結果',
    'example': '示例',
    'What we learned': '我們學到的事',
    'Three rules we live by — copied from the people doing it well.': '三條我們遵循的規則——來自真正做得好的人。',
    'The pattern is boring on purpose. Boring is what actually works.': '這個模式刻意保持簡單。簡單，才真正有效。',
    'Content first, product second.': '先提供內容，再推出產品。',
    'Publish a genuinely useful page before you ask for money. Help comes first — money follows the help.': '在收費前，先發佈一個真正有用的頁面。先幫助別人，收入才會跟著來。',
    'Sell the shovel, not the mine.': '賣鏟子，不是賣金礦。',
    "Don't promise income. Sell the templates, prompts and checklists that help someone move 10× faster today.": '不要承諾收入。賣的是能讓別人今天快 10 倍行動的模板、提示詞和清單。',
    'Niche down hard.': '把利基市場縮得夠小。',
    '"AI business" is too broad. "AI follow-up kit for cleaning quotes" is buyable. Pick a tiny painful problem.': '「AI 生意」太廣；「清潔報價 AI 跟進套件」才容易購買。選一個很小但痛的問題。',
    'The playbook': '實作路線',
    'Four steps.': '四個步驟。',
    'One weekend.': '一個週末。',
    'Four steps. One weekend.': '四個步驟。一個週末。',
    'A tiny repeatable machine: content attracts attention, a small product converts, automation fulfils, feedback tells you what to make next.': '一個可重複的小型系統：內容吸引注意，小產品帶來轉換，自動化完成交付，回饋告訴你下一步做什麼。',
    'PICK': '選擇',
    'PUBLISH': '發佈',
    'SELL': '銷售',
    'AUTOMATE': '自動化',
    'Pick a tiny painful niche.': '選一個很小但痛的利基市場。',
    'Tutors stuck on weekend enquiries. Cleaners chasing late quotes. Salons forgetting follow-ups. Look for boring, repeated pain.': '補習老師處理週末查詢、清潔公司追報價、沙龍忘記跟進。找那些重複又無聊的痛點。',
    'e.g. "AI follow-up for cleaning quotes"': '例如：「清潔報價 AI 跟進」',
    'Publish a free useful page.': '發佈一個免費而有用的頁面。',
    'Make one page someone can search, share, or copy from. A template, checklist, calculator, or teardown. Help first.': '做一頁別人可以搜尋、分享或複製的內容：模板、清單、計算器或拆解。先幫助別人。',
    'Sell the shovel.': '出售那把鏟子。',
    'Package a prompt pack, mini guide, spreadsheet, or audit. Price small ($9-49). Help them move faster, not get rich.': '包裝成提示詞套件、小指南、試算表或審核。定價低（$9–49）。幫他們更快行動，而不是承諾致富。',
    'Automate fulfilment.': '自動化交付。',
    'Stripe link + auto-email delivery + Notion drop. Use no-code tools you already know. Custom software is the last resort.': 'Stripe 連結 + 自動電郵交付 + Notion 資料夾。使用你已熟悉的無程式工具；客製軟體是最後選項。',
    'Back': '返回',
    'Next': '下一步',
    'The shift': '轉變',
    'Stop selling your hours.': '停止出售你的時間。',
    'Start owning a tiny asset.': '開始擁有一個小型資產。',
    'Before': '之前',
    'After': '之後',
    'Trading time for dollars': '用時間換收入',
    'Owning a tiny machine': '擁有小型機器',
    'Resource hub': '資源中心',
    'Steal a working example before you build your own.': '在自己動手前，先參考一個有效範例。',
    'Each free page below is a real "traffic asset" — see the shape, then copy it for your niche.': '下面每個免費頁面都是真實的「流量資產」——先看結構，再套用到你的利基市場。',
    'TEMPLATE · FREE': '模板 · 免費',
    'KIT · FREE': '套件 · 免費',
    'CALCULATOR · FREE': '計算器 · 免費',
    'Weekend tutoring reply': '週末補習查詢回覆',
    'Drop-in template for parents asking about lessons.': '給查詢課程家長的即用回覆模板。',
    'Cleaning quote follow-up': '清潔報價跟進',
    'Niche lead-magnet you can copy in an hour.': '一小時內可複製的利基名單磁鐵。',
    'Cleaning ROI calc': '清潔服務 ROI 計算器',
    'Live calculator that captures emails while running.': '可即時計算並收集電郵的工具。',
    'Offer ladder': '產品階梯',
    'Start free.': '免費開始。',
    'Upgrade only when you want the shortcut.': '只有想走捷徑時才升級。',
    'No subscriptions. No upsells. One small payment, lifetime access, every future update included.': '沒有訂閱，沒有硬銷加購。一次小額付款，終身存取，包含未來更新。',
    'Free': '免費',
    'FREE': '免費',
    'The 0→1 AI side-business map': '0→1 AI 副業路線圖',
    'Beginner-safe route map': '新手友善路線圖',
    'Niche idea picker': '利基想法選擇器',
    'Free traffic asset formula': '免費流量資產公式',
    'First-product checklist': '第一個產品清單',
    'Use the map': '使用路線圖',
    'The Shortcut': '捷徑',
    'AI Side Business Starter Kit': 'AI 副業入門套件',
    'MOST POPULAR': '最受歡迎',
    'one-time': '一次性',
    '8 plug-and-play traffic asset templates': '8 個即用流量資產模板',
    'Prompt + product packaging guide': '提示詞 + 產品包裝指南',
    'No-code fulfilment setup (Stripe → Email)': '無程式交付設定（Stripe → 電郵）',
    'Real teardown of a $487 / mo example': '$487/月真實案例拆解',
    'Lifetime updates as the playbook evolves': '路線更新時可終身取得更新',
    'A friendly chat when you get stuck': '卡住時可獲得友善協助',
    'Get the Starter Kit': '取得入門套件',
    "One-time $9 · Refund if it doesn't help": '一次性 $9 · 沒幫助可退款',
    'Stripe · Apple Pay': 'Stripe · Apple Pay',
    '14-day refund': '14 天退款保證',
    'From people who shipped': '來自已推出的人',
    'Beginners. Not gurus.': '新手，不是大師。',
    'Real first sales.': '真實的第一筆銷售。',
    'A note from the maker': '來自製作者的話',
    'A NOTE FROM THE MAKER': '來自製作者的話',
    'Honest answers': '誠實回答',
    "The questions you'd ask a friend over coffee.": '像和朋友喝咖啡時會問的問題。',
    'Your turn': '輪到你了',
    'Your first $9 sale': '你的第一筆 $9 銷售',
    'is closer than you think.': '比你想像中更接近。',
    'Take the free map first. If you want the shortcut, the kit is right there. No pressure either way.': '先看免費路線圖。如果想走捷徑，套件就在那裡。不用有壓力。',
    'Send me the 0→1 map': '把 0→1 路線圖寄給我',
    'Free · No card · ~5 min read': '免費 · 無需信用卡 · 約 5 分鐘閱讀',
    'Skip ahead — get the $9 kit': '直接跳到 $9 套件',
    'Playbook': '路線圖',
    'Resources': '資源',
    'Starter Kit': '入門套件',
    'Pellex Business': 'Pellex Business',
    'Refund policy': '退款政策',
    'Contact': '聯絡',
    'Build assets · Sell shovels · Automate fulfilment. A practical guide for beginners using AI to start something small.': '建立資產 · 出售鏟子 · 自動交付。給新手用 AI 開始小型項目的實用指南。',
    'Starter Kit — $9': '入門套件 — $9',
    '14-day refund · lifetime access': '14 天退款 · 終身存取',
    'Get it': '取得',
    'Free · 5 min read': '免費 · 5 分鐘閱讀',
    'One page. Four steps.': '一頁。四個步驟。',
    'Your weekend, sorted.': '安排好你的週末。',
    "Drop your email — we'll unlock the route below, send the printable PDF, and never spam you. Unsubscribe in one click.": '留下電郵，我們會解鎖下面的路線、寄出可列印 PDF，且不會發垃圾郵件。一鍵即可取消訂閱。',
    'Your email': '你的電郵',
    'Unlock the map': '解鎖路線圖',
    'Free · Unsub anytime': '免費 · 隨時取消訂閱',
    'No spam. One email per week, max.': '不發垃圾郵件。每週最多一封。',
    'Starter Kit · $9': '入門套件 · $9',
    'Everything you get': '你會得到什麼',
    'The boring, useful kit you wish existed.': '一套你一直希望存在、樸實又有用的套件。',
    'Templates, packaging, fulfilment and a real teardown — bundled into one tiny weekend-shippable kit.': '模板、產品包裝、交付流程和真實拆解，全部打包成一個週末可推出的小套件。',
    'Buy the kit': '購買套件',
    'Continue to secure checkout': '前往安全結帳',
    '$9 · Stripe · Apple Pay': '$9 · Stripe · Apple Pay',
    'Checkout': '結帳',
    'Your order': '你的訂單',
    'Email for delivery': '用於交付的電郵',
    'Continue to secure payment': '前往安全付款',
    'Payment received': '已收到付款',
    "You're in.": '你已加入。',
    'Welcome to Pellex.': '歡迎來到 Pellex。',
    'Money in': '收入進來',
    'Only when you work': '只有工作時才有',
    'Sleeping': '睡覺時',
    'Income stops': '收入停止',
    'Sick day': '病假日',
    'Lose a client': '失去一個客戶',
    'Holiday': '放假時',
    'Anxiety attack': '焦慮爆發',
    'While you sleep': '你睡覺時也在運作',
    'Stripe keeps working': 'Stripe 繼續運作',
    'Auto-delivery still ships': '自動交付照常送出',
    'Email still sells the kit': '電郵仍然銷售套件',
    'Names changed · written with permission · placeholder until verified': '姓名已更改 · 已獲許可撰寫 · 驗證前暫作佔位',
    'I built Pellex because every "AI side-business" guide I tried felt like': '我建立 Pellex，是因為我試過的每份「AI 副業」指南都像是在',
    'someone selling me a course about selling courses': '向我推銷一門關於賣課程的課程',
    "This is the boring, useful version I wish I'd found. Help first. Tiny products. Real automation. That's it.": '這是我當初希望找到的樸實、有用版本。先幫助別人。小型產品。真正自動化。就是這樣。',
    'Independent · since 2025': '獨立製作 · 自 2025 起',
    'built in public': '公開建造中',
    'Will this actually make me money?': '這真的會幫我賺錢嗎？',
    "I can't code. Is that a problem?": '我不會寫程式，會有問題嗎？',
    'No. Everything in the Starter Kit runs on no-code tools you probably already know: a Stripe payment link, email through Resend or Gmail, content in Notion or a Google Doc. We avoid custom software on purpose.': '不會。入門套件裡的一切都用你可能已熟悉的無程式工具運作：Stripe 付款連結、Resend 或 Gmail 電郵、Notion 或 Google Doc 內容。我們刻意避免客製軟體。',
    'How long until my first sale?': '多久才會有第一筆銷售？',
    'Most people who actually ship the free page see their first $9–49 sale within 2–4 weeks. The bottleneck is publishing, not the kit. The kit shortens the publishing step from weeks to a weekend.': '真正把免費頁面推出去的人，大多會在 2–4 週內看到第一筆 $9–49 銷售。瓶頸是發佈，不是套件。套件把發佈步驟從幾週縮短到一個週末。',
    'What if I hate it?': '如果我不喜歡怎麼辦？',
    "Email us within 14 days, full refund, no awkward form. $9 should not be a stressful purchase. If the kit doesn't help you ship, we don't deserve to keep it.": '14 天內電郵我們即可全額退款，沒有尷尬表格。$9 不應該是一個有壓力的購買。如果套件不能幫你推出，我們就不該收這筆錢。',
    "Is this 'passive income'?": '這是「被動收入」嗎？',
    "No. Setup takes a weekend, then you tune your content and refresh your assets — call it ~2 hours a week. The 'passive' part is that you stop trading hours one-to-one. Big difference.": '不是。設定需要一個週末，之後你調整內容並更新資產——大約每週 2 小時。「被動」的部分，是你不再一對一用時間換錢。差別很大。',
    'v2 · redesign': 'v2 · 重新設計',
    ". This is the boring, useful version I wish I'd found. Help first. Tiny products. Real automation. That's it.": '。這是我當初希望找到的樸實、有用版本。先幫助別人。小型產品。真正自動化。就是這樣。',
  }
};

PELLEX_I18N.sc = {
  "Get the kit": "取得套件",
  "Show me the route": "查看路线图",
  "See the $9 Starter Kit": "查看 $9 入门套件",
  "Free · No credit card · ~5 min read": "免费 · 无需信用卡 · 约 5 分钟阅读",
  "Beginner-safe": "新手友善",
  "No code": "无需写程式",
  "1 weekend": "一个周末",
  "For total beginners": "为完全新手而设",
  "Stop trading hours for dollars.": "停止用时间换收入。",
  "Build a tiny AI asset that earns while you sleep.": "建立一个小型 AI 资产，让它在你睡觉时也能运作。",
  "Pellex walks you through a 4-step playbook to launch your first AI side-business — even if you have never sold a digital product before.": "Pellex 用 4 个步骤带你推出第一个 AI 副业，即使你从未卖过数位产品也可以开始。",
  "Your tiny machine": "你的小型机器",
  "YOUR TINY MACHINE": "你的小型机器",
  "● live": "● 运作中",
  "Free traffic asset": "免费流量资产",
  "$9 prompt pack": "$9 提示词套件",
  "Cleaning Quote Follow-up Kit": "清洁报价跟进套件",
  "Automated delivery": "自动交付",
  "Stripe → Email → Notion": "Stripe → 电邮 → Notion",
  "0 min / sale": "每笔销售 0 分钟",
  "MONTH 1 RESULT": "第一个月结果",
  "example": "示例",
  "What we learned": "我们学到的事",
  "Three rules we live by — copied from the people doing it well.": "三条我们遵循的规则——来自真正做得好的人。",
  "The pattern is boring on purpose. Boring is what actually works.": "这个模式刻意保持简单。简单，才真正有效。",
  "Content first, product second.": "先提供内容，再推出产品。",
  "Publish a genuinely useful page before you ask for money. Help comes first — money follows the help.": "在收费前，先发布一个真正有用的页面。先帮助别人，收入才会跟著来。",
  "Sell the shovel, not the mine.": "卖铲子，不是卖金矿。",
  "Don't promise income. Sell the templates, prompts and checklists that help someone move 10× faster today.": "不要承诺收入。卖的是能让别人今天快 10 倍行动的模板、提示词和清单。",
  "Niche down hard.": "把利基市场缩得够小。",
  "\"AI business\" is too broad. \"AI follow-up kit for cleaning quotes\" is buyable. Pick a tiny painful problem.": "「AI 生意」太广；「清洁报价 AI 跟进套件」才容易购买。选一个很小但痛的问题。",
  "The playbook": "实作路线",
  "Four steps.": "四个步骤。",
  "One weekend.": "一个周末。",
  "Four steps. One weekend.": "四个步骤。一个周末。",
  "A tiny repeatable machine: content attracts attention, a small product converts, automation fulfils, feedback tells you what to make next.": "一个可重复的小型系统：内容吸引注意，小产品带来转换，自动化完成交付，回馈告诉你下一步做什么。",
  "PICK": "选择",
  "PUBLISH": "发布",
  "SELL": "销售",
  "AUTOMATE": "自动化",
  "Pick a tiny painful niche.": "选一个很小但痛的利基市场。",
  "Tutors stuck on weekend enquiries. Cleaners chasing late quotes. Salons forgetting follow-ups. Look for boring, repeated pain.": "补习老师处理周末查询、清洁公司追报价、沙龙忘记跟进。找那些重复又无聊的痛点。",
  "e.g. \"AI follow-up for cleaning quotes\"": "例如：「清洁报价 AI 跟进」",
  "Publish a free useful page.": "发布一个免费而有用的页面。",
  "Make one page someone can search, share, or copy from. A template, checklist, calculator, or teardown. Help first.": "做一页别人可以搜寻、分享或复制的内容：模板、清单、计算器或拆解。先帮助别人。",
  "Sell the shovel.": "出售那把铲子。",
  "Package a prompt pack, mini guide, spreadsheet, or audit. Price small ($9-49). Help them move faster, not get rich.": "包装成提示词套件、小指南、试算表或审核。定价低（$9–49）。帮他们更快行动，而不是承诺致富。",
  "Automate fulfilment.": "自动化交付。",
  "Stripe link + auto-email delivery + Notion drop. Use no-code tools you already know. Custom software is the last resort.": "Stripe 连结 + 自动电邮交付 + Notion 资料夹。使用你已熟悉的无程式工具；客制软体是最后选项。",
  "Back": "返回",
  "Next": "下一步",
  "The shift": "转变",
  "Stop selling your hours.": "停止出售你的时间。",
  "Start owning a tiny asset.": "开始拥有一个小型资产。",
  "Before": "之前",
  "After": "之后",
  "Trading time for dollars": "用时间换收入",
  "Owning a tiny machine": "拥有小型机器",
  "Resource hub": "资源中心",
  "Steal a working example before you build your own.": "在自己动手前，先参考一个有效范例。",
  "Each free page below is a real \"traffic asset\" — see the shape, then copy it for your niche.": "下面每个免费页面都是真实的「流量资产」——先看结构，再套用到你的利基市场。",
  "TEMPLATE · FREE": "模板 · 免费",
  "KIT · FREE": "套件 · 免费",
  "CALCULATOR · FREE": "计算器 · 免费",
  "Weekend tutoring reply": "周末补习查询回复",
  "Drop-in template for parents asking about lessons.": "给查询课程家长的即用回复模板。",
  "Cleaning quote follow-up": "清洁报价跟进",
  "Niche lead-magnet you can copy in an hour.": "一小时内可复制的利基名单磁铁。",
  "Cleaning ROI calc": "清洁服务 ROI 计算器",
  "Live calculator that captures emails while running.": "可即时计算并收集电邮的工具。",
  "Offer ladder": "产品阶梯",
  "Start free.": "免费开始。",
  "Upgrade only when you want the shortcut.": "只有想走捷径时才升级。",
  "No subscriptions. No upsells. One small payment, lifetime access, every future update included.": "没有订阅，没有硬销加购。一次小额付款，终身存取，包含未来更新。",
  "Free": "免费",
  "FREE": "免费",
  "The 0→1 AI side-business map": "0→1 AI 副业路线图",
  "Beginner-safe route map": "新手友善路线图",
  "Niche idea picker": "利基想法选择器",
  "Free traffic asset formula": "免费流量资产公式",
  "First-product checklist": "第一个产品清单",
  "Use the map": "使用路线图",
  "The Shortcut": "捷径",
  "AI Side Business Starter Kit": "AI 副业入门套件",
  "MOST POPULAR": "最受欢迎",
  "one-time": "一次性",
  "8 plug-and-play traffic asset templates": "8 个即用流量资产模板",
  "Prompt + product packaging guide": "提示词 + 产品包装指南",
  "No-code fulfilment setup (Stripe → Email)": "无程式交付设定（Stripe → 电邮）",
  "Real teardown of a $487 / mo example": "$487/月真实案例拆解",
  "Lifetime updates as the playbook evolves": "路线更新时可终身取得更新",
  "A friendly chat when you get stuck": "卡住时可获得友善协助",
  "Get the Starter Kit": "取得入门套件",
  "One-time $9 · Refund if it doesn't help": "一次性 $9 · 没帮助可退款",
  "Stripe · Apple Pay": "Stripe · Apple Pay",
  "14-day refund": "14 天退款保证",
  "From people who shipped": "来自已推出的人",
  "Beginners. Not gurus.": "新手，不是大师。",
  "Real first sales.": "真实的第一笔销售。",
  "A note from the maker": "来自制作者的话",
  "A NOTE FROM THE MAKER": "来自制作者的话",
  "Honest answers": "诚实回答",
  "The questions you'd ask a friend over coffee.": "像和朋友喝咖啡时会问的问题。",
  "Your turn": "轮到你了",
  "Your first $9 sale": "你的第一笔 $9 销售",
  "is closer than you think.": "比你想像中更接近。",
  "Take the free map first. If you want the shortcut, the kit is right there. No pressure either way.": "先看免费路线图。如果想走捷径，套件就在那里。不用有压力。",
  "Send me the 0→1 map": "把 0→1 路线图寄给我",
  "Free · No card · ~5 min read": "免费 · 无需信用卡 · 约 5 分钟阅读",
  "Skip ahead — get the $9 kit": "直接跳到 $9 套件",
  "Playbook": "路线图",
  "Resources": "资源",
  "Starter Kit": "入门套件",
  "Pellex Business": "Pellex Business",
  "Refund policy": "退款政策",
  "Contact": "联络",
  "Build assets · Sell shovels · Automate fulfilment. A practical guide for beginners using AI to start something small.": "建立资产 · 出售铲子 · 自动交付。给新手用 AI 开始小型项目的实用指南。",
  "Starter Kit — $9": "入门套件 — $9",
  "14-day refund · lifetime access": "14 天退款 · 终身存取",
  "Get it": "取得",
  "Free · 5 min read": "免费 · 5 分钟阅读",
  "One page. Four steps.": "一页。四个步骤。",
  "Your weekend, sorted.": "安排好你的周末。",
  "Drop your email — we'll unlock the route below, send the printable PDF, and never spam you. Unsubscribe in one click.": "留下电邮，我们会解锁下面的路线、寄出可列印 PDF，且不会发垃圾邮件。一键即可取消订阅。",
  "Your email": "你的电邮",
  "Unlock the map": "解锁路线图",
  "Free · Unsub anytime": "免费 · 随时取消订阅",
  "No spam. One email per week, max.": "不发垃圾邮件。每周最多一封。",
  "Starter Kit · $9": "入门套件 · $9",
  "Everything you get": "你会得到什么",
  "The boring, useful kit you wish existed.": "一套你一直希望存在、朴实又有用的套件。",
  "Templates, packaging, fulfilment and a real teardown — bundled into one tiny weekend-shippable kit.": "模板、产品包装、交付流程和真实拆解，全部打包成一个周末可推出的小套件。",
  "Buy the kit": "购买套件",
  "Continue to secure checkout": "前往安全结帐",
  "$9 · Stripe · Apple Pay": "$9 · Stripe · Apple Pay",
  "Checkout": "结帐",
  "Your order": "你的订单",
  "Email for delivery": "用于交付的电邮",
  "Continue to secure payment": "前往安全付款",
  "Payment received": "已收到付款",
  "You're in.": "你已加入。",
  "Welcome to Pellex.": "欢迎来到 Pellex。",
  "Money in": "收入进来",
  "Only when you work": "只有工作时才有",
  "Sleeping": "睡觉时",
  "Income stops": "收入停止",
  "Sick day": "病假日",
  "Lose a client": "失去一个客户",
  "Holiday": "放假时",
  "Anxiety attack": "焦虑爆发",
  "While you sleep": "你睡觉时也在运作",
  "Stripe keeps working": "Stripe 继续运作",
  "Auto-delivery still ships": "自动交付照常送出",
  "Email still sells the kit": "电邮仍然销售套件",
  "Names changed · written with permission · placeholder until verified": "姓名已更改 · 已获许可撰写 · 验证前暂作占位",
  "I built Pellex because every \"AI side-business\" guide I tried felt like": "我建立 Pellex，是因为我试过的每份「AI 副业」指南都像是在",
  "someone selling me a course about selling courses": "向我推销一门关于卖课程的课程",
  "This is the boring, useful version I wish I'd found. Help first. Tiny products. Real automation. That's it.": "这是我当初希望找到的朴实、有用版本。先帮助别人。小型产品。真正自动化。就是这样。",
  "Independent · since 2025": "独立制作 · 自 2025 起",
  "built in public": "公开建造中",
  "Will this actually make me money?": "这真的会帮我赚钱吗？",
  "I can't code. Is that a problem?": "我不会写程式，会有问题吗？",
  "No. Everything in the Starter Kit runs on no-code tools you probably already know: a Stripe payment link, email through Resend or Gmail, content in Notion or a Google Doc. We avoid custom software on purpose.": "不会。入门套件里的一切都用你可能已熟悉的无程式工具运作：Stripe 付款连结、Resend 或 Gmail 电邮、Notion 或 Google Doc 内容。我们刻意避免客制软体。",
  "How long until my first sale?": "多久才会有第一笔销售？",
  "Most people who actually ship the free page see their first $9–49 sale within 2–4 weeks. The bottleneck is publishing, not the kit. The kit shortens the publishing step from weeks to a weekend.": "真正把免费页面推出去的人，大多会在 2–4 周内看到第一笔 $9–49 销售。瓶颈是发布，不是套件。套件把发布步骤从几周缩短到一个周末。",
  "What if I hate it?": "如果我不喜欢怎么办？",
  "Email us within 14 days, full refund, no awkward form. $9 should not be a stressful purchase. If the kit doesn't help you ship, we don't deserve to keep it.": "14 天内电邮我们即可全额退款，没有尴尬表格。$9 不应该是一个有压力的购买。如果套件不能帮你推出，我们就不该收这笔钱。",
  "Is this 'passive income'?": "这是「被动收入」吗？",
  "No. Setup takes a weekend, then you tune your content and refresh your assets — call it ~2 hours a week. The 'passive' part is that you stop trading hours one-to-one. Big difference.": "不是。设定需要一个周末，之后你调整内容并更新资产——大约每周 2 小时。「被动」的部分，是你不再一对一用时间换钱。差别很大。",
  "v2 · redesign": "v2 · 重新设计",
  ". This is the boring, useful version I wish I'd found. Help first. Tiny products. Real automation. That's it.": "。这是我当初希望找到的朴实、有用版本。先帮助别人。小型产品。真正自动化。就是这样。"
};

const pellexOriginalText = new WeakMap();
const pellexOriginalAttr = new WeakMap();

function pellexTranslateValue(value, lang) {
  if (!value || lang === 'en') return value;
  const dict = PELLEX_I18N[lang] || {};
  const trimmed = value.trim();
  if (!trimmed || !dict[trimmed]) return value;
  return value.replace(trimmed, dict[trimmed]);
}

function applyPellexTranslations(lang = 'en') {
  window.PELLEX_ACTIVE_LANG = lang;
  document.documentElement.lang = PELLEX_HTML_LANG[lang] || 'en';

  const walker = document.createTreeWalker(document.body, NodeFilter.SHOW_TEXT, {
    acceptNode(node) {
      const parent = node.parentElement;
      if (!parent || ['SCRIPT', 'STYLE', 'NOSCRIPT'].includes(parent.tagName) || parent.closest('[data-no-i18n]')) return NodeFilter.FILTER_REJECT;
      if (!node.nodeValue.trim()) return NodeFilter.FILTER_REJECT;
      return NodeFilter.FILTER_ACCEPT;
    }
  });

  const nodes = [];
  while (walker.nextNode()) nodes.push(walker.currentNode);
  nodes.forEach(node => {
    if (!pellexOriginalText.has(node)) pellexOriginalText.set(node, node.nodeValue);
    const original = pellexOriginalText.get(node);
    node.nodeValue = lang === 'en' ? original : pellexTranslateValue(original, lang);
  });

  document.querySelectorAll('input, textarea, [aria-label]').forEach(el => {
    ['placeholder', 'aria-label'].forEach(attr => {
      if (!el.hasAttribute(attr)) return;
      let map = pellexOriginalAttr.get(el);
      if (!map) { map = {}; pellexOriginalAttr.set(el, map); }
      if (!(attr in map)) map[attr] = el.getAttribute(attr);
      const original = map[attr];
      el.setAttribute(attr, lang === 'en' ? original : pellexTranslateValue(original, lang));
    });
  });
}

window.PELLEX_LANGS = PELLEX_LANGS;
window.PELLEX_LANG_LABEL = PELLEX_LANG_LABEL;
window.applyPellexTranslations = applyPellexTranslations;
