Repository navigation
Feat/chinese only - #5522
Feat/chinese only#5522yunlongwen wants to merge 16 commits into
Conversation
Drop the convention rule that forbade modifying new-api/QuantumNous branding; renumber remaining rules (now Rules 1-7).
The project attribution was force-rendered alongside any custom footer set in System Settings, so the admin-configured Footer field could never show clean. Remove the ProjectAttribution component and its render sites.
Rewrite Hero/Features/Stats/HowItWorks/CTA to target relay end-users (models, pricing, stability, easy setup, sign-up bonus) instead of framework operators. Add zh.json translations. Model chips switched to domestic (GLM/DeepSeek/MiniMax/Kimi/Tongyi/Doubao).
Drop the hardcoded 'Designed by New API' line from both classic footer branches, matching the default theme.
Add an admin-only Edit Pricing entry in the default theme model detail drawer. Edits ModelRatio/CompletionRatio/ModelPrice via PUT /api/option/ (reuses system-settings option API); changes take effect immediately because the backend refreshes in-memory ratio maps on each PUT. Plaza data is refetched on save.
… count Add a metric switch (费用消耗/调用次数) to the User Analytics ranking page. Switching re-selects Top N users, the ranking bar chart, and the trend chart to the chosen metric (count or quota). Default stays on quota, preserving prior behavior. Frontend-only; backend already returns sum(count).
Feat/user ranking metric toggle
Drop the '文档'/Docs CTA from the landing hero (both guest and authenticated states), keeping only Get Started + View Pricing (guest) and Go to Dashboard (auth). Removes the now-dead renderDocsButton helper, docsUrl, and unused BookOpen/useStatus imports.
feat(home): remove Docs button from homepage hero
Center the custom footer block (drop desktop left-align) and render its content with the shared Markdown component (react-markdown + remark-gfm + rehype-raw), so admins can write links like [ICP](https://beian.miit.gov.cn). External links open in a new tab. Update the Footer field description (en/zh) to hint Markdown support. Default multi-column footer unchanged.
feat(footer): center footer content and render Markdown links
Drop the logo + system name + 'Powerful API Management Platform' brand block from the default (non-custom) footer, leaving just the copyright/legal row. Tighten the footer padding and remove the now- unused displayLogo/systemLogo. Demo-mode link columns are unaffected.
chore(footer): remove brand column from default footer
Force i18next to a single language (lng/fallbackLng/supportedLngs = zh),
drop the browser language detector, and delete the en/fr/ja/ru/vi locale
files. Remove all language-switching UI (header switcher, setup wizard,
profile language-preferences card) and the now-unused language-switcher,
language-preferences-card, and i18n/languages modules. README rewritten
to a minimal Chinese note (clone source + customization log); other
language READMEs removed. zh.json content unchanged; t('English key')
still resolves to Chinese. Backend i18n untouched.
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (34)
WalkthroughThis PR customizes ChangesNew Features: Dashboard Metric Switcher & Edit Pricing Dialog
PaopaoApi Rebrand: i18n Lockdown, Home Page, Footer & Docs
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Possibly related PRs
Poem
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Important
📝 变更描述 / Description
(简述:做了什么?为什么这样改能生效?请基于你对代码逻辑的理解来写,避免粘贴未经整理的内容)
🚀 变更类型 / Type of change
🔗 关联任务 / Related Issue
✅ 提交前检查项 / Checklist
Bug fix,我已提交或关联对应 Issue,且不会将设计取舍、预期不一致或理解偏差直接归类为 bug。📸 运行证明 / Proof of Work
(请在此粘贴截图、关键日志或测试报告,以证明变更生效)
Summary by CodeRabbit
Release Notes
New Features
Changes