saladday1 commited on
Commit
0953253
·
verified ·
1 Parent(s): c814034

code: sync from git

Browse files
code/.claude/skills/eco-release/SKILL.md CHANGED
@@ -24,7 +24,7 @@ description: MiniMax 官方在 Hugging Face 上发了新模型(新版本如 M3
24
  | `label_diff.py <家族> <旧标签>` | 改规则前后每个发布的计数,以及每个变动的仓库 |
25
  | `sample.py <家族> <lineage> [N] [--uncounted]` | 随机抽样出链接,人工核对 |
26
  | `preview.sh [--live-data]` | 用本地或线上数据构建页面,在 Mac 上开 18767 端口 |
27
- | `shots.mjs`(在 Mac 上运行) | 桌面和手机截图,报告报错、404、溢出,以及顶部视频是否在播 |
28
  | `site_media.mjs`(在 Mac 上运行) | 列出 minimax.io 页面上的全部视频素材地址 |
29
  | `run_job.py [--wait]` | 按定时任务的配置立刻跑一次,当天刷新线上数据 |
30
  | `check_live.py [发布key…]` | 线上页面现在有哪些发布、各自的数字 |
@@ -70,7 +70,7 @@ env -u ALL_PROXY -u all_proxy python3 .claude/skills/eco-release/scripts/inspect
70
  | 现有系列的新版本,沿用已有架构(M3-Pro、M3.5) | A:在 `m.py` 的 RELEASES 加一行,Arch.members 加上它,排除兄弟 token | 自动 |
71
  | 现有系列换了新架构(M4) | B:A 的基础上新增 Arch 和 tag_filters | 自动 |
72
  | 视频或图像 DiT 家族的新成员 | C:形状相同就加进 `h3.py`,用 marker、meta、probe 区分;形状不同就建新家族 | 自动 |
73
- | 全新的系列或模态(语音、3D、Embedding…) | D:新建 `families/<key>.py` 并注册;org 加 CATEGORY_NAME | **要改**:`page.md` 第 2 节 |
74
  | 只认声明的小发布(数据集式、研究模型) | E:只在 org.RELEASES 加一行,最后一项为 None | 自动 |
75
  | 公开但不展示 | F:`org.HIDDEN` 或 `tracked=False` | — |
76
 
@@ -91,7 +91,7 @@ env -u ALL_PROXY -u all_proxy python3 .claude/skills/eco-release/scripts/inspect
91
  - 跳转到官网是按模态挂的:语言挂 M Plan,视频和图像挂 H3 Family,新发布自动带上。新模态要不要挂、挂到哪,问用户后在 `web/src/lib/links.ts` 加一行(`page.md` 第 1.5 节)。
92
  - 新模态按 `page.md` 第 2 节逐项改:org 的显示名、`CAT_ORDER`、颜色(用 dataviz 验证器检查)、`media.tsx`、背景和卡片视频。
93
  - 页面风格跟 minimax.io 一致:亮色、会动的官方素材背景、白色卡片。
94
- - 文案用英文,不加小字说明,不说 open source。
95
 
96
  ### 6. 本地试跑和验收
97
 
@@ -106,7 +106,7 @@ python3 .claude/skills/eco-release/scripts/sample.py <key> <新lineage> 25
106
  python3 .claude/skills/eco-release/scripts/sample.py <key> <新lineage> 15 --uncounted
107
  # 页面数据:一定要全部家族一起跑(org 那一步要读每个家族的 dashboard/family/<key>.json)
108
  env -u ALL_PROXY -u all_proxy python3 scripts/daily.py --skip-snapshot
109
- bash .claude/skills/eco-release/scripts/preview.sh && ssh parsar-mac 'cd ~/mm-shots && /opt/homebrew/bin/node shots.mjs new "home:/,rel:/<模态>/<发布key>"'
110
  ```
111
 
112
  `deploy.md` 第 2 节的七条门槛全部满足才往下走:
@@ -144,8 +144,8 @@ bash .claude/skills/eco-release/scripts/preview.sh && ssh parsar-mac 'cd ~/mm-sh
144
  ## 不能破的规矩
145
 
146
  - **私有仓库永远不上页面**:只取 `private is False`;`check_public` 和 `check_owned_public` 拦下来时,查清原因,不要绕过。
147
- - **不说 "open source"**:只说 open models / open-weight。站名是 MiniMax Ecosystem。
148
- - **网页英文、聊天中文、不加小字说明**:每个元素都要带信息。
149
  - **`raw/` 只追加**:标签可以随时重算。不要本地带 `--push` 覆盖当天线上快照,用 `run_job.py`。
150
  - **token 只用这台机器上已经同意过的**:saladday1 的 token 只用于这个任务。换账号或往别处存 token 前先问用户。
151
  - **在别人的仓库上提 PR、改飞书文档或分享权限前,先问用户。**
 
24
  | `label_diff.py <家族> <旧标签>` | 改规则前后每个发布的计数,以及每个变动的仓库 |
25
  | `sample.py <家族> <lineage> [N] [--uncounted]` | 随机抽样出链接,人工核对 |
26
  | `preview.sh [--live-data]` | 用本地或线上数据构建页面,在 Mac 上开 18767 端口 |
27
+ | `shots.mjs`(在 Mac 上运行) | 桌面和手机截图,报告报错、404、溢出,以及顶部视频是否在播;第三个参数 `lang=en` / `lang=zh` 选语言(不写就跟 Mac 的系统语言,是中文) |
28
  | `site_media.mjs`(在 Mac 上运行) | 列出 minimax.io 页面上的全部视频素材地址 |
29
  | `run_job.py [--wait]` | 按定时任务的配置立刻跑一次,当天刷新线上数据 |
30
  | `check_live.py [发布key…]` | 线上页面现在有哪些发布、各自的数字 |
 
70
  | 现有系列的新版本,沿用已有架构(M3-Pro、M3.5) | A:在 `m.py` 的 RELEASES 加一行,Arch.members 加上它,排除兄弟 token | 自动 |
71
  | 现有系列换了新架构(M4) | B:A 的基础上新增 Arch 和 tag_filters | 自动 |
72
  | 视频或图像 DiT 家族的新成员 | C:形状相同就加进 `h3.py`,用 marker、meta、probe 区分;形状不同就建新家族 | 自动 |
73
+ | 全新的系列或模态(语音、3D、Embedding…) | D:新建 `families/<key>.py` 并注册;org 加 CATEGORY_NAME | **要改**:`page.md` 第 2 节(含 `i18n.ts` 的中文名) |
74
  | 只认声明的小发布(数据集式、研究模型) | E:只在 org.RELEASES 加一行,最后一项为 None | 自动 |
75
  | 公开但不展示 | F:`org.HIDDEN` 或 `tracked=False` | — |
76
 
 
91
  - 跳转到官网是按模态挂的:语言挂 M Plan,视频和图像挂 H3 Family,新发布自动带上。新模态要不要挂、挂到哪,问用户后在 `web/src/lib/links.ts` 加一行(`page.md` 第 1.5 节)。
92
  - 新模态按 `page.md` 第 2 节逐项改:org 的显示名、`CAT_ORDER`、颜色(用 dataviz 验证器检查)、`media.tsx`、背景和卡片视频。
93
  - 页面风格跟 minimax.io 一致:亮色、会动的官方素材背景、白色卡片。
94
+ - 文案中英两版都要有,写在 `web/src/lib/i18n.ts`(`page.md` 第 5 节);不加小字说明,不说 open source,中文不说"开源"。新模态要在 `zh.cat` 加中文名。
95
 
96
  ### 6. 本地试跑和验收
97
 
 
106
  python3 .claude/skills/eco-release/scripts/sample.py <key> <新lineage> 15 --uncounted
107
  # 页面数据:一定要全部家族一起跑(org 那一步要读每个家族的 dashboard/family/<key>.json)
108
  env -u ALL_PROXY -u all_proxy python3 scripts/daily.py --skip-snapshot
109
+ bash .claude/skills/eco-release/scripts/preview.sh && ssh parsar-mac 'cd ~/mm-shots && /opt/homebrew/bin/node shots.mjs new "home:/,rel:/<模态>/<发布key>" lang=en && /opt/homebrew/bin/node shots.mjs newzh "home:/,rel:/<模态>/<发布key>" lang=zh'
110
  ```
111
 
112
  `deploy.md` 第 2 节的七条门槛全部满足才往下走:
 
144
  ## 不能破的规矩
145
 
146
  - **私有仓库永远不上页面**:只取 `private is False`;`check_public` 和 `check_owned_public` 拦下来时,查清原因,不要绕过。
147
+ - **不说 "open source"**:只说 open models / open-weight;中文不说"开源",说公开模型 / 开放权重。站名是 MiniMax Ecosystem,中文是 MiniMax 生态。
148
+ - **网页中英两版、聊天中文、不加小字说明**:每个元素都要带信息;新文案两种语言都写。
149
  - **`raw/` 只追加**:标签可以随时重算。不要本地带 `--push` 覆盖当天线上快照,用 `run_job.py`。
150
  - **token 只用这台机器上已经同意过的**:saladday1 的 token 只用于这个任务。换账号或往别处存 token 前先问用户。
151
  - **在别人的仓库上提 PR、改飞书文档或分享权限前,先问用户。**
code/.claude/skills/eco-release/reference/page.md CHANGED
@@ -8,9 +8,9 @@
8
  - 标题用 Outfit,口号和数字用 Libre Baskerville,模型标记用 Abhaya Libre ExtraBold,正文用 DM Sans。
9
 
10
  用户的硬性要求:
11
- - 网页文案用英文;
12
  - 不要小字说明、副标题和注释,每个元素都要带信息;
13
- - 不说 "open source",只说 open models / open-weight;
14
  - 好看、有格调,不花哨。
15
 
16
  ## 1. 自动的部分(无需改代码)
@@ -29,11 +29,12 @@
29
  - 所有视频和图像模型(video、image)→ https://www.minimax.io/h3-family("H3 Family")
30
  - music 不挂
31
 
32
- 它出现在三个地方:
33
- - 页面顶部导航(桌面端);
34
- - Models 菜单底部的 "… on minimax.io";
35
  - 该模态下每个发布页面标题下的半透明按钮,样式和官网首屏的按钮一样。
36
 
 
 
37
  已有模态的新发布自动带上按钮,不用改。新模态要不要挂、挂到哪,先问用户。
38
 
39
  ## 2. 新模态要改的地方(缺一处就会出错)
@@ -41,6 +42,7 @@
41
  | 位置 | 改什么 | 漏了的后果 |
42
  |---|---|---|
43
  | `hfeco/org.py` `CATEGORY_NAME` | 显示名,英文 | 显示成 key 的 title case |
 
44
  | `hfeco/org.py` `PIPELINE_CATEGORY` | 新 pipeline tag 归到哪个模态 | 没写进 RELEASES 的仓库被归为 language |
45
  | `web/src/lib/category.ts` `CAT_ORDER` | 加上新 key,位置就是首页堆叠图从下往上的顺序 | **这个模态在首页曲线、chip 和下载视图里整个消失**(`useSeries` 只取 CAT_ORDER 里的模态) |
46
  | `web/src/index.css` `:root` | `--cat-<key>`、`--cat-<key>-from`、`--cat-<key>-to` | 用中性灰 |
@@ -129,8 +131,9 @@
129
  ```bash
130
  python3 scripts/daily.py --skip-snapshot # 不加 --push;全部家族一起跑,生成 data/dashboard/site.json 和各模态页
131
  bash .claude/skills/eco-release/scripts/preview.sh # 用本地数据构建,在 Mac 上开 18767 端口
132
- ssh parsar-mac 'cd ~/mm-shots && /opt/homebrew/bin/node shots.mjs new "home:/,rel:/<模态>/<发布key>"'
133
- scp 'parsar-mac:mm-shots/out/new_*' /tmp/shots/ # 拉回来看
 
134
  ```
135
 
136
  - 只改了页面、不需要新数据时,用 `preview.sh --live-data`,直接拿线上的数据。
@@ -144,3 +147,12 @@ scp 'parsar-mac:mm-shots/out/new_*' /tmp/shots/ # 拉回来看
144
  - 分类页顶部(标题、视频、tab);
145
  - 手机宽度;
146
  - `problems: none`(没有报错、没有 404、没有溢出,顶部视频在播放)。
 
 
 
 
 
 
 
 
 
 
8
  - 标题用 Outfit,口号和数字用 Libre Baskerville,模型标记用 Abhaya Libre ExtraBold,正文用 DM Sans。
9
 
10
  用户的硬性要求:
11
+ - 网页有英文和中文两版(2026-11-25 加的中文),见第 5 节;所有文案两种语言都要有;
12
  - 不要小字说明、副标题和注释,每个元素都要带信息;
13
+ - 不说 "open source",只说 open models / open-weight;中文同样不说"开源",只说公开模型 / 开放权重;
14
  - 好看、有格调,不花哨。
15
 
16
  ## 1. 自动的部分(无需改代码)
 
29
  - 所有视频和图像模型(video、image)→ https://www.minimax.io/h3-family("H3 Family")
30
  - music 不挂
31
 
32
+ 它出现在两个地方:
33
+ - Models 菜单底部的 "… on minimax.io"(中文版是"官网 …");
 
34
  - 该模态下每个发布页面标题下的半透明按钮,样式和官网首屏的按钮一样。
35
 
36
+ 页面顶栏不放这些链接:2026-11-25 用户要求去掉顶栏的 H3 Family 和 M Plan 按钮。顶栏只有 logo、语言切换和 Models 菜单。
37
+
38
  已有模态的新发布自动带上按钮,不用改。新模态要不要挂、挂到哪,先问用户。
39
 
40
  ## 2. 新模态要改的地方(缺一处就会出错)
 
42
  | 位置 | 改什么 | 漏了的后果 |
43
  |---|---|---|
44
  | `hfeco/org.py` `CATEGORY_NAME` | 显示名,英文 | 显示成 key 的 title case |
45
+ | `web/src/lib/i18n.ts` `zh.cat` | 中文显示名,按 key(参照官网 minimax.cn 的叫法:语言、视频、图片、音乐、语音) | 中文版里这个模态显示英文名 |
46
  | `hfeco/org.py` `PIPELINE_CATEGORY` | 新 pipeline tag 归到哪个模态 | 没写进 RELEASES 的仓库被归为 language |
47
  | `web/src/lib/category.ts` `CAT_ORDER` | 加上新 key,位置就是首页堆叠图从下往上的顺序 | **这个模态在首页曲线、chip 和下载视图里整个消失**(`useSeries` 只取 CAT_ORDER 里的模态) |
48
  | `web/src/index.css` `:root` | `--cat-<key>`、`--cat-<key>-from`、`--cat-<key>-to` | 用中性灰 |
 
131
  ```bash
132
  python3 scripts/daily.py --skip-snapshot # 不加 --push;全部家族一起跑,生成 data/dashboard/site.json 和各模态页
133
  bash .claude/skills/eco-release/scripts/preview.sh # 用本地数据构建,在 Mac 上开 18767 端口
134
+ ssh parsar-mac 'cd ~/mm-shots && /opt/homebrew/bin/node shots.mjs new "home:/,rel:/<模态>/<发布key>" lang=en'
135
+ ssh parsar-mac 'cd ~/mm-shots && /opt/homebrew/bin/node shots.mjs newzh "home:/,rel:/<模态>/<发布key>" lang=zh'
136
+ scp 'parsar-mac:mm-shots/out/new*' /tmp/shots/ # 拉回来看,中英两版都看
137
  ```
138
 
139
  - 只改了页面、不需要新数据时,用 `preview.sh --live-data`,直接拿线上的数据。
 
147
  - 分类页顶部(标题、视频、tab);
148
  - 手机宽度;
149
  - `problems: none`(没有报错、没有 404、没有溢出,顶部视频在播放)。
150
+
151
+ ## 5. 中英两版(`web/src/lib/i18n.ts`)
152
+
153
+ - **文案只写在 `i18n.ts`**:`en` 和 `zh` 两张表,组件里用 `T.xxx`。`zh` 的类型取自 `en`,少一个键 `npx tsc -b` 就报错。不要在组件里写死英文。
154
+ - **语言怎么定**:URL 的 `?lang=zh|en` 优先,其次是访客上次的选择(localStorage),最后看浏览器的第一语言。顶栏地球图标切换;切换时整页按新语言重画(App 按语言 key),所以组件只在渲染时读 `T`,不要把文案存进模块级常量。
155
+ - **随语言变的格式**:`format.ts` 的 `num` 在中文下用万、亿(1.75亿、4347万),`md`、`mdy`、`my`、`mon` 出中文日期(11月3日、2026年11月)。新代码用这些函数,不要自己拼月份或 K/M。
156
+ - **不翻译的**:模型名、仓库名、开发者名、H3 Family 和 M Plan 这类产品名;下载的 PNG 文件名保持英文(`slug` 会把中文全删掉)。
157
+ - **字体**:中文走系统字体,顺序同 minimaxi.com(PingFang SC、MiSans、微软雅黑……),写在 `index.css` 的 `--font-cjk`。不要引 MiSans 网络字体:一个字重约 5 MB,导出 PNG 时还会被内联。
158
+ - **验收**:中文预览截图用 `shots.mjs <tag> "<pages>" lang=zh`;`grep -rn 开源 web/src web/dist` 必须没有结果。
code/.claude/skills/eco-release/reference/rules.md CHANGED
@@ -165,7 +165,7 @@
165
  2. 在 `hfeco/families/__init__.py` 注册,并更新文件头的列表。注册顺序就是 `resolve_overlaps` 的优先级,新家族放最后,除非有理由。
166
  3. `org.py`:
167
  - `RELEASES` 加一行,category 用新模态的 key;
168
- - `CATEGORY_NAME` 加显示名(英文,例如 "Speech & Audio");
169
  - 如果官方仓库的 pipeline tag 不在 `PIPELINE_CATEGORY` 里,也补上。
170
  4. 页面要配颜色、顺序和素材,见 `page.md`。
171
  5. 检查引擎里两张写死的表,非生成式模型尤其要看:
 
165
  2. 在 `hfeco/families/__init__.py` 注册,并更新文件头的列表。注册顺序就是 `resolve_overlaps` 的优先级,新家族放最后,除非有理由。
166
  3. `org.py`:
167
  - `RELEASES` 加一行,category 用新模态的 key;
168
+ - `CATEGORY_NAME` 加显示名(英文,例如 "Speech & Audio");中文名加在 `web/src/lib/i18n.ts` 的 `zh.cat`;
169
  - 如果官方仓库的 pipeline tag 不在 `PIPELINE_CATEGORY` 里,也补上。
170
  4. 页面要配颜色、顺序和素材,见 `page.md`。
171
  5. 检查引擎里两张写死的表,非生成式模型尤其要看:
code/.claude/skills/eco-release/scripts/preview.sh CHANGED
@@ -15,7 +15,7 @@ cd "$ROOT/web"
15
  mkdir -p public/data
16
  if [[ "${1:-}" == "--live-data" ]]; then
17
  for f in site video language image music audio; do
18
- env -u ALL_PROXY -u all_proxy curl -sf "https://minimaxai-ecosystem.static.hf.space/data/$f.json" -o "public/data/$f.json" \
19
  || rm -f "public/data/$f.json"
20
  done
21
  else
 
15
  mkdir -p public/data
16
  if [[ "${1:-}" == "--live-data" ]]; then
17
  for f in site video language image music audio; do
18
+ env -u ALL_PROXY -u all_proxy curl -sf --retry 4 --retry-all-errors --max-time 180 "https://minimaxai-ecosystem.static.hf.space/data/$f.json" -o "public/data/$f.json" \
19
  || rm -f "public/data/$f.json"
20
  done
21
  else
code/.claude/skills/eco-release/scripts/shots.mjs CHANGED
@@ -1,12 +1,13 @@
1
  // Screenshots of the preview at desktop and phone width, first screen and full page, with any
2
  // page error, failed request, horizontal overflow or stalled hero video reported. Runs on the
3
  // Mac (playwright-core in ~/mm-shots + Google Chrome):
4
- // cd ~/mm-shots && /opt/homebrew/bin/node shots.mjs <tag> "home:/,m3pro:/language/m3-pro"
 
5
  // Writes ~/mm-shots/out/<tag>_<d|m>_<name>[_fold].png; scp them back to look at them.
6
  import { mkdirSync } from "node:fs"
7
  import { chromium } from "playwright-core"
8
  const b = await chromium.launch({ executablePath: "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome" })
9
- const U = "http://localhost:18767/index.html#"
10
  const tag = process.argv[2] || "shot"
11
  const pages = (process.argv[3] || "home:/").split(",").map((x) => x.split(":"))
12
  const errs = []
 
1
  // Screenshots of the preview at desktop and phone width, first screen and full page, with any
2
  // page error, failed request, horizontal overflow or stalled hero video reported. Runs on the
3
  // Mac (playwright-core in ~/mm-shots + Google Chrome):
4
+ // cd ~/mm-shots && /opt/homebrew/bin/node shots.mjs <tag> "home:/,m3pro:/language/m3-pro" [lang=zh]
5
+ // (the optional third argument is a query string: lang=zh shoots the Chinese page)
6
  // Writes ~/mm-shots/out/<tag>_<d|m>_<name>[_fold].png; scp them back to look at them.
7
  import { mkdirSync } from "node:fs"
8
  import { chromium } from "playwright-core"
9
  const b = await chromium.launch({ executablePath: "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome" })
10
+ const U = `http://localhost:18767/index.html${process.argv[4] ? "?" + process.argv[4] : ""}#`
11
  const tag = process.argv[2] || "shot"
12
  const pages = (process.argv[3] || "home:/").split(",").map((x) => x.split(":"))
13
  const errs = []
code/web/src/App.tsx CHANGED
@@ -1,6 +1,7 @@
1
- import { useEffect, useState } from "react"
2
  import type { Site } from "@/lib/types"
3
  import { useRoute } from "@/lib/route"
 
4
  import { Home } from "@/pages/home"
5
  import { CategoryPage } from "@/pages/category"
6
 
@@ -8,6 +9,7 @@ export default function App() {
8
  const [site, setSite] = useState<Site | null>(null)
9
  const [failed, setFailed] = useState(false)
10
  const route = useRoute()
 
11
 
12
  useEffect(() => {
13
  fetch("data/site.json")
@@ -16,12 +18,17 @@ export default function App() {
16
  .catch(() => setFailed(true))
17
  }, [])
18
  useEffect(() => {
19
- if (!route.cat) document.title = "MiniMax Ecosystem"
20
- }, [route.cat])
21
 
22
- if (failed) return <p className="p-10 text-lg">The data did not load. Try refreshing the page.</p>
23
  if (!site) return <div className="dark stage min-h-screen" />
24
- return route.cat
25
- ? <CategoryPage key={route.cat} site={site} cat={route.cat} rel={route.rel} />
26
- : <Home site={site} />
 
 
 
 
 
27
  }
 
1
+ import { Fragment, useEffect, useState } from "react"
2
  import type { Site } from "@/lib/types"
3
  import { useRoute } from "@/lib/route"
4
+ import { T, useLang } from "@/lib/i18n"
5
  import { Home } from "@/pages/home"
6
  import { CategoryPage } from "@/pages/category"
7
 
 
9
  const [site, setSite] = useState<Site | null>(null)
10
  const [failed, setFailed] = useState(false)
11
  const route = useRoute()
12
+ const lang = useLang()
13
 
14
  useEffect(() => {
15
  fetch("data/site.json")
 
18
  .catch(() => setFailed(true))
19
  }, [])
20
  useEffect(() => {
21
+ if (!route.cat) document.title = T.site
22
+ }, [route.cat, lang])
23
 
24
+ if (failed) return <p className="p-10 text-lg">{T.noData}</p>
25
  if (!site) return <div className="dark stage min-h-screen" />
26
+ // A new language draws the page afresh, so nothing keeps copy from the old one.
27
+ return (
28
+ <Fragment key={lang}>
29
+ {route.cat
30
+ ? <CategoryPage key={route.cat} site={site} cat={route.cat} rel={route.rel} />
31
+ : <Home site={site} />}
32
+ </Fragment>
33
+ )
34
  }
code/web/src/components/category-blocks.tsx CHANGED
@@ -4,6 +4,7 @@ import { catFrom, catTo } from "@/lib/category"
4
  import { DAY, full, isoDay, num, toTime } from "@/lib/format"
5
  import { href } from "@/lib/route"
6
  import { Spark } from "@/components/sparkline"
 
7
 
8
  /** One block per modality: how big its community is, which releases it holds, who builds on it. */
9
  export function CategoryBlocks({ site }: { site: Site }) {
@@ -28,10 +29,10 @@ function Block({ site, cat, wide }: { site: Site; cat: string; wide: boolean })
28
  const repoCount = rels.reduce((a, r) => a + r.models.length, 0)
29
 
30
  const stats: [string, string][] = [
31
- [num(dl), "community downloads"],
32
- [full(c.builders), "builders"],
33
- [num(off), "MiniMax downloads"],
34
- [full(repoCount), repoCount === 1 ? "open model" : "open models"],
35
  ]
36
 
37
  return (
@@ -39,7 +40,7 @@ function Block({ site, cat, wide }: { site: Site; cat: string; wide: boolean })
39
  className={`group relative flex flex-col overflow-hidden rounded-[24px] border border-border bg-white shadow-[var(--shadow-card)] transition-[transform,box-shadow] duration-300 ease-[cubic-bezier(.22,.61,.36,1)] hover:-translate-y-1 hover:shadow-[0_28px_56px_-24px_rgba(23,23,23,0.28)] focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring ${wide ? "lg:col-span-2" : ""}`}>
40
  <div className="flex-1 p-7 sm:p-10">
41
  <div className="flex items-start justify-between gap-4">
42
- <h2 className="font-display text-[30px] leading-none font-semibold tracking-[-0.01em] sm:text-[36px]">{c.name}</h2>
43
  <span className="grid size-11 shrink-0 place-items-center rounded-full border border-border transition-[background-color,color,border-color,transform] duration-200 group-hover:rotate-45 group-hover:border-[#171717] group-hover:bg-[#171717] group-hover:text-white">
44
  <ArrowUpRight className="size-5" />
45
  </span>
@@ -49,7 +50,7 @@ function Block({ site, cat, wide }: { site: Site; cat: string; wide: boolean })
49
  <div>
50
  <div className="gradient-text w-fit pb-1 font-display text-[72px] leading-[0.9] font-semibold tracking-[-0.04em] tabular-nums sm:text-[96px]"
51
  style={{ "--from": catFrom(cat), "--to": catTo(cat) } as React.CSSProperties}>{full(n)}</div>
52
- <div className="mt-2 text-lg text-muted-foreground">community models</div>
53
  </div>
54
  <dl className={`mt-8 grid grid-cols-2 gap-x-8 gap-y-6 ${wide ? "sm:grid-cols-4 lg:mt-0 lg:gap-x-12" : ""}`}>
55
  {stats.map(([v, l]) => (
@@ -81,7 +82,7 @@ function Block({ site, cat, wide }: { site: Site; cat: string; wide: boolean })
81
  ))}
82
  </div>
83
  {c.builders > c.top_authors.length && (
84
- <span className="text-[15px] text-muted-foreground">+{full(c.builders - c.top_authors.length)} more builders</span>
85
  )}
86
  </div>
87
  )}
 
4
  import { DAY, full, isoDay, num, toTime } from "@/lib/format"
5
  import { href } from "@/lib/route"
6
  import { Spark } from "@/components/sparkline"
7
+ import { catName, T } from "@/lib/i18n"
8
 
9
  /** One block per modality: how big its community is, which releases it holds, who builds on it. */
10
  export function CategoryBlocks({ site }: { site: Site }) {
 
29
  const repoCount = rels.reduce((a, r) => a + r.models.length, 0)
30
 
31
  const stats: [string, string][] = [
32
+ [num(dl), T.communityDownloads],
33
+ [full(c.builders), T.builders],
34
+ [num(off), T.minimaxDownloads],
35
+ [full(repoCount), T.openModels(repoCount)],
36
  ]
37
 
38
  return (
 
40
  className={`group relative flex flex-col overflow-hidden rounded-[24px] border border-border bg-white shadow-[var(--shadow-card)] transition-[transform,box-shadow] duration-300 ease-[cubic-bezier(.22,.61,.36,1)] hover:-translate-y-1 hover:shadow-[0_28px_56px_-24px_rgba(23,23,23,0.28)] focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring ${wide ? "lg:col-span-2" : ""}`}>
41
  <div className="flex-1 p-7 sm:p-10">
42
  <div className="flex items-start justify-between gap-4">
43
+ <h2 className="font-display text-[30px] leading-none font-semibold tracking-[-0.01em] sm:text-[36px]">{catName(c)}</h2>
44
  <span className="grid size-11 shrink-0 place-items-center rounded-full border border-border transition-[background-color,color,border-color,transform] duration-200 group-hover:rotate-45 group-hover:border-[#171717] group-hover:bg-[#171717] group-hover:text-white">
45
  <ArrowUpRight className="size-5" />
46
  </span>
 
50
  <div>
51
  <div className="gradient-text w-fit pb-1 font-display text-[72px] leading-[0.9] font-semibold tracking-[-0.04em] tabular-nums sm:text-[96px]"
52
  style={{ "--from": catFrom(cat), "--to": catTo(cat) } as React.CSSProperties}>{full(n)}</div>
53
+ <div className="mt-2 text-lg text-muted-foreground">{T.communityModels}</div>
54
  </div>
55
  <dl className={`mt-8 grid grid-cols-2 gap-x-8 gap-y-6 ${wide ? "sm:grid-cols-4 lg:mt-0 lg:gap-x-12" : ""}`}>
56
  {stats.map(([v, l]) => (
 
82
  ))}
83
  </div>
84
  {c.builders > c.top_authors.length && (
85
+ <span className="text-[15px] text-muted-foreground">{T.moreBuilders(full(c.builders - c.top_authors.length))}</span>
86
  )}
87
  </div>
88
  )}
code/web/src/components/community-chart.tsx CHANGED
@@ -3,7 +3,8 @@ import { area, curveMonotoneX, line, stack } from "d3-shape"
3
  import { scaleLinear } from "d3-scale"
4
  import type { Release, Site } from "@/lib/types"
5
  import { CAT_ORDER, catColor, shortName } from "@/lib/category"
6
- import { DAY, full, md, mdy, num, toTime } from "@/lib/format"
 
7
 
8
  type Row = { t: number } & Record<string, number>
9
  export type Series = { rows: Row[]; cats: string[]; start: number; end: number }
@@ -11,7 +12,7 @@ export type Metric = "models" | "downloads"
11
  /** A milestone: releases within three weeks share one pole. Names sit right of the pole, or
12
  * left of it (`side`) when the right is taken; with no room either side only the pole shows. */
13
  type Pin = { t: number; key: string; rels: Release[]; cat: string; side: "right" | "left" | "none" }
14
- const NAME_FONT = '500 15px "Outfit Variable", system-ui, sans-serif'
15
  let measurer: CanvasRenderingContext2D | null = null
16
  const textWidth = (s: string) => {
17
  measurer ??= document.createElement("canvas").getContext("2d")!
@@ -82,7 +83,7 @@ export function CommunityChart({ site, series, metric, hidden, onPick, className
82
  const { rows, cats, start, end } = series
83
  const last = rows.at(-1)!.t
84
  const value = metric === "models" ? (v: number) => full(Math.round(v)) : (v: number) => num(v)
85
- const tick = (v: number) => (v >= 1e6 ? num(v) : v >= 1000 ? `${v / 1000}K` : String(v))
86
  const keys = cats.filter((c) => !hidden.has(c))
87
  const narrow = W < 640
88
  // Phones get the dots on the curve only; the release cards below carry the names.
@@ -133,7 +134,7 @@ export function CommunityChart({ site, series, metric, hidden, onPick, className
133
  for (let d = new Date(start); d.getTime() <= end; d.setUTCMonth(d.getUTCMonth() + 3)) {
134
  const mo = d.getUTCMonth()
135
  if (mo % 3) { d.setUTCMonth(mo - (mo % 3)); continue }
136
- ticksX.push({ t: d.getTime(), label: mo === 0 ? String(d.getUTCFullYear()) : ["Jan", "Apr", "Jul", "Oct"][mo / 3] })
137
  }
138
  // Quarters when there is room, otherwise half-years; years always win a place.
139
  const minGap = narrow ? 44 : 60
@@ -172,8 +173,7 @@ export function CommunityChart({ site, series, metric, hidden, onPick, className
172
  <div ref={box} className={`relative w-full select-none ${className}`}>
173
  {g && H > 0 && (
174
  <svg width={W} height={H} className="absolute inset-0 overflow-visible" role="img"
175
- aria-label={metric === "models" ? `Community models built on MiniMax, ${value(g.top.at(-1) ?? 0)} today`
176
- : `Downloads of MiniMax models and everything built on them, ${value(g.top.at(-1) ?? 0)} in all`}>
177
  <defs>
178
  {keys.map((c) => (
179
  <linearGradient key={c} id={`fill-${c}`} x1="0" y1="0" x2="0" y2="1">
@@ -286,7 +286,7 @@ export function CommunityChart({ site, series, metric, hidden, onPick, className
286
  <div key={c} className="flex items-center justify-between gap-6 text-[15px]">
287
  <span className="inline-flex items-center gap-2 text-foreground/75">
288
  <span className="size-2.5 rounded-full" style={{ background: catColor(c) }} />
289
- {site.categories.find((x) => x.key === c)?.name}
290
  </span>
291
  <span className="font-display tabular-nums">{value(hr[c])}</span>
292
  </div>
 
3
  import { scaleLinear } from "d3-scale"
4
  import type { Release, Site } from "@/lib/types"
5
  import { CAT_ORDER, catColor, shortName } from "@/lib/category"
6
+ import { DAY, full, isoDay, md, mdy, mon, num, toTime } from "@/lib/format"
7
+ import { catName, getLang, T } from "@/lib/i18n"
8
 
9
  type Row = { t: number } & Record<string, number>
10
  export type Series = { rows: Row[]; cats: string[]; start: number; end: number }
 
12
  /** A milestone: releases within three weeks share one pole. Names sit right of the pole, or
13
  * left of it (`side`) when the right is taken; with no room either side only the pole shows. */
14
  type Pin = { t: number; key: string; rels: Release[]; cat: string; side: "right" | "left" | "none" }
15
+ const NAME_FONT = '500 15px "Outfit Variable", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif'
16
  let measurer: CanvasRenderingContext2D | null = null
17
  const textWidth = (s: string) => {
18
  measurer ??= document.createElement("canvas").getContext("2d")!
 
83
  const { rows, cats, start, end } = series
84
  const last = rows.at(-1)!.t
85
  const value = metric === "models" ? (v: number) => full(Math.round(v)) : (v: number) => num(v)
86
+ const tick = (v: number) => (getLang() === "zh" ? (v >= 1e4 ? num(v) : String(v)) : v >= 1e6 ? num(v) : v >= 1000 ? `${v / 1000}K` : String(v))
87
  const keys = cats.filter((c) => !hidden.has(c))
88
  const narrow = W < 640
89
  // Phones get the dots on the curve only; the release cards below carry the names.
 
134
  for (let d = new Date(start); d.getTime() <= end; d.setUTCMonth(d.getUTCMonth() + 3)) {
135
  const mo = d.getUTCMonth()
136
  if (mo % 3) { d.setUTCMonth(mo - (mo % 3)); continue }
137
+ ticksX.push({ t: d.getTime(), label: mo === 0 ? String(d.getUTCFullYear()) : mon(isoDay(d.getTime())) })
138
  }
139
  // Quarters when there is room, otherwise half-years; years always win a place.
140
  const minGap = narrow ? 44 : 60
 
173
  <div ref={box} className={`relative w-full select-none ${className}`}>
174
  {g && H > 0 && (
175
  <svg width={W} height={H} className="absolute inset-0 overflow-visible" role="img"
176
+ aria-label={metric === "models" ? T.chartModelsAria(value(g.top.at(-1) ?? 0)) : T.chartDownloadsAria(value(g.top.at(-1) ?? 0))}>
 
177
  <defs>
178
  {keys.map((c) => (
179
  <linearGradient key={c} id={`fill-${c}`} x1="0" y1="0" x2="0" y2="1">
 
286
  <div key={c} className="flex items-center justify-between gap-6 text-[15px]">
287
  <span className="inline-flex items-center gap-2 text-foreground/75">
288
  <span className="size-2.5 rounded-full" style={{ background: catColor(c) }} />
289
+ {catName(site.categories.find((x) => x.key === c) ?? { key: c, name: c })}
290
  </span>
291
  <span className="font-display tabular-nums">{value(hr[c])}</span>
292
  </div>
code/web/src/components/daily.tsx CHANGED
@@ -1,7 +1,8 @@
1
  import { useMemo, useState } from "react"
2
  import { Area, AreaChart, CartesianGrid, XAxis, YAxis } from "recharts"
3
  import { ChartContainer, ChartTooltip } from "@/components/ui/chart"
4
- import { REL_NAME, type Lineage, type Rel } from "@/lib/types"
 
5
  import { isoDay, mdy, num, toTime } from "@/lib/format"
6
  import { timeTicks } from "@/lib/ticks"
7
  import { Panel, Section } from "@/components/layout"
@@ -36,7 +37,7 @@ export function DailyLines({ L, rel, download }: { L: Lineage; rel: Rel[]; downl
36
  const shown = present.filter((r) => !hidden.has(r))
37
 
38
  return (
39
- <Section title="Daily downloads">
40
  <Panel download={download}>
41
  <RelLegend rels={[...present].sort((a, b) => rel.indexOf(a) - rel.indexOf(b))} hidden={hidden} onToggle={toggle} />
42
  <ChartContainer config={relConfig(present)} className="aspect-auto h-[360px] w-full">
@@ -69,7 +70,7 @@ export function DailyLines({ L, rel, download }: { L: Lineage; rel: Rel[]; downl
69
  <div key={r} className="flex items-center justify-between gap-6">
70
  <span className="inline-flex items-center gap-2 text-muted-foreground">
71
  <span className="size-2.5 rounded-full" style={{ background: relColor(r) }} />
72
- {REL_NAME[r]}
73
  </span>
74
  <span className="font-medium tabular-nums">{num(row[r])}</span>
75
  </div>
 
1
  import { useMemo, useState } from "react"
2
  import { Area, AreaChart, CartesianGrid, XAxis, YAxis } from "recharts"
3
  import { ChartContainer, ChartTooltip } from "@/components/ui/chart"
4
+ import type { Lineage, Rel } from "@/lib/types"
5
+ import { relName, T } from "@/lib/i18n"
6
  import { isoDay, mdy, num, toTime } from "@/lib/format"
7
  import { timeTicks } from "@/lib/ticks"
8
  import { Panel, Section } from "@/components/layout"
 
37
  const shown = present.filter((r) => !hidden.has(r))
38
 
39
  return (
40
+ <Section title={T.dailyDownloads}>
41
  <Panel download={download}>
42
  <RelLegend rels={[...present].sort((a, b) => rel.indexOf(a) - rel.indexOf(b))} hidden={hidden} onToggle={toggle} />
43
  <ChartContainer config={relConfig(present)} className="aspect-auto h-[360px] w-full">
 
70
  <div key={r} className="flex items-center justify-between gap-6">
71
  <span className="inline-flex items-center gap-2 text-muted-foreground">
72
  <span className="size-2.5 rounded-full" style={{ background: relColor(r) }} />
73
+ {relName(r)}
74
  </span>
75
  <span className="font-medium tabular-nums">{num(row[r])}</span>
76
  </div>
code/web/src/components/download-button.tsx CHANGED
@@ -1,6 +1,7 @@
1
  import { useEffect, useRef, useState } from "react"
2
  import { Check, Download, LoaderCircle } from "lucide-react"
3
  import { backgroundFor, EXPORT_IGNORE, savePng } from "@/lib/export"
 
4
 
5
  /**
6
  * Round icon button in the top right of a chart: saves `target` as a PNG named after `name`.
@@ -32,7 +33,7 @@ export function DownloadButton({ target, name, tone = "card", pad = 0, big = fal
32
  const Icon = state === "busy" ? LoaderCircle : state === "done" ? Check : Download
33
  return (
34
  <button type="button" onClick={run} {...{ [EXPORT_IGNORE]: "" }}
35
- aria-label={`Download ${name} as PNG`} title="Download PNG" aria-busy={state === "busy"}
36
  className={`inline-flex ${big ? "size-10" : "size-9"} shrink-0 items-center justify-center rounded-full border transition-colors focus-visible:outline-2 ${look} ${className}`}>
37
  <Icon className={`size-4 ${state === "busy" ? "animate-spin" : ""}`} strokeWidth={2} />
38
  </button>
 
1
  import { useEffect, useRef, useState } from "react"
2
  import { Check, Download, LoaderCircle } from "lucide-react"
3
  import { backgroundFor, EXPORT_IGNORE, savePng } from "@/lib/export"
4
+ import { T } from "@/lib/i18n"
5
 
6
  /**
7
  * Round icon button in the top right of a chart: saves `target` as a PNG named after `name`.
 
33
  const Icon = state === "busy" ? LoaderCircle : state === "done" ? Check : Download
34
  return (
35
  <button type="button" onClick={run} {...{ [EXPORT_IGNORE]: "" }}
36
+ aria-label={T.downloadAria(name)} title={T.downloadPng} aria-busy={state === "busy"}
37
  className={`inline-flex ${big ? "size-10" : "size-9"} shrink-0 items-center justify-center rounded-full border transition-colors focus-visible:outline-2 ${look} ${className}`}>
38
  <Icon className={`size-4 ${state === "busy" ? "animate-spin" : ""}`} strokeWidth={2} />
39
  </button>
code/web/src/components/downloads.tsx CHANGED
@@ -4,6 +4,7 @@ import { ChartContainer, ChartTooltip, ChartTooltipContent, type ChartConfig } f
4
  import { axisTick } from "@/components/rel"
5
  import { isoDay, mdy, num, toTime } from "@/lib/format"
6
  import { timeTicks } from "@/lib/ticks"
 
7
 
8
  type Key = "comm" | "off"
9
 
@@ -15,8 +16,8 @@ export function DownloadHistory({ history, name, color }: { history: [string, nu
15
  const rows = useMemo(() => history.map(([d, off, comm]) => ({ t: toTime(d), off, comm })), [history])
16
  const [hidden, setHidden] = useState<Set<Key>>(new Set())
17
  const config = {
18
- comm: { label: "Community downloads", color },
19
- off: { label: `${name} downloads`, color: "var(--foreground)" },
20
  } satisfies ChartConfig
21
  const keys: Key[] = ["comm", "off"]
22
 
 
4
  import { axisTick } from "@/components/rel"
5
  import { isoDay, mdy, num, toTime } from "@/lib/format"
6
  import { timeTicks } from "@/lib/ticks"
7
+ import { T } from "@/lib/i18n"
8
 
9
  type Key = "comm" | "off"
10
 
 
16
  const rows = useMemo(() => history.map(([d, off, comm]) => ({ t: toTime(d), off, comm })), [history])
17
  const [hidden, setHidden] = useState<Set<Key>>(new Set())
18
  const config = {
19
+ comm: { label: T.communityDownloads.replace(/^./, (c) => c.toUpperCase()), color },
20
+ off: { label: T.releaseDownloads(name), color: "var(--foreground)" },
21
  } satisfies ChartConfig
22
  const keys: Key[] = ["comm", "off"]
23
 
code/web/src/components/galaxy.tsx CHANGED
@@ -1,5 +1,6 @@
1
  import { useEffect, useMemo, useRef, useState } from "react"
2
- import { REL_NAME, type Author, type Lineage, type Rel, type Repo } from "@/lib/types"
 
3
  import { num as fmt, full, hfUrl, mdy } from "@/lib/format"
4
  import { catFrom, catTo } from "@/lib/category"
5
  import type { Ring } from "@/lib/galaxy"
@@ -11,14 +12,13 @@ import { DownloadButton } from "@/components/download-button"
11
  type P = { id: string; x: number; y: number; r: number; ring: number; repo: Repo }
12
  type Layout = { pos: P[]; rings: Ring[]; extent: number }
13
 
14
- const RING_NAME = ["", "Built on it directly", "Second generation", "Third generation and on"]
15
  const ORDER: Rel[] = ["adapter", "finetune", "quantized", "repackage", "merge", "mirror", "component"]
16
  const CENTER_R = 64
17
  const TILT = 1.02 // the disc leans back this far (radians from facing the camera)
18
  const DIST = 3.4 // camera distance in disc radii: enough perspective to read depth, no fisheye
19
  const SPIN = 0.045 // radians a second when left alone, a turn every two and a half minutes
20
  const R_NEAR = 44 // the largest bubble, for headroom at the near rim
21
- const LABEL_FONT = '500 14px "DM Sans Variable", system-ui, sans-serif'
22
 
23
  /** Deterministic 0..1 from a string, so every bubble keeps its own rhythm across loads. */
24
  function hash(s: string): number {
@@ -272,7 +272,7 @@ export function Galaxy({ lineageKey, repos, L, authors, name, cat }: {
272
  if (size >= 480)
273
  for (const g of layout.rings) {
274
  const R = g.outer + 8, sc = D / (D + R * sinT)
275
- const text = RING_NAME[g.ring]
276
  ctx.globalAlpha = ease * 0.9
277
  pill(text, cx, cy - R * cosT * sc * k - 13, ctx.measureText(text).width + 24, "rgba(255,255,255,0.62)")
278
  }
@@ -370,7 +370,7 @@ export function Galaxy({ lineageKey, repos, L, authors, name, cat }: {
370
  const touch = typeRef.current !== "mouse"
371
  if (hover && (!touch || tapRef.current === hover)) window.open(hfUrl(hover), "_blank", "noopener")
372
  }}
373
- role="img" aria-label={`${full(L.n_models)} community models around ${name}`}>
374
  {size > 0 && (
375
  <div aria-hidden className="pointer-events-none absolute rounded-full blur-[30px]"
376
  style={{ left: cx - icon, top: cy - icon * 0.8, width: icon * 2, height: icon * 1.6,
@@ -386,7 +386,7 @@ export function Galaxy({ lineageKey, repos, L, authors, name, cat }: {
386
  </div>
387
  )}
388
  {!layout && size > 0 && (
389
- <div className="absolute inset-0 grid place-items-center text-[15px] text-white/60">Placing {full(repos.length)} models…</div>
390
  )}
391
  {hover && (center || (hp && hpos)) && (
392
  <Card pos={center ? { x: cx, y: cy, r: icon / 2 } : { x: hpos!.x, y: hpos!.y, r: hp!.r * k * hpos!.s }} size={size} height={height}>
@@ -434,12 +434,12 @@ function Model({ p, authors }: { p: P; authors: Record<string, Author> }) {
434
  </div>
435
  </div>
436
  <div className="space-y-1.5">
437
- <Row k="Type" v={<span className="inline-flex items-center gap-2"><RelDot rel={r.rel} />{REL_NAME[r.rel]}</span>} />
438
- <Row k="Built on" v={<span className="break-all">{r.up.startsWith("MiniMaxAI/") ? `${r.up.split("/")[1]} (official)` : r.up}</span>} />
439
- <Row k="Downloads" v={fmt(r.dlall)} />
440
- <Row k="Last 30 days" v={fmt(r.dl30)} />
441
- <Row k="Likes" v={full(r.likes)} />
442
- <Row k="Created" v={r.created ? mdy(r.created) : "–"} />
443
  </div>
444
  </>
445
  )
@@ -452,14 +452,14 @@ function Official({ L, authors, kidsN }: { L: Lineage; authors: Record<string, A
452
  <Who name="MiniMaxAI" authors={authors} size="size-11" />
453
  <div className="min-w-0">
454
  <div className="font-semibold">{L.base.split("/")[1]}</div>
455
- <div className="text-white/55">MiniMax official</div>
456
  </div>
457
  </div>
458
  <div className="space-y-1.5">
459
- <Row k="Downloads" v={fmt(L.official.dlall)} />
460
- <Row k="Last 30 days" v={fmt(L.official.dl30)} />
461
- <Row k="Likes" v={full(L.official.likes)} />
462
- <Row k="Community models" v={full(kidsN)} />
463
  </div>
464
  </>
465
  )
 
1
  import { useEffect, useMemo, useRef, useState } from "react"
2
+ import type { Author, Lineage, Rel, Repo } from "@/lib/types"
3
+ import { relName, T } from "@/lib/i18n"
4
  import { num as fmt, full, hfUrl, mdy } from "@/lib/format"
5
  import { catFrom, catTo } from "@/lib/category"
6
  import type { Ring } from "@/lib/galaxy"
 
12
  type P = { id: string; x: number; y: number; r: number; ring: number; repo: Repo }
13
  type Layout = { pos: P[]; rings: Ring[]; extent: number }
14
 
 
15
  const ORDER: Rel[] = ["adapter", "finetune", "quantized", "repackage", "merge", "mirror", "component"]
16
  const CENTER_R = 64
17
  const TILT = 1.02 // the disc leans back this far (radians from facing the camera)
18
  const DIST = 3.4 // camera distance in disc radii: enough perspective to read depth, no fisheye
19
  const SPIN = 0.045 // radians a second when left alone, a turn every two and a half minutes
20
  const R_NEAR = 44 // the largest bubble, for headroom at the near rim
21
+ const LABEL_FONT = '500 14px "DM Sans Variable", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif'
22
 
23
  /** Deterministic 0..1 from a string, so every bubble keeps its own rhythm across loads. */
24
  function hash(s: string): number {
 
272
  if (size >= 480)
273
  for (const g of layout.rings) {
274
  const R = g.outer + 8, sc = D / (D + R * sinT)
275
+ const text = T.rings[g.ring]
276
  ctx.globalAlpha = ease * 0.9
277
  pill(text, cx, cy - R * cosT * sc * k - 13, ctx.measureText(text).width + 24, "rgba(255,255,255,0.62)")
278
  }
 
370
  const touch = typeRef.current !== "mouse"
371
  if (hover && (!touch || tapRef.current === hover)) window.open(hfUrl(hover), "_blank", "noopener")
372
  }}
373
+ role="img" aria-label={T.galaxyAria(full(L.n_models), name)}>
374
  {size > 0 && (
375
  <div aria-hidden className="pointer-events-none absolute rounded-full blur-[30px]"
376
  style={{ left: cx - icon, top: cy - icon * 0.8, width: icon * 2, height: icon * 1.6,
 
386
  </div>
387
  )}
388
  {!layout && size > 0 && (
389
+ <div className="absolute inset-0 grid place-items-center text-[15px] text-white/60">{T.placing(full(repos.length))}</div>
390
  )}
391
  {hover && (center || (hp && hpos)) && (
392
  <Card pos={center ? { x: cx, y: cy, r: icon / 2 } : { x: hpos!.x, y: hpos!.y, r: hp!.r * k * hpos!.s }} size={size} height={height}>
 
434
  </div>
435
  </div>
436
  <div className="space-y-1.5">
437
+ <Row k={T.type} v={<span className="inline-flex items-center gap-2"><RelDot rel={r.rel} />{relName(r.rel)}</span>} />
438
+ <Row k={T.builtOn} v={<span className="break-all">{r.up.startsWith("MiniMaxAI/") ? T.officialTag(r.up.split("/")[1]) : r.up}</span>} />
439
+ <Row k={T.downloads} v={fmt(r.dlall)} />
440
+ <Row k={T.last30} v={fmt(r.dl30)} />
441
+ <Row k={T.likes} v={full(r.likes)} />
442
+ <Row k={T.created} v={r.created ? mdy(r.created) : "–"} />
443
  </div>
444
  </>
445
  )
 
452
  <Who name="MiniMaxAI" authors={authors} size="size-11" />
453
  <div className="min-w-0">
454
  <div className="font-semibold">{L.base.split("/")[1]}</div>
455
+ <div className="text-white/55">{T.minimaxOfficial}</div>
456
  </div>
457
  </div>
458
  <div className="space-y-1.5">
459
+ <Row k={T.downloads} v={fmt(L.official.dlall)} />
460
+ <Row k={T.last30} v={fmt(L.official.dl30)} />
461
+ <Row k={T.likes} v={full(L.official.likes)} />
462
+ <Row k={T.galaxyCommunity} v={full(kidsN)} />
463
  </div>
464
  </>
465
  )
code/web/src/components/growth.tsx CHANGED
@@ -1,7 +1,8 @@
1
  import { useMemo, useState } from "react"
2
  import { Bar, BarChart, CartesianGrid, Line, LineChart, XAxis, YAxis } from "recharts"
3
  import { ChartContainer, ChartTooltip, ChartTooltipContent, type ChartConfig } from "@/components/ui/chart"
4
- import { REL_NAME, type Lineage, type Rel } from "@/lib/types"
 
5
  import { relConfig, RelLegend, axisTick } from "@/components/rel"
6
  import { md } from "@/lib/format"
7
 
@@ -48,7 +49,7 @@ export function GrowthLines({ L, rel, today }: { L: Lineage; rel: Rel[]; today:
48
  <YAxis tickLine={false} axisLine={false} tick={axisTick} width={44} />
49
  <ChartTooltip content={<ChartTooltipContent labelFormatter={(v) => md(String(v))} />} />
50
  {present.filter((r) => !hidden.has(r)).map((r) => (
51
- <Line key={r} dataKey={r} name={REL_NAME[r]} type="monotone" stroke={`var(--color-${r})`}
52
  strokeWidth={2} dot={false} animationDuration={900} animationEasing="ease-out" />
53
  ))}
54
  </LineChart>
@@ -73,7 +74,7 @@ export function WeeklyBars({ L, today, color = "var(--brand)" }: { L: Lineage; t
73
  for (let w = keys[0]; w && w < end; w = addDays(w, 7)) out.push({ week: w, n: weeks.get(w) ?? 0 })
74
  return out
75
  }, [L, today])
76
- const config = { n: { label: "New", color } } satisfies ChartConfig
77
  const weekMax = Math.max(1, ...rows.map((r) => r.n))
78
  const step = weekMax > 200 ? 100 : weekMax > 60 ? 50 : weekMax > 20 ? 10 : 5
79
 
@@ -85,7 +86,7 @@ export function WeeklyBars({ L, today, color = "var(--brand)" }: { L: Lineage; t
85
  <YAxis tickLine={false} axisLine={false} tick={axisTick} width={36} allowDecimals={false}
86
  domain={[0, (max: number) => Math.ceil(max / step) * step]} tickCount={Math.max(2, Math.ceil(weekMax / step) + 1)} />
87
  <ChartTooltip cursor={{ fill: "var(--muted)" }}
88
- content={<ChartTooltipContent labelFormatter={(v) => `Week of ${md(String(v))}`} />} />
89
  <Bar dataKey="n" fill="var(--color-n)" radius={[4, 4, 0, 0]} maxBarSize={22} animationDuration={900} animationEasing="ease-out" />
90
  </BarChart>
91
  </ChartContainer>
 
1
  import { useMemo, useState } from "react"
2
  import { Bar, BarChart, CartesianGrid, Line, LineChart, XAxis, YAxis } from "recharts"
3
  import { ChartContainer, ChartTooltip, ChartTooltipContent, type ChartConfig } from "@/components/ui/chart"
4
+ import type { Lineage, Rel } from "@/lib/types"
5
+ import { relName, T } from "@/lib/i18n"
6
  import { relConfig, RelLegend, axisTick } from "@/components/rel"
7
  import { md } from "@/lib/format"
8
 
 
49
  <YAxis tickLine={false} axisLine={false} tick={axisTick} width={44} />
50
  <ChartTooltip content={<ChartTooltipContent labelFormatter={(v) => md(String(v))} />} />
51
  {present.filter((r) => !hidden.has(r)).map((r) => (
52
+ <Line key={r} dataKey={r} name={relName(r)} type="monotone" stroke={`var(--color-${r})`}
53
  strokeWidth={2} dot={false} animationDuration={900} animationEasing="ease-out" />
54
  ))}
55
  </LineChart>
 
74
  for (let w = keys[0]; w && w < end; w = addDays(w, 7)) out.push({ week: w, n: weeks.get(w) ?? 0 })
75
  return out
76
  }, [L, today])
77
+ const config = { n: { label: T.newN, color } } satisfies ChartConfig
78
  const weekMax = Math.max(1, ...rows.map((r) => r.n))
79
  const step = weekMax > 200 ? 100 : weekMax > 60 ? 50 : weekMax > 20 ? 10 : 5
80
 
 
86
  <YAxis tickLine={false} axisLine={false} tick={axisTick} width={36} allowDecimals={false}
87
  domain={[0, (max: number) => Math.ceil(max / step) * step]} tickCount={Math.max(2, Math.ceil(weekMax / step) + 1)} />
88
  <ChartTooltip cursor={{ fill: "var(--muted)" }}
89
+ content={<ChartTooltipContent labelFormatter={(v) => T.weekOf(md(String(v)))} />} />
90
  <Bar dataKey="n" fill="var(--color-n)" radius={[4, 4, 0, 0]} maxBarSize={22} animationDuration={900} animationEasing="ease-out" />
91
  </BarChart>
92
  </ChartContainer>
code/web/src/components/model-table.tsx CHANGED
@@ -3,7 +3,8 @@ import { ArrowDown, ArrowUp, Search } from "lucide-react"
3
  import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from "@/components/ui/table"
4
  import { Input } from "@/components/ui/input"
5
  import { Button } from "@/components/ui/button"
6
- import { REL_NAME, type Author, type Repo } from "@/lib/types"
 
7
  import { num as fmt, hfUrl } from "@/lib/format"
8
  import { RelDot } from "@/components/rel"
9
  import { Who } from "@/components/who"
@@ -26,8 +27,8 @@ export function ModelTable({ repos, authors, hasDaily }: { repos: Repo[]; author
26
  }, [repos, q, sort])
27
 
28
  const cols: [Key, string, boolean][] = [
29
- ["id", "Model", false], ["rel", "Type", false], ["dl30", "30 days", true], ["dlall", "All-time", true],
30
- ...(hasDaily ? ([["d1", "Last day", true]] as [Key, string, boolean][]) : []),
31
  ]
32
  const head = (k: Key, label: string, num: boolean) => (
33
  <TableHead key={k} className={`h-11 text-[15px] ${num ? "text-right" : ""}`}>
@@ -43,8 +44,8 @@ export function ModelTable({ repos, authors, hasDaily }: { repos: Repo[]; author
43
  <div>
44
  <div className="relative mb-4 max-w-sm">
45
  <Search className="pointer-events-none absolute top-1/2 left-3.5 size-4 -translate-y-1/2 text-muted-foreground" />
46
- <Input value={q} onChange={(e) => { setQ(e.target.value); setShown(20) }} placeholder="Search models or builders"
47
- className="h-11 rounded-full pl-10 text-[15px]" aria-label="Search models or builders" />
48
  </div>
49
  <Table className="text-[15px]">
50
  <TableHeader>
@@ -64,7 +65,7 @@ export function ModelTable({ repos, authors, hasDaily }: { repos: Repo[]; author
64
  </a>
65
  </TableCell>
66
  <TableCell className="py-3 whitespace-nowrap">
67
- <span className="inline-flex items-center gap-2"><RelDot rel={r.rel} />{REL_NAME[r.rel]}</span>
68
  </TableCell>
69
  <TableCell className="py-3 text-right tabular-nums">{fmt(r.dl30)}</TableCell>
70
  <TableCell className="py-3 text-right tabular-nums">{fmt(r.dlall)}</TableCell>
@@ -77,7 +78,7 @@ export function ModelTable({ repos, authors, hasDaily }: { repos: Repo[]; author
77
  {rows.length > shown && (
78
  <div className="mt-5 flex justify-center">
79
  <Button variant="secondary" className="h-10 rounded-full px-6 text-[15px]" onClick={() => setShown((n) => n + 50)}>
80
- Show 50 more
81
  </Button>
82
  </div>
83
  )}
 
3
  import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from "@/components/ui/table"
4
  import { Input } from "@/components/ui/input"
5
  import { Button } from "@/components/ui/button"
6
+ import type { Author, Repo } from "@/lib/types"
7
+ import { relName, T } from "@/lib/i18n"
8
  import { num as fmt, hfUrl } from "@/lib/format"
9
  import { RelDot } from "@/components/rel"
10
  import { Who } from "@/components/who"
 
27
  }, [repos, q, sort])
28
 
29
  const cols: [Key, string, boolean][] = [
30
+ ["id", T.model, false], ["rel", T.type, false], ["dl30", T.days30, true], ["dlall", T.allTime, true],
31
+ ...(hasDaily ? ([["d1", T.lastDay, true]] as [Key, string, boolean][]) : []),
32
  ]
33
  const head = (k: Key, label: string, num: boolean) => (
34
  <TableHead key={k} className={`h-11 text-[15px] ${num ? "text-right" : ""}`}>
 
44
  <div>
45
  <div className="relative mb-4 max-w-sm">
46
  <Search className="pointer-events-none absolute top-1/2 left-3.5 size-4 -translate-y-1/2 text-muted-foreground" />
47
+ <Input value={q} onChange={(e) => { setQ(e.target.value); setShown(20) }} placeholder={T.search}
48
+ className="h-11 rounded-full pl-10 text-[15px]" aria-label={T.search} />
49
  </div>
50
  <Table className="text-[15px]">
51
  <TableHeader>
 
65
  </a>
66
  </TableCell>
67
  <TableCell className="py-3 whitespace-nowrap">
68
+ <span className="inline-flex items-center gap-2"><RelDot rel={r.rel} />{relName(r.rel)}</span>
69
  </TableCell>
70
  <TableCell className="py-3 text-right tabular-nums">{fmt(r.dl30)}</TableCell>
71
  <TableCell className="py-3 text-right tabular-nums">{fmt(r.dlall)}</TableCell>
 
78
  {rows.length > shown && (
79
  <div className="mt-5 flex justify-center">
80
  <Button variant="secondary" className="h-10 rounded-full px-6 text-[15px]" onClick={() => setShown((n) => n + 50)}>
81
+ {T.showMore(50)}
82
  </Button>
83
  </div>
84
  )}
code/web/src/components/rel.tsx CHANGED
@@ -1,11 +1,12 @@
1
  import type { ChartConfig } from "@/components/ui/chart"
2
- import { REL_NAME, type Rel } from "@/lib/types"
 
3
 
4
  /** Each relation keeps one colour everywhere on the page (defined in index.css). */
5
  export const relColor = (r: Rel | "official") => (r === "official" ? "var(--foreground)" : `var(--rel-${r})`)
6
 
7
  export const relConfig = (rels: Rel[]): ChartConfig =>
8
- Object.fromEntries(rels.map((r) => [r, { label: REL_NAME[r], color: relColor(r) }]))
9
 
10
  export const axisTick = { fontSize: 14, fill: "var(--muted-foreground)" }
11
 
@@ -25,7 +26,7 @@ export function RelLegend({ rels, hidden, onToggle, className = "text-muted-fore
25
  <>
26
  <span className={`inline-block size-2.5 shrink-0 rounded-full ${off ? "border border-muted-foreground" : ""}`}
27
  style={{ background: off ? "transparent" : relColor(r) }} />
28
- <span className={off ? "line-through opacity-60" : ""}>{REL_NAME[r]}</span>
29
  </>
30
  )
31
  return onToggle ? (
 
1
  import type { ChartConfig } from "@/components/ui/chart"
2
+ import type { Rel } from "@/lib/types"
3
+ import { relName } from "@/lib/i18n"
4
 
5
  /** Each relation keeps one colour everywhere on the page (defined in index.css). */
6
  export const relColor = (r: Rel | "official") => (r === "official" ? "var(--foreground)" : `var(--rel-${r})`)
7
 
8
  export const relConfig = (rels: Rel[]): ChartConfig =>
9
+ Object.fromEntries(rels.map((r) => [r, { label: relName(r), color: relColor(r) }]))
10
 
11
  export const axisTick = { fontSize: 14, fill: "var(--muted-foreground)" }
12
 
 
26
  <>
27
  <span className={`inline-block size-2.5 shrink-0 rounded-full ${off ? "border border-muted-foreground" : ""}`}
28
  style={{ background: off ? "transparent" : relColor(r) }} />
29
+ <span className={off ? "line-through opacity-60" : ""}>{relName(r)}</span>
30
  </>
31
  )
32
  return onToggle ? (
code/web/src/components/relation-table.tsx CHANGED
@@ -1,5 +1,6 @@
1
  import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from "@/components/ui/table"
2
- import { HF_RELS, REL_NAME, type Lineage, type Rel } from "@/lib/types"
 
3
  import { num as fmt, full } from "@/lib/format"
4
  import { RelDot, relColor } from "@/components/rel"
5
 
@@ -19,7 +20,7 @@ export function RelationTable({ L, order }: { L: Lineage; order: Rel[] }) {
19
  const row = (r: Rel) => (
20
  <TableRow key={r} className="border-border/60 hover:bg-transparent">
21
  <TableCell className="py-3.5">
22
- <span className="inline-flex items-center gap-2.5"><RelDot rel={r} />{REL_NAME[r]}</span>
23
  </TableCell>
24
  <TableCell className="py-3.5">
25
  <div className="flex items-center gap-3">
@@ -46,18 +47,18 @@ export function RelationTable({ L, order }: { L: Lineage; order: Rel[] }) {
46
  <Table className="text-[15px]">
47
  <TableHeader>
48
  <TableRow className="border-border/60 hover:bg-transparent">
49
- <TableHead className="text-[15px] text-muted-foreground">Type</TableHead>
50
- <TableHead className="text-[15px] text-muted-foreground">Models</TableHead>
51
- <TableHead className="text-right text-[15px] text-muted-foreground">On HF model tree</TableHead>
52
- <TableHead className="text-right text-[15px] text-muted-foreground">Downloads, 30 days</TableHead>
53
- <TableHead className="text-right text-[15px] text-muted-foreground">All-time</TableHead>
54
  </TableRow>
55
  </TableHeader>
56
  <TableBody>
57
  {hfRels.map(row)}
58
- {extra.length > 0 && total("Subtotal", sum(HF_RELS, "n"), hfSum, sum(HF_RELS, "dl30"), sum(HF_RELS, "dlall"))}
59
  {extra.map(row)}
60
- {total("Total", L.n_models, extra.length ? null : hfSum, L.dl30, L.dlall)}
61
  </TableBody>
62
  </Table>
63
  )
 
1
  import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from "@/components/ui/table"
2
+ import { HF_RELS, type Lineage, type Rel } from "@/lib/types"
3
+ import { relName, T } from "@/lib/i18n"
4
  import { num as fmt, full } from "@/lib/format"
5
  import { RelDot, relColor } from "@/components/rel"
6
 
 
20
  const row = (r: Rel) => (
21
  <TableRow key={r} className="border-border/60 hover:bg-transparent">
22
  <TableCell className="py-3.5">
23
+ <span className="inline-flex items-center gap-2.5"><RelDot rel={r} />{relName(r)}</span>
24
  </TableCell>
25
  <TableCell className="py-3.5">
26
  <div className="flex items-center gap-3">
 
47
  <Table className="text-[15px]">
48
  <TableHeader>
49
  <TableRow className="border-border/60 hover:bg-transparent">
50
+ <TableHead className="text-[15px] text-muted-foreground">{T.type}</TableHead>
51
+ <TableHead className="text-[15px] text-muted-foreground">{T.modelsCol}</TableHead>
52
+ <TableHead className="text-right text-[15px] text-muted-foreground">{T.onHfTree}</TableHead>
53
+ <TableHead className="text-right text-[15px] text-muted-foreground">{T.dl30Col}</TableHead>
54
+ <TableHead className="text-right text-[15px] text-muted-foreground">{T.allTime}</TableHead>
55
  </TableRow>
56
  </TableHeader>
57
  <TableBody>
58
  {hfRels.map(row)}
59
+ {extra.length > 0 && total(T.subtotal, sum(HF_RELS, "n"), hfSum, sum(HF_RELS, "dl30"), sum(HF_RELS, "dlall"))}
60
  {extra.map(row)}
61
+ {total(T.total, L.n_models, extra.length ? null : hfSum, L.dl30, L.dlall)}
62
  </TableBody>
63
  </Table>
64
  )
code/web/src/components/release-rail.tsx CHANGED
@@ -4,6 +4,7 @@ import type { Release, Site } from "@/lib/types"
4
  import { full, hfUrl, mdy, num } from "@/lib/format"
5
  import { href } from "@/lib/route"
6
  import { Tile } from "@/components/media"
 
7
 
8
  /** Every release in order, as minimax.io shows its flagship models: a card with the model's
9
  * picture, its name and date, and the community it has today. */
@@ -28,11 +29,11 @@ export function ReleaseRail({ site }: { site: Site }) {
28
  return (
29
  <section className="relative mx-auto w-full max-w-[1200px] px-4 sm:px-8">
30
  <div className="relative mb-8 flex items-center justify-center">
31
- <h2 className="text-center font-display text-[30px] leading-tight font-semibold tracking-[-0.01em] sm:text-[36px]">Every release</h2>
32
  <div className="absolute right-0 hidden gap-2 sm:flex">
33
  {[-1, 1].map((d) => (
34
  <button key={d} type="button" onClick={() => page(d)} disabled={d < 0 ? edge.start : edge.end}
35
- aria-label={d < 0 ? "Earlier releases" : "Later releases"}
36
  className="grid size-10 place-items-center rounded-full border border-border bg-white text-foreground transition-colors hover:bg-muted disabled:opacity-35">
37
  {d < 0 ? <ArrowLeft className="size-4" /> : <ArrowRight className="size-4" />}
38
  </button>
@@ -63,11 +64,11 @@ function Card({ r }: { r: Release }) {
63
  <div className="mt-5 grid grid-cols-2 gap-3">
64
  <div>
65
  <div className="font-serif text-[24px] leading-none">{full(r.n)}</div>
66
- <div className="mt-2 text-[15px] text-muted-foreground">community</div>
67
  </div>
68
  <div>
69
  <div className="font-serif text-[24px] leading-none">{num(r.official.dlall)}</div>
70
- <div className="mt-2 text-[15px] text-muted-foreground">downloads</div>
71
  </div>
72
  </div>
73
  </div>
 
4
  import { full, hfUrl, mdy, num } from "@/lib/format"
5
  import { href } from "@/lib/route"
6
  import { Tile } from "@/components/media"
7
+ import { T } from "@/lib/i18n"
8
 
9
  /** Every release in order, as minimax.io shows its flagship models: a card with the model's
10
  * picture, its name and date, and the community it has today. */
 
29
  return (
30
  <section className="relative mx-auto w-full max-w-[1200px] px-4 sm:px-8">
31
  <div className="relative mb-8 flex items-center justify-center">
32
+ <h2 className="text-center font-display text-[30px] leading-tight font-semibold tracking-[-0.01em] sm:text-[36px]">{T.everyRelease}</h2>
33
  <div className="absolute right-0 hidden gap-2 sm:flex">
34
  {[-1, 1].map((d) => (
35
  <button key={d} type="button" onClick={() => page(d)} disabled={d < 0 ? edge.start : edge.end}
36
+ aria-label={d < 0 ? T.earlier : T.later}
37
  className="grid size-10 place-items-center rounded-full border border-border bg-white text-foreground transition-colors hover:bg-muted disabled:opacity-35">
38
  {d < 0 ? <ArrowLeft className="size-4" /> : <ArrowRight className="size-4" />}
39
  </button>
 
64
  <div className="mt-5 grid grid-cols-2 gap-3">
65
  <div>
66
  <div className="font-serif text-[24px] leading-none">{full(r.n)}</div>
67
+ <div className="mt-2 text-[15px] text-muted-foreground">{T.railCommunity}</div>
68
  </div>
69
  <div>
70
  <div className="font-serif text-[24px] leading-none">{num(r.official.dlall)}</div>
71
+ <div className="mt-2 text-[15px] text-muted-foreground">{T.railDownloads}</div>
72
  </div>
73
  </div>
74
  </div>
code/web/src/components/site-header.tsx CHANGED
@@ -1,4 +1,4 @@
1
- import { ArrowUpRight, ChevronDown } from "lucide-react"
2
  import {
3
  DropdownMenu, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel,
4
  DropdownMenuSeparator, DropdownMenuTrigger,
@@ -9,8 +9,10 @@ import { full } from "@/lib/format"
9
  import { href } from "@/lib/route"
10
  import { Logo } from "@/components/logo"
11
  import { OFFICIAL_LINKS } from "@/lib/links"
 
12
 
13
- /** Sits on the hero video of every page: the MiniMax logo home, and every model page in a menu. */
 
14
  export function SiteHeader({ site }: { site: Site }) {
15
  const rel = (k: string) => site.releases.find((r) => r.key === k)!
16
  return (
@@ -19,18 +21,14 @@ export function SiteHeader({ site }: { site: Site }) {
19
  <Logo className="h-8 w-auto sm:h-9" />
20
  </a>
21
  <div className="flex items-center gap-1 sm:gap-2">
22
- {/* minimax.io's pages for the releases that have one, as its own header lists them */}
23
- <nav aria-label="On minimax.io" className="hidden items-center gap-1 md:flex">
24
- {OFFICIAL_LINKS.map((l) => (
25
- <a key={l.href} href={l.href} target="_blank" rel="noopener"
26
- className="inline-flex h-10 items-center gap-1 rounded-full px-3.5 text-[15px] font-medium text-white transition-colors hover:bg-white/15 focus-visible:outline-2 focus-visible:outline-white">
27
- {l.label}<ArrowUpRight className="size-4 opacity-80" />
28
- </a>
29
- ))}
30
- </nav>
31
  <DropdownMenu modal={false}>
32
  <DropdownMenuTrigger className="group inline-flex h-10 items-center gap-1.5 rounded-full bg-white px-4.5 text-[15px] font-medium text-[#171717] transition-colors hover:bg-white/85 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-white data-[state=open]:bg-white/85">
33
- Models
34
  <ChevronDown className="size-4 transition-transform duration-200 group-data-[state=open]:rotate-180" />
35
  </DropdownMenuTrigger>
36
  <DropdownMenuContent align="end" sideOffset={10}
@@ -44,7 +42,7 @@ export function SiteHeader({ site }: { site: Site }) {
44
  <DropdownMenuItem asChild className="rounded-lg px-2.5 py-2 text-[15px] focus:bg-muted">
45
  <a href={href(c.key)} className="flex items-center gap-2.5">
46
  <span className="size-2.5 rounded-full" style={{ background: catColor(c.key) }} />
47
- <span className="font-semibold">{c.name}</span>
48
  <span className="ml-auto font-display text-muted-foreground tabular-nums">{full(total)}</span>
49
  </a>
50
  </DropdownMenuItem>
@@ -60,9 +58,9 @@ export function SiteHeader({ site }: { site: Site }) {
60
  )
61
  })}
62
  <DropdownMenuSeparator className="my-1.5 bg-border" />
63
- <DropdownMenuLabel className="sr-only">Elsewhere</DropdownMenuLabel>
64
- {[...OFFICIAL_LINKS.map((l) => ({ label: `${l.label} on minimax.io`, href: l.href })),
65
- { label: "MiniMaxAI on Hugging Face", href: "https://huggingface.co/MiniMaxAI" }].map((l) => (
66
  <DropdownMenuItem key={l.href} asChild className="rounded-lg px-2.5 py-2 text-[15px] text-foreground/80 focus:bg-muted focus:text-foreground">
67
  <a href={l.href} target="_blank" rel="noopener" className="flex items-center gap-2">
68
  {l.label} <ArrowUpRight className="ml-auto size-4 text-muted-foreground" />
 
1
+ import { ArrowUpRight, ChevronDown, Globe } from "lucide-react"
2
  import {
3
  DropdownMenu, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel,
4
  DropdownMenuSeparator, DropdownMenuTrigger,
 
9
  import { href } from "@/lib/route"
10
  import { Logo } from "@/components/logo"
11
  import { OFFICIAL_LINKS } from "@/lib/links"
12
+ import { catName, getLang, setLang, T } from "@/lib/i18n"
13
 
14
+ /** Sits on the hero video of every page: the MiniMax logo home, the language switch, and every
15
+ * model page in a menu (minimax.io's pages at its foot). */
16
  export function SiteHeader({ site }: { site: Site }) {
17
  const rel = (k: string) => site.releases.find((r) => r.key === k)!
18
  return (
 
21
  <Logo className="h-8 w-auto sm:h-9" />
22
  </a>
23
  <div className="flex items-center gap-1 sm:gap-2">
24
+ <button type="button" onClick={() => setLang(getLang() === "zh" ? "en" : "zh")}
25
+ lang={getLang() === "zh" ? "en" : "zh"} aria-label={T.switchLang} title={T.switchLang}
26
+ className="inline-flex h-10 items-center gap-1.5 rounded-full px-3.5 text-[15px] font-medium text-white transition-colors hover:bg-white/15 focus-visible:outline-2 focus-visible:outline-white">
27
+ <Globe className="size-4 opacity-85" />{T.otherLang}
28
+ </button>
 
 
 
 
29
  <DropdownMenu modal={false}>
30
  <DropdownMenuTrigger className="group inline-flex h-10 items-center gap-1.5 rounded-full bg-white px-4.5 text-[15px] font-medium text-[#171717] transition-colors hover:bg-white/85 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-white data-[state=open]:bg-white/85">
31
+ {T.menu}
32
  <ChevronDown className="size-4 transition-transform duration-200 group-data-[state=open]:rotate-180" />
33
  </DropdownMenuTrigger>
34
  <DropdownMenuContent align="end" sideOffset={10}
 
42
  <DropdownMenuItem asChild className="rounded-lg px-2.5 py-2 text-[15px] focus:bg-muted">
43
  <a href={href(c.key)} className="flex items-center gap-2.5">
44
  <span className="size-2.5 rounded-full" style={{ background: catColor(c.key) }} />
45
+ <span className="font-semibold">{catName(c)}</span>
46
  <span className="ml-auto font-display text-muted-foreground tabular-nums">{full(total)}</span>
47
  </a>
48
  </DropdownMenuItem>
 
58
  )
59
  })}
60
  <DropdownMenuSeparator className="my-1.5 bg-border" />
61
+ <DropdownMenuLabel className="sr-only">{T.elsewhere}</DropdownMenuLabel>
62
+ {[...OFFICIAL_LINKS.map((l) => ({ label: T.officialLink(l.label), href: l.href })),
63
+ { label: T.hfOrg, href: "https://huggingface.co/MiniMaxAI" }].map((l) => (
64
  <DropdownMenuItem key={l.href} asChild className="rounded-lg px-2.5 py-2 text-[15px] text-foreground/80 focus:bg-muted focus:text-foreground">
65
  <a href={l.href} target="_blank" rel="noopener" className="flex items-center gap-2">
66
  {l.label} <ArrowUpRight className="ml-auto size-4 text-muted-foreground" />
code/web/src/components/top-lists.tsx CHANGED
@@ -1,5 +1,6 @@
1
  import { useMemo } from "react"
2
- import { REL_NAME, type Author, type Lineage, type Repo } from "@/lib/types"
 
3
  import { num as fmt, hfUrl } from "@/lib/format"
4
  import { relColor } from "@/components/rel"
5
  import { Who } from "@/components/who"
@@ -23,7 +24,7 @@ export function TopModels({ repos, authors }: { repos: Repo[]; authors: Record<s
23
  </div>
24
  <div className="mt-1.5 flex items-center gap-3">
25
  <div className="h-1.5 rounded-full" style={{ width: `${Math.max(2, ((r.dl30 ?? 0) / max) * 78)}%`, background: relColor(r.rel) }} />
26
- <span className="shrink-0 text-sm text-muted-foreground">{REL_NAME[r.rel]}</span>
27
  </div>
28
  </div>
29
  </li>
@@ -47,7 +48,7 @@ export function TopAuthors({ L, authors }: { L: Lineage; authors: Record<string,
47
  {authors[t.a]?.n ?? t.a}
48
  {authors[t.a]?.n && authors[t.a].n !== t.a && <span className="ml-2 text-muted-foreground">{t.a}</span>}
49
  </a>
50
- <span className="shrink-0 text-[15px]"><span className="font-display font-semibold tabular-nums">{t.n}</span> {t.n === 1 ? "model" : "models"}</span>
51
  </div>
52
  <div className="mt-1.5 h-1.5 rounded-full bg-[var(--neutral-series)]" style={{ width: `${(t.n / max) * 100}%` }} />
53
  </div>
 
1
  import { useMemo } from "react"
2
+ import type { Author, Lineage, Repo } from "@/lib/types"
3
+ import { relName, T } from "@/lib/i18n"
4
  import { num as fmt, hfUrl } from "@/lib/format"
5
  import { relColor } from "@/components/rel"
6
  import { Who } from "@/components/who"
 
24
  </div>
25
  <div className="mt-1.5 flex items-center gap-3">
26
  <div className="h-1.5 rounded-full" style={{ width: `${Math.max(2, ((r.dl30 ?? 0) / max) * 78)}%`, background: relColor(r.rel) }} />
27
+ <span className="shrink-0 text-sm text-muted-foreground">{relName(r.rel)}</span>
28
  </div>
29
  </div>
30
  </li>
 
48
  {authors[t.a]?.n ?? t.a}
49
  {authors[t.a]?.n && authors[t.a].n !== t.a && <span className="ml-2 text-muted-foreground">{t.a}</span>}
50
  </a>
51
+ <span className="shrink-0 text-[15px]"><span className="font-display font-semibold tabular-nums">{t.n}</span> {T.modelsUnit(t.n)}</span>
52
  </div>
53
  <div className="mt-1.5 h-1.5 rounded-full bg-[var(--neutral-series)]" style={{ width: `${(t.n / max) * 100}%` }} />
54
  </div>
code/web/src/index.css CHANGED
@@ -15,10 +15,10 @@
15
 
16
  @theme inline {
17
  --font-heading: var(--font-sans);
18
- --font-sans: "DM Sans Variable", system-ui, -apple-system, "Segoe UI", "PingFang SC", sans-serif;
19
- --font-display: "Outfit Variable", "DM Sans Variable", system-ui, sans-serif;
20
- --font-serif: "Libre Baskerville", Georgia, "Times New Roman", serif;
21
- --font-numeral: "Abhaya Libre", "Libre Baskerville", Georgia, serif;
22
  --color-sidebar-ring: var(--sidebar-ring);
23
  --color-sidebar-border: var(--sidebar-border);
24
  --color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
@@ -63,6 +63,9 @@
63
  and relation colours from brand hues, checked with the dataviz validator on #fff (modalities in
64
  stack order, relations all pairs) and on #000 for the galaxy stage. */
65
  :root {
 
 
 
66
  --background: #ffffff;
67
  --foreground: #171717;
68
  --card: #ffffff;
 
15
 
16
  @theme inline {
17
  --font-heading: var(--font-sans);
18
+ --font-sans: "DM Sans Variable", var(--font-cjk), system-ui, -apple-system, "Segoe UI", sans-serif;
19
+ --font-display: "Outfit Variable", "DM Sans Variable", var(--font-cjk), system-ui, sans-serif;
20
+ --font-serif: "Libre Baskerville", var(--font-cjk), Georgia, "Times New Roman", serif;
21
+ --font-numeral: "Abhaya Libre", "Libre Baskerville", var(--font-cjk), Georgia, serif;
22
  --color-sidebar-ring: var(--sidebar-ring);
23
  --color-sidebar-border: var(--sidebar-border);
24
  --color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
 
63
  and relation colours from brand hues, checked with the dataviz validator on #fff (modalities in
64
  stack order, relations all pairs) and on #000 for the galaxy stage. */
65
  :root {
66
+ /* Chinese falls through to the system sans, in the order minimaxi.com uses (MiSans where the
67
+ system has it), so a serif tagline never lands on Songti or SimSun. */
68
+ --font-cjk: "PingFang SC", "PingFang HK", "MiSans", "HarmonyOS Sans SC", "Hiragino Sans GB", "Microsoft YaHei", "微软雅黑", "Noto Sans SC", "Noto Sans CJK SC", "Source Han Sans SC";
69
  --background: #ffffff;
70
  --foreground: #171717;
71
  --card: #ffffff;
code/web/src/lib/format.ts CHANGED
@@ -1,4 +1,7 @@
1
- /** Compact English magnitudes: 987 / 12.3K / 456K / 1.42M / 142M / 1.2B. */
 
 
 
2
  export function num(n: number | null | undefined): string {
3
  if (n == null) return "–"
4
  const [v, u] = numParts(n)
@@ -8,6 +11,11 @@ export function num(n: number | null | undefined): string {
8
  /** Split form for big display numbers: ["1.42", "M"]. */
9
  export function numParts(n: number): [string, string] {
10
  const a = Math.abs(n)
 
 
 
 
 
11
  if (a >= 1e9) return [trim((n / 1e9).toFixed(a >= 1e10 ? 1 : 2)), "B"]
12
  if (a >= 1e6) return [trim((n / 1e6).toFixed(a >= 1e8 ? 0 : a >= 1e7 ? 1 : 2)), "M"]
13
  if (a >= 1e4) return [trim((n / 1e3).toFixed(a >= 1e5 ? 0 : 1)), "K"]
@@ -21,12 +29,17 @@ const trim = (s: string) => s.replace(/\.0+$/, "").replace(/(\.\d*?)0+$/, "$1")
21
  export const hfUrl = (id: string) => `https://huggingface.co/${id}`
22
 
23
  const MONTHS = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]
24
- /** "Nov 3" */
25
- export const md = (s: string) => `${MONTHS[Number(s.slice(5, 7)) - 1]} ${Number(s.slice(8, 10))}`
26
- /** "Nov 3, 2026" */
27
- export const mdy = (s: string) => `${md(s)}, ${s.slice(0, 4)}`
28
- /** "Nov 2026" */
29
- export const my = (s: string) => `${MONTHS[Number(s.slice(5, 7)) - 1]} ${s.slice(0, 4)}`
 
 
 
 
 
30
 
31
  export const DAY = 86400000
32
  export const toTime = (s: string) => Date.parse(s.slice(0, 10) + "T00:00:00Z")
 
1
+ import { getLang } from "@/lib/i18n"
2
+
3
+ /** Compact magnitudes, about three figures: 987 / 12.3K / 456K / 1.42M / 142M / 1.2B, and in
4
+ * Chinese 9,876 / 1.23万 / 45.6万 / 456万 / 4347万 / 1.75亿. */
5
  export function num(n: number | null | undefined): string {
6
  if (n == null) return "–"
7
  const [v, u] = numParts(n)
 
11
  /** Split form for big display numbers: ["1.42", "M"]. */
12
  export function numParts(n: number): [string, string] {
13
  const a = Math.abs(n)
14
+ if (getLang() === "zh") {
15
+ if (a >= 1e8) return [trim((n / 1e8).toFixed(a >= 1e10 ? 0 : a >= 1e9 ? 1 : 2)), "亿"]
16
+ if (a >= 1e4) return [trim((n / 1e4).toFixed(a >= 1e6 ? 0 : a >= 1e5 ? 1 : 2)), "万"]
17
+ return [Math.round(n).toLocaleString("en-US"), ""]
18
+ }
19
  if (a >= 1e9) return [trim((n / 1e9).toFixed(a >= 1e10 ? 1 : 2)), "B"]
20
  if (a >= 1e6) return [trim((n / 1e6).toFixed(a >= 1e8 ? 0 : a >= 1e7 ? 1 : 2)), "M"]
21
  if (a >= 1e4) return [trim((n / 1e3).toFixed(a >= 1e5 ? 0 : 1)), "K"]
 
29
  export const hfUrl = (id: string) => `https://huggingface.co/${id}`
30
 
31
  const MONTHS = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]
32
+ const zh = () => getLang() === "zh"
33
+ const M = (s: string) => Number(s.slice(5, 7))
34
+ const D = (s: string) => Number(s.slice(8, 10))
35
+ /** "Nov" / "11月" */
36
+ export const mon = (s: string) => (zh() ? `${M(s)}月` : MONTHS[M(s) - 1])
37
+ /** "Nov 3" / "11月3日" */
38
+ export const md = (s: string) => (zh() ? `${M(s)}月${D(s)}日` : `${MONTHS[M(s) - 1]} ${D(s)}`)
39
+ /** "Nov 3, 2026" / "2026年11月3日" */
40
+ export const mdy = (s: string) => (zh() ? `${s.slice(0, 4)}年${md(s)}` : `${md(s)}, ${s.slice(0, 4)}`)
41
+ /** "Nov 2026" / "2026年11月" */
42
+ export const my = (s: string) => (zh() ? `${s.slice(0, 4)}年${M(s)}月` : `${MONTHS[M(s) - 1]} ${s.slice(0, 4)}`)
43
 
44
  export const DAY = 86400000
45
  export const toTime = (s: string) => Date.parse(s.slice(0, 10) + "T00:00:00Z")
code/web/src/lib/i18n.ts ADDED
@@ -0,0 +1,235 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { useSyncExternalStore } from "react"
2
+ import type { Rel } from "@/lib/types"
3
+
4
+ /**
5
+ * English and Chinese copy. The language comes from `?lang=zh|en`, then the visitor's last
6
+ * choice, then the browser's first language; switching re-renders the whole page (App keys it on
7
+ * the language), so components read `T` while they render and nothing caches copy at import.
8
+ * Every key must exist in both languages: `zh` is typed from `en`, so a missing one fails the build.
9
+ * In Chinese, as in English, MiniMax's weights are never called open source: 公开 / 开放权重.
10
+ */
11
+ export type Lang = "en" | "zh"
12
+
13
+ const en = {
14
+ site: "MiniMax Ecosystem",
15
+ pageTitle: (name: string) => `${name} · MiniMax Ecosystem`,
16
+ noData: "The data did not load. Try refreshing the page.",
17
+ broken: "Something went wrong. Try refreshing the page.",
18
+
19
+ menu: "Models",
20
+ elsewhere: "Elsewhere",
21
+ officialLink: (label: string) => `${label} on minimax.io`,
22
+ hfOrg: "MiniMaxAI on Hugging Face",
23
+ otherLang: "中文",
24
+ switchLang: "切换到中文",
25
+
26
+ // the landing page
27
+ dlTagline: "downloads of MiniMax models and their community",
28
+ chart: "Chart",
29
+ metricModels: "Models",
30
+ metricDownloads: "Downloads",
31
+ chartModelsAria: (v: string) => `Community models built on MiniMax, ${v} today`,
32
+ chartDownloadsAria: (v: string) => `Downloads of MiniMax models and everything built on them, ${v} in all`,
33
+ communityModels: "community models",
34
+ communityDownloads: "community downloads",
35
+ minimaxModelDownloads: "MiniMax model downloads",
36
+ minimaxDownloads: "MiniMax downloads",
37
+ builders: "builders",
38
+ openModels: (n: number): string => (n === 1 ? "open model" : "open models"),
39
+ moreBuilders: (n: string) => `+${n} more builders`,
40
+ byModality: "By modality",
41
+ everyRelease: "Every release",
42
+ earlier: "Earlier releases",
43
+ later: "Later releases",
44
+ railCommunity: "community",
45
+ railDownloads: "downloads",
46
+
47
+ // a model's page
48
+ heroCount: "community models", // after the number
49
+ communityDownloads30: "community downloads, 30 days",
50
+ releaseDownloads: (name: string) => `${name} downloads`,
51
+ growth: "Growth",
52
+ byTypeOverTime: "Community models by type",
53
+ newEachWeek: "New each week",
54
+ newN: "New",
55
+ weekOf: (d: string) => `Week of ${d}`,
56
+ downloadsOverTime: "Downloads over time",
57
+ dailyDownloads: "Daily downloads",
58
+ byType: "By type",
59
+ whoBuilds: "Who builds on it",
60
+ topModels: "Most downloaded, last 30 days",
61
+ topBuilders: "Most active builders",
62
+ allModels: "All community models",
63
+ galaxy: "Galaxy",
64
+
65
+ // tables and lists
66
+ type: "Type",
67
+ model: "Model",
68
+ modelsCol: "Models",
69
+ onHfTree: "On HF model tree",
70
+ dl30Col: "Downloads, 30 days",
71
+ allTime: "All-time",
72
+ days30: "30 days",
73
+ lastDay: "Last day",
74
+ subtotal: "Subtotal",
75
+ total: "Total",
76
+ modelsUnit: (n: number): string => (n === 1 ? "model" : "models"), // after the number
77
+ search: "Search models or builders",
78
+ showMore: (n: number) => `Show ${n} more`,
79
+
80
+ // the galaxy
81
+ rings: ["", "Built on it directly", "Second generation", "Third generation and on"],
82
+ builtOn: "Built on",
83
+ downloads: "Downloads",
84
+ last30: "Last 30 days",
85
+ likes: "Likes",
86
+ created: "Created",
87
+ officialTag: (name: string) => `${name} (official)`,
88
+ minimaxOfficial: "MiniMax official",
89
+ galaxyCommunity: "Community models",
90
+ placing: (n: string) => `Placing ${n} models…`,
91
+ galaxyAria: (n: string, name: string) => `${n} community models around ${name}`,
92
+
93
+ downloadPng: "Download PNG",
94
+ downloadAria: (name: string) => `Download ${name} as PNG`,
95
+
96
+ rel: {
97
+ adapter: "Adapters", finetune: "Fine-tunes", quantized: "Quantized", repackage: "Repackaged",
98
+ merge: "Merges", mirror: "Mirrors", component: "Components",
99
+ } as Record<Rel, string>,
100
+ /** English names come from the data (site.json); a key missing here falls back to them. */
101
+ cat: {} as Record<string, string>,
102
+ }
103
+
104
+ const zh: typeof en = {
105
+ site: "MiniMax 生态",
106
+ pageTitle: (name) => `${name} · MiniMax 生态`,
107
+ noData: "数据没有加载出来,请刷新页面重试。",
108
+ broken: "页面出错了,请刷新重试。",
109
+
110
+ menu: "模型",
111
+ elsewhere: "其他链接",
112
+ officialLink: (label) => `官网 ${label}`,
113
+ hfOrg: "Hugging Face 上的 MiniMaxAI",
114
+ otherLang: "EN",
115
+ switchLang: "Switch to English",
116
+
117
+ dlTagline: "MiniMax 模型及其社区模型的总下载量",
118
+ chart: "图表",
119
+ metricModels: "模型数",
120
+ metricDownloads: "下载量",
121
+ chartModelsAria: (v) => `基于 MiniMax 的社区模型,目前共 ${v} 个`,
122
+ chartDownloadsAria: (v) => `MiniMax 模型及其社区模型的下载量,累计 ${v}`,
123
+ communityModels: "社区模型",
124
+ communityDownloads: "社区下载量",
125
+ minimaxModelDownloads: "MiniMax 模型下载量",
126
+ minimaxDownloads: "MiniMax 下载量",
127
+ builders: "开发者",
128
+ openModels: () => "公开模型",
129
+ moreBuilders: (n) => `另有 ${n} 位开发者`,
130
+ byModality: "按模态",
131
+ everyRelease: "历次发布",
132
+ earlier: "更早的发布",
133
+ later: "更近的发布",
134
+ railCommunity: "社区模型",
135
+ railDownloads: "下载量",
136
+
137
+ heroCount: "个社区模型",
138
+ communityDownloads30: "近 30 天社区下载量",
139
+ releaseDownloads: (name) => `${name} 下载量`,
140
+ growth: "增长",
141
+ byTypeOverTime: "各类社区模型",
142
+ newEachWeek: "每周新增",
143
+ newN: "新增",
144
+ weekOf: (d) => `${d}起的一周`,
145
+ downloadsOverTime: "下载量走势",
146
+ dailyDownloads: "每日下载量",
147
+ byType: "按类型",
148
+ whoBuilds: "谁在基于它开发",
149
+ topModels: "近 30 天下载最多",
150
+ topBuilders: "最活跃的开发者",
151
+ allModels: "全部社区模型",
152
+ galaxy: "星系图",
153
+
154
+ type: "类型",
155
+ model: "模型",
156
+ modelsCol: "模型数",
157
+ onHfTree: "HF 模型树",
158
+ dl30Col: "近 30 天下载量",
159
+ allTime: "累计下载量",
160
+ days30: "近 30 天",
161
+ lastDay: "最近一天",
162
+ subtotal: "小计",
163
+ total: "合计",
164
+ modelsUnit: () => "个模型",
165
+ search: "搜索模型或开发者",
166
+ showMore: (n) => `再显示 ${n} 个`,
167
+
168
+ rings: ["", "直接基于它", "第二代", "第三代及以后"],
169
+ builtOn: "基于",
170
+ downloads: "下载量",
171
+ last30: "近 30 天",
172
+ likes: "点赞",
173
+ created: "创建于",
174
+ officialTag: (name) => `${name}(官方)`,
175
+ minimaxOfficial: "MiniMax 官方",
176
+ galaxyCommunity: "社区模型",
177
+ placing: (n) => `正在排布 ${n} 个模型…`,
178
+ galaxyAria: (n, name) => `${name} 周围的 ${n} 个社区模型`,
179
+
180
+ downloadPng: "下载 PNG",
181
+ downloadAria: (name) => `下载 PNG:${name}`,
182
+
183
+ rel: {
184
+ adapter: "适配器", finetune: "微调", quantized: "量化", repackage: "格式转换",
185
+ merge: "合并", mirror: "镜像", component: "组件",
186
+ },
187
+ cat: { language: "语言", video: "视频", image: "图片", music: "音乐", audio: "语音" },
188
+ }
189
+
190
+ const KEY = "mm-eco-lang"
191
+ const valid = (s: string | null | undefined): s is Lang => s === "en" || s === "zh"
192
+
193
+ function detect(): Lang {
194
+ const q = new URLSearchParams(location.search).get("lang")
195
+ if (valid(q)) return q
196
+ try {
197
+ const s = localStorage.getItem(KEY)
198
+ if (valid(s)) return s
199
+ } catch { /* storage blocked: fall through to the browser's language */ }
200
+ return /^zh\b/i.test(navigator.languages?.[0] ?? navigator.language ?? "") ? "zh" : "en"
201
+ }
202
+
203
+ let lang: Lang = detect()
204
+ /** The copy in the current language; reassigned by setLang. */
205
+ export let T = lang === "zh" ? zh : en
206
+ const listeners = new Set<() => void>()
207
+ const mark = () => (document.documentElement.lang = lang === "zh" ? "zh-CN" : "en")
208
+ mark()
209
+
210
+ export const getLang = () => lang
211
+
212
+ export function setLang(l: Lang) {
213
+ if (l === lang) return
214
+ lang = l
215
+ T = l === "zh" ? zh : en
216
+ mark()
217
+ try {
218
+ localStorage.setItem(KEY, l)
219
+ } catch { /* the choice lasts this visit only */ }
220
+ // a shared ?lang= link would otherwise win over the choice on the next load
221
+ const u = new URL(location.href)
222
+ if (u.searchParams.has("lang")) {
223
+ u.searchParams.set("lang", l)
224
+ history.replaceState(history.state, "", u)
225
+ }
226
+ listeners.forEach((f) => f())
227
+ }
228
+
229
+ export function useLang(): Lang {
230
+ return useSyncExternalStore((f) => (listeners.add(f), () => listeners.delete(f)), getLang)
231
+ }
232
+
233
+ export const relName = (r: Rel) => T.rel[r]
234
+ /** A modality's name: the data's English name, or its Chinese one by key. */
235
+ export const catName = (c: { key: string; name: string }) => T.cat[c.key] ?? c.name
code/web/src/lib/ticks.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { DAY, isoDay, md, my } from "@/lib/format"
2
 
3
  /** Month ticks between two times, every one to three months by span (January shows the year);
4
  * weekly ticks when the span is under two months. */
@@ -11,7 +11,7 @@ export function timeTicks(a: number, b: number) {
11
  d.setUTCMonth(d.getUTCMonth() + 1)
12
  for (; d.getTime() <= b; d.setUTCMonth(d.getUTCMonth() + 1)) if (d.getUTCMonth() % every === 0) out.push(d.getTime())
13
  if (out.length >= 2)
14
- return { ticks: out, label: (t: number) => (isoDay(t).slice(5, 7) === "01" ? isoDay(t).slice(0, 4) : my(isoDay(t)).split(" ")[0]) }
15
  const wk: number[] = []
16
  for (let t = a; t <= b; t += 7 * DAY) wk.push(t)
17
  return { ticks: wk, label: (t: number) => md(isoDay(t)) }
 
1
+ import { DAY, isoDay, md, mon } from "@/lib/format"
2
 
3
  /** Month ticks between two times, every one to three months by span (January shows the year);
4
  * weekly ticks when the span is under two months. */
 
11
  d.setUTCMonth(d.getUTCMonth() + 1)
12
  for (; d.getTime() <= b; d.setUTCMonth(d.getUTCMonth() + 1)) if (d.getUTCMonth() % every === 0) out.push(d.getTime())
13
  if (out.length >= 2)
14
+ return { ticks: out, label: (t: number) => (isoDay(t).slice(5, 7) === "01" ? isoDay(t).slice(0, 4) : mon(isoDay(t))) }
15
  const wk: number[] = []
16
  for (let t = a; t <= b; t += 7 * DAY) wk.push(t)
17
  return { ticks: wk, label: (t: number) => md(isoDay(t)) }
code/web/src/lib/types.ts CHANGED
@@ -42,16 +42,6 @@ export type Data = {
42
  authors: Record<string, Author>
43
  }
44
 
45
- export const REL_NAME: Record<Rel, string> = {
46
- adapter: "Adapters",
47
- finetune: "Fine-tunes",
48
- quantized: "Quantized",
49
- repackage: "Repackaged",
50
- merge: "Merges",
51
- mirror: "Mirrors",
52
- component: "Components",
53
- }
54
-
55
  /** One release on the landing page: a model line (M2, H3, ...) and its public repos. */
56
  export type Release = {
57
  key: string
 
42
  authors: Record<string, Author>
43
  }
44
 
 
 
 
 
 
 
 
 
 
 
45
  /** One release on the landing page: a model line (M2, H3, ...) and its public repos. */
46
  export type Release = {
47
  key: string
code/web/src/main.tsx CHANGED
@@ -2,6 +2,7 @@ import { Component, StrictMode, type ReactNode } from "react"
2
  import { createRoot } from "react-dom/client"
3
  import "./index.css"
4
  import App from "./App.tsx"
 
5
 
6
  // Light only, as minimax.io is; the galaxy carries its own .dark stage.
7
 
@@ -12,7 +13,7 @@ class Fallback extends Component<{ children: ReactNode }, { failed: boolean }> {
12
  return { failed: true }
13
  }
14
  render() {
15
- return this.state.failed ? <p style={{ padding: 40, fontSize: 18 }}>Something went wrong. Try refreshing the page.</p> : this.props.children
16
  }
17
  }
18
 
 
2
  import { createRoot } from "react-dom/client"
3
  import "./index.css"
4
  import App from "./App.tsx"
5
+ import { T } from "@/lib/i18n"
6
 
7
  // Light only, as minimax.io is; the galaxy carries its own .dark stage.
8
 
 
13
  return { failed: true }
14
  }
15
  render() {
16
+ return this.state.failed ? <p style={{ padding: 40, fontSize: 18 }}>{T.broken}</p> : this.props.children
17
  }
18
  }
19
 
code/web/src/pages/category.tsx CHANGED
@@ -16,6 +16,7 @@ import { RelationTable } from "@/components/relation-table"
16
  import { TopAuthors, TopModels } from "@/components/top-lists"
17
  import { ModelTable } from "@/components/model-table"
18
  import { Galaxy } from "@/components/galaxy"
 
19
 
20
  export function CategoryPage({ site, cat, rel }: { site: Site; cat: string; rel: string | null }) {
21
  const [data, setData] = useState<Data | null>(null)
@@ -41,7 +42,7 @@ export function CategoryPage({ site, cat, rel }: { site: Site; cat: string; rel:
41
 
42
  useEffect(() => {
43
  // as minimax.io titles its pages ("MiniMax H3 · H3 Family")
44
- document.title = release ? `${release.name.replace(/-/g, " ")} · MiniMax Ecosystem` : "MiniMax Ecosystem"
45
  }, [release])
46
 
47
  if (!c) return null
@@ -62,7 +63,7 @@ export function CategoryPage({ site, cat, rel }: { site: Site; cat: string; rel:
62
  <TitleLockup name={release.name} />
63
  </span>
64
  <span className="mt-3 block font-serif text-[22px] leading-snug sm:mt-4 sm:text-[28px]">
65
- <CountUp value={L.n_models} format={(v) => full(Math.round(v))} ms={1200} /> community models
66
  </span>
67
  </h1>
68
  )}
@@ -95,50 +96,50 @@ export function CategoryPage({ site, cat, rel }: { site: Site; cat: string; rel:
95
  {L && release && (
96
  <div key={lineage} className="mt-10 grid grid-cols-2 gap-x-8 gap-y-8 rounded-[24px] border border-white/60 bg-white p-6 shadow-[0_30px_80px_-30px_rgba(40,10,80,0.35)] sm:mt-14 sm:p-10 lg:grid-cols-4"
97
  style={{ animation: "rise 800ms cubic-bezier(.22,.61,.36,1) 150ms both" }}>
98
- <Stat value={full(builders)} label="builders" />
99
- <Stat value={num(L.dlall)} label="community downloads" />
100
- <Stat value={num(L.dl30)} label="community downloads, 30 days" />
101
- <Stat value={num(L.official.dlall)} label={`${release.name} downloads`} />
102
  </div>
103
  )}
104
  </div>
105
  </div>
106
 
107
  <main className="relative mx-auto w-full max-w-[1200px] px-4 pb-28 sm:px-8">
108
- {failed && <p className="mt-20 text-lg">The data did not load. Try refreshing the page.</p>}
109
  {data && L && lineage && release && (
110
  <div key={lineage}>
111
- <Section title="Growth">
112
  <div className="grid gap-6 lg:grid-cols-[1.4fr_1fr]">
113
- <Panel title="Community models by type" download={`${release.name} community models by type`}><GrowthLines L={L} rel={data.rel_order} today={data.today} /></Panel>
114
- <Panel title="New each week" download={`${release.name} new community models each week`}><WeeklyBars L={L} today={data.today} color={catColor(cat)} /></Panel>
115
  </div>
116
  </Section>
117
 
118
  {L.history && L.history.length > 1 && (
119
- <Section title="Downloads over time">
120
  <Panel download={`${release.name} downloads over time`}><DownloadHistory history={L.history} name={release.name} color={catColor(cat)} /></Panel>
121
  </Section>
122
  )}
123
 
124
  <DailyLines L={L} rel={data.rel_order} download={`${release.name} daily downloads`} />
125
 
126
- <Section title="By type">
127
  <Panel><RelationTable L={L} order={data.rel_order} /></Panel>
128
  </Section>
129
 
130
- <Section title="Who builds on it">
131
  <div className="grid gap-6 lg:grid-cols-2">
132
- <Panel title="Most downloaded, last 30 days"><TopModels repos={repos} authors={data.authors} /></Panel>
133
- <Panel title="Most active builders"><TopAuthors L={L} authors={data.authors} /></Panel>
134
  </div>
135
  </Section>
136
 
137
- <Section title="All community models">
138
  <Panel><ModelTable repos={repos} authors={data.authors} hasDaily={data.snapshot_days.length > 1} /></Panel>
139
  </Section>
140
 
141
- <Section title="Galaxy">
142
  <Galaxy key={lineage} lineageKey={lineage} repos={repos} L={L} authors={data.authors} name={release.name} cat={cat} />
143
  </Section>
144
  </div>
 
16
  import { TopAuthors, TopModels } from "@/components/top-lists"
17
  import { ModelTable } from "@/components/model-table"
18
  import { Galaxy } from "@/components/galaxy"
19
+ import { T } from "@/lib/i18n"
20
 
21
  export function CategoryPage({ site, cat, rel }: { site: Site; cat: string; rel: string | null }) {
22
  const [data, setData] = useState<Data | null>(null)
 
42
 
43
  useEffect(() => {
44
  // as minimax.io titles its pages ("MiniMax H3 · H3 Family")
45
+ document.title = release ? T.pageTitle(release.name.replace(/-/g, " ")) : T.site
46
  }, [release])
47
 
48
  if (!c) return null
 
63
  <TitleLockup name={release.name} />
64
  </span>
65
  <span className="mt-3 block font-serif text-[22px] leading-snug sm:mt-4 sm:text-[28px]">
66
+ <CountUp value={L.n_models} format={(v) => full(Math.round(v))} ms={1200} /> {T.heroCount}
67
  </span>
68
  </h1>
69
  )}
 
96
  {L && release && (
97
  <div key={lineage} className="mt-10 grid grid-cols-2 gap-x-8 gap-y-8 rounded-[24px] border border-white/60 bg-white p-6 shadow-[0_30px_80px_-30px_rgba(40,10,80,0.35)] sm:mt-14 sm:p-10 lg:grid-cols-4"
98
  style={{ animation: "rise 800ms cubic-bezier(.22,.61,.36,1) 150ms both" }}>
99
+ <Stat value={full(builders)} label={T.builders} />
100
+ <Stat value={num(L.dlall)} label={T.communityDownloads} />
101
+ <Stat value={num(L.dl30)} label={T.communityDownloads30} />
102
+ <Stat value={num(L.official.dlall)} label={T.releaseDownloads(release.name)} />
103
  </div>
104
  )}
105
  </div>
106
  </div>
107
 
108
  <main className="relative mx-auto w-full max-w-[1200px] px-4 pb-28 sm:px-8">
109
+ {failed && <p className="mt-20 text-lg">{T.noData}</p>}
110
  {data && L && lineage && release && (
111
  <div key={lineage}>
112
+ <Section title={T.growth}>
113
  <div className="grid gap-6 lg:grid-cols-[1.4fr_1fr]">
114
+ <Panel title={T.byTypeOverTime} download={`${release.name} community models by type`}><GrowthLines L={L} rel={data.rel_order} today={data.today} /></Panel>
115
+ <Panel title={T.newEachWeek} download={`${release.name} new community models each week`}><WeeklyBars L={L} today={data.today} color={catColor(cat)} /></Panel>
116
  </div>
117
  </Section>
118
 
119
  {L.history && L.history.length > 1 && (
120
+ <Section title={T.downloadsOverTime}>
121
  <Panel download={`${release.name} downloads over time`}><DownloadHistory history={L.history} name={release.name} color={catColor(cat)} /></Panel>
122
  </Section>
123
  )}
124
 
125
  <DailyLines L={L} rel={data.rel_order} download={`${release.name} daily downloads`} />
126
 
127
+ <Section title={T.byType}>
128
  <Panel><RelationTable L={L} order={data.rel_order} /></Panel>
129
  </Section>
130
 
131
+ <Section title={T.whoBuilds}>
132
  <div className="grid gap-6 lg:grid-cols-2">
133
+ <Panel title={T.topModels}><TopModels repos={repos} authors={data.authors} /></Panel>
134
+ <Panel title={T.topBuilders}><TopAuthors L={L} authors={data.authors} /></Panel>
135
  </div>
136
  </Section>
137
 
138
+ <Section title={T.allModels}>
139
  <Panel><ModelTable repos={repos} authors={data.authors} hasDaily={data.snapshot_days.length > 1} /></Panel>
140
  </Section>
141
 
142
+ <Section title={T.galaxy}>
143
  <Galaxy key={lineage} lineageKey={lineage} repos={repos} L={L} authors={data.authors} name={release.name} cat={cat} />
144
  </Section>
145
  </div>
code/web/src/pages/home.tsx CHANGED
@@ -11,6 +11,7 @@ import { CategoryBlocks } from "@/components/category-blocks"
11
  import { CountUp, Stat } from "@/components/layout"
12
  import { HeroVideo } from "@/components/media"
13
  import { DownloadButton } from "@/components/download-button"
 
14
 
15
  export function Home({ site }: { site: Site }) {
16
  const [hidden, setHidden] = useState<Set<string>>(new Set())
@@ -44,8 +45,8 @@ export function Home({ site }: { site: Site }) {
44
  <span className="block font-display text-[clamp(44px,13.5vw,84px)] leading-[0.95] font-semibold tracking-[-0.03em] sm:text-[104px]">
45
  <CountUp value={commDl + offDl} format={(v) => full(Math.round(v))} />
46
  </span>
47
- <span className="mt-3 block font-serif text-[22px] leading-snug sm:mt-4 sm:text-[28px]">
48
- downloads of MiniMax models and their community
49
  </span>
50
  </h1>
51
 
@@ -57,7 +58,7 @@ export function Home({ site }: { site: Site }) {
57
  <div className="order-2 flex flex-wrap gap-2 sm:order-1">
58
  {CAT_ORDER.filter((c) => cats.includes(c)).reverse().map((c) => {
59
  const off = hidden.has(c)
60
- const name = site.categories.find((x) => x.key === c)!.name
61
  return (
62
  <button key={c} type="button" aria-pressed={!off} onClick={() => toggle(c)}
63
  className={`inline-flex h-10 items-center gap-2 rounded-full border px-3.5 text-[15px] transition-colors sm:gap-2.5 sm:px-4 ${off ? "border-border text-muted-foreground" : "border-border bg-white text-foreground hover:bg-muted"}`}>
@@ -70,8 +71,8 @@ export function Home({ site }: { site: Site }) {
70
  </div>
71
  <div className="order-1 flex w-full items-center justify-between gap-2 sm:order-2 sm:w-auto">
72
  {downloads && (
73
- <Segmented label="Chart" value={metric} onChange={setMetric}
74
- options={[{ value: "models", label: "Models" }, { value: "downloads", label: "Downloads" }]} />
75
  )}
76
  <DownloadButton target={chartRef} name={metric === "models" ? "MiniMax community models" : "MiniMax downloads"}
77
  pad={32} big />
@@ -85,11 +86,11 @@ export function Home({ site }: { site: Site }) {
85
  }} />
86
  </div>
87
  <div className="mt-8 grid grid-cols-2 gap-x-8 gap-y-7 border-t border-border pt-7 sm:grid-cols-3 lg:grid-cols-5">
88
- <Stat value={<CountUp value={total} format={(v) => full(Math.round(v))} />} label="community models" />
89
- <Stat value={<CountUp value={commDl} format={num} />} label="community downloads" />
90
- <Stat value={<CountUp value={offDl} format={num} />} label="MiniMax model downloads" />
91
- <Stat value={<CountUp value={site.builders} format={(v) => full(Math.round(v))} />} label="builders" />
92
- <Stat value={full(repos)} label="open models" />
93
  </div>
94
  </div>
95
  </section>
@@ -100,7 +101,7 @@ export function Home({ site }: { site: Site }) {
100
  </div>
101
 
102
  <main className="relative mx-auto w-full max-w-[1200px] px-4 pt-20 pb-28 sm:px-8 sm:pt-24">
103
- <h2 className="mb-10 text-center font-display text-[30px] leading-tight font-semibold tracking-[-0.01em] sm:text-[36px]">By modality</h2>
104
  <CategoryBlocks site={site} />
105
  </main>
106
  </>
 
11
  import { CountUp, Stat } from "@/components/layout"
12
  import { HeroVideo } from "@/components/media"
13
  import { DownloadButton } from "@/components/download-button"
14
+ import { catName, T } from "@/lib/i18n"
15
 
16
  export function Home({ site }: { site: Site }) {
17
  const [hidden, setHidden] = useState<Set<string>>(new Set())
 
45
  <span className="block font-display text-[clamp(44px,13.5vw,84px)] leading-[0.95] font-semibold tracking-[-0.03em] sm:text-[104px]">
46
  <CountUp value={commDl + offDl} format={(v) => full(Math.round(v))} />
47
  </span>
48
+ <span className="mt-3 block font-serif text-[22px] leading-snug [word-break:keep-all] sm:mt-4 sm:text-[28px]">
49
+ {T.dlTagline}
50
  </span>
51
  </h1>
52
 
 
58
  <div className="order-2 flex flex-wrap gap-2 sm:order-1">
59
  {CAT_ORDER.filter((c) => cats.includes(c)).reverse().map((c) => {
60
  const off = hidden.has(c)
61
+ const name = catName(site.categories.find((x) => x.key === c)!)
62
  return (
63
  <button key={c} type="button" aria-pressed={!off} onClick={() => toggle(c)}
64
  className={`inline-flex h-10 items-center gap-2 rounded-full border px-3.5 text-[15px] transition-colors sm:gap-2.5 sm:px-4 ${off ? "border-border text-muted-foreground" : "border-border bg-white text-foreground hover:bg-muted"}`}>
 
71
  </div>
72
  <div className="order-1 flex w-full items-center justify-between gap-2 sm:order-2 sm:w-auto">
73
  {downloads && (
74
+ <Segmented label={T.chart} value={metric} onChange={setMetric}
75
+ options={[{ value: "models", label: T.metricModels }, { value: "downloads", label: T.metricDownloads }]} />
76
  )}
77
  <DownloadButton target={chartRef} name={metric === "models" ? "MiniMax community models" : "MiniMax downloads"}
78
  pad={32} big />
 
86
  }} />
87
  </div>
88
  <div className="mt-8 grid grid-cols-2 gap-x-8 gap-y-7 border-t border-border pt-7 sm:grid-cols-3 lg:grid-cols-5">
89
+ <Stat value={<CountUp value={total} format={(v) => full(Math.round(v))} />} label={T.communityModels} />
90
+ <Stat value={<CountUp value={commDl} format={num} />} label={T.communityDownloads} />
91
+ <Stat value={<CountUp value={offDl} format={num} />} label={T.minimaxModelDownloads} />
92
+ <Stat value={<CountUp value={site.builders} format={(v) => full(Math.round(v))} />} label={T.builders} />
93
+ <Stat value={full(repos)} label={T.openModels(repos)} />
94
  </div>
95
  </div>
96
  </section>
 
101
  </div>
102
 
103
  <main className="relative mx-auto w-full max-w-[1200px] px-4 pt-20 pb-28 sm:px-8 sm:pt-24">
104
+ <h2 className="mb-10 text-center font-display text-[30px] leading-tight font-semibold tracking-[-0.01em] sm:text-[36px]">{T.byModality}</h2>
105
  <CategoryBlocks site={site} />
106
  </main>
107
  </>