Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
88 changes: 88 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -116,3 +116,91 @@ public/ja/help.html
public/ja/changelog.html
public/ja/help/embed-api.html
public/ja/index.html
public/de/offline-document-editor.html
public/de/no-signup-document-editor.html
public/de/private-document-editor.html
public/de/edit-documents-without-account.html
public/de/embed-document-editor.html
public/de/webmcp-document-editor.html
public/de/open/docx.html
public/de/open/xlsx.html
public/de/open/pptx.html
public/de/open/pdf.html
public/de/open/odt.html
public/de/open/ods.html
public/de/open/odp.html
public/de/convert/docx-to-pdf.html
public/de/convert/xlsx-to-pdf.html
public/de/convert/pptx-to-pdf.html
public/de/convert/xlsx-to-csv.html
public/de/convert/csv-to-xlsx.html
public/de/help.html
public/de/changelog.html
public/de/help/embed-api.html
public/de/index.html
public/es/offline-document-editor.html
public/es/no-signup-document-editor.html
public/es/private-document-editor.html
public/es/edit-documents-without-account.html
public/es/embed-document-editor.html
public/es/webmcp-document-editor.html
public/es/open/docx.html
public/es/open/xlsx.html
public/es/open/pptx.html
public/es/open/pdf.html
public/es/open/odt.html
public/es/open/ods.html
public/es/open/odp.html
public/es/convert/docx-to-pdf.html
public/es/convert/xlsx-to-pdf.html
public/es/convert/pptx-to-pdf.html
public/es/convert/xlsx-to-csv.html
public/es/convert/csv-to-xlsx.html
public/es/help.html
public/es/changelog.html
public/es/help/embed-api.html
public/es/index.html
public/ko/offline-document-editor.html
public/ko/no-signup-document-editor.html
public/ko/private-document-editor.html
public/ko/edit-documents-without-account.html
public/ko/embed-document-editor.html
public/ko/webmcp-document-editor.html
public/ko/open/docx.html
public/ko/open/xlsx.html
public/ko/open/pptx.html
public/ko/open/pdf.html
public/ko/open/odt.html
public/ko/open/ods.html
public/ko/open/odp.html
public/ko/convert/docx-to-pdf.html
public/ko/convert/xlsx-to-pdf.html
public/ko/convert/pptx-to-pdf.html
public/ko/convert/xlsx-to-csv.html
public/ko/convert/csv-to-xlsx.html
public/ko/help.html
public/ko/changelog.html
public/ko/help/embed-api.html
public/ko/index.html
public/pt/offline-document-editor.html
public/pt/no-signup-document-editor.html
public/pt/private-document-editor.html
public/pt/edit-documents-without-account.html
public/pt/embed-document-editor.html
public/pt/webmcp-document-editor.html
public/pt/open/docx.html
public/pt/open/xlsx.html
public/pt/open/pptx.html
public/pt/open/pdf.html
public/pt/open/odt.html
public/pt/open/ods.html
public/pt/open/odp.html
public/pt/convert/docx-to-pdf.html
public/pt/convert/xlsx-to-pdf.html
public/pt/convert/pptx-to-pdf.html
public/pt/convert/xlsx-to-csv.html
public/pt/convert/csv-to-xlsx.html
public/pt/help.html
public/pt/changelog.html
public/pt/help/embed-api.html
public/pt/index.html
88 changes: 88 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -97,3 +97,91 @@ public/ja/help.html
public/ja/changelog.html
public/ja/help/embed-api.html
public/ja/index.html
public/de/offline-document-editor.html
public/de/no-signup-document-editor.html
public/de/private-document-editor.html
public/de/edit-documents-without-account.html
public/de/embed-document-editor.html
public/de/webmcp-document-editor.html
public/de/open/docx.html
public/de/open/xlsx.html
public/de/open/pptx.html
public/de/open/pdf.html
public/de/open/odt.html
public/de/open/ods.html
public/de/open/odp.html
public/de/convert/docx-to-pdf.html
public/de/convert/xlsx-to-pdf.html
public/de/convert/pptx-to-pdf.html
public/de/convert/xlsx-to-csv.html
public/de/convert/csv-to-xlsx.html
public/de/help.html
public/de/changelog.html
public/de/help/embed-api.html
public/de/index.html
public/es/offline-document-editor.html
public/es/no-signup-document-editor.html
public/es/private-document-editor.html
public/es/edit-documents-without-account.html
public/es/embed-document-editor.html
public/es/webmcp-document-editor.html
public/es/open/docx.html
public/es/open/xlsx.html
public/es/open/pptx.html
public/es/open/pdf.html
public/es/open/odt.html
public/es/open/ods.html
public/es/open/odp.html
public/es/convert/docx-to-pdf.html
public/es/convert/xlsx-to-pdf.html
public/es/convert/pptx-to-pdf.html
public/es/convert/xlsx-to-csv.html
public/es/convert/csv-to-xlsx.html
public/es/help.html
public/es/changelog.html
public/es/help/embed-api.html
public/es/index.html
public/ko/offline-document-editor.html
public/ko/no-signup-document-editor.html
public/ko/private-document-editor.html
public/ko/edit-documents-without-account.html
public/ko/embed-document-editor.html
public/ko/webmcp-document-editor.html
public/ko/open/docx.html
public/ko/open/xlsx.html
public/ko/open/pptx.html
public/ko/open/pdf.html
public/ko/open/odt.html
public/ko/open/ods.html
public/ko/open/odp.html
public/ko/convert/docx-to-pdf.html
public/ko/convert/xlsx-to-pdf.html
public/ko/convert/pptx-to-pdf.html
public/ko/convert/xlsx-to-csv.html
public/ko/convert/csv-to-xlsx.html
public/ko/help.html
public/ko/changelog.html
public/ko/help/embed-api.html
public/ko/index.html
public/pt/offline-document-editor.html
public/pt/no-signup-document-editor.html
public/pt/private-document-editor.html
public/pt/edit-documents-without-account.html
public/pt/embed-document-editor.html
public/pt/webmcp-document-editor.html
public/pt/open/docx.html
public/pt/open/xlsx.html
public/pt/open/pptx.html
public/pt/open/pdf.html
public/pt/open/odt.html
public/pt/open/ods.html
public/pt/open/odp.html
public/pt/convert/docx-to-pdf.html
public/pt/convert/xlsx-to-pdf.html
public/pt/convert/pptx-to-pdf.html
public/pt/convert/xlsx-to-csv.html
public/pt/convert/csv-to-xlsx.html
public/pt/help.html
public/pt/changelog.html
public/pt/help/embed-api.html
public/pt/index.html
22 changes: 21 additions & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ lib/ # 应用层(纯 TypeScript,只在本站点用)
sw-update.ts # SW 更新策略的编辑器一侧(有文档打开时不提升 worker);落地页一侧在 public/sw-register.js
agent-plugin/ # Agent 协同编辑:editor-bridge(直调 window.editor)、tools、ui/
packages/ # pnpm workspace,供 ran 生态三处站点共享(包名 @ranuts/*)
shared/ # document-types / document-utils / i18n(en + zh-CN 词条;编辑器 UI 语言另由 vendor 45 语言包提供)/ store(createSignal)
shared/ # document-types / document-utils / i18n(7 种站点语言:en / zh-CN / ja / ko / de / es / pt,词条表都是完整的;编辑器 UI 语言另由 vendor 45 语言包提供)/ store(createSignal)
converter/ # 格式转换:CSV↔XLSX(SheetJS)、docx-zip 媒体处理、签名嗅探、PDF 字体清单
agent-core/ # LLM 运行时 + 多 Provider(anthropic/openai/gemini/ollama/webllm)+ key 存储
chat-ui/ # 聊天面板 UI
Expand Down Expand Up @@ -402,6 +402,26 @@ docs/explorations/2026-08-19-ci-e2e-sharding.md。

---

## 多语言(站点 7 种,2026-08-23 起)

站点语言 = `SHELL_LOCALES`(`packages/shared/src/i18n.ts`)= `bin/build-pages.mjs` 的
`LOCALES` = `content/<locale>/` 目录 = README 里写的数字。**四处必须一致**,因为它们
描述的是同一件事:用户在语言菜单里选了什么,页面、应用 UI、编辑器 vendor 就都是什么。

- 加一种语言 = 加一个 `content/<locale>/` 目录(18 个落地页 markdown + `home.json` +
`help.md`)+ `LOCALES` 一行 + `UI` 表一段 + sitemap/llms.txt 的镜像行。**代码不用改。**
`test/unit/landing-pages.test.ts` 从路由推导 locale,不需要跟着改。
- **首页的编辑器链接必须带 `?locale=`**(`renderHome` 的 `editor()`)。app 的 i18n 先读
URL 再读 cookie/localStorage/navigator.language,所以这是"站点是日语"与"编辑器是日语"
之间唯一的那根线。同一处用例钉住。
- **加语言前先确认 vendor 有对应的语言包**(`public/web-apps/apps/*/main/locale/`,45 个)。
波斯语就是栽在这里:站点译文齐了,`fa` 不在 vendor 里,编辑器工具栏只能退回英文——
于是 2026-08-23 把 `fa` 整表从 i18n 删掉,`RTL_LANGUAGES` 留成空数组(机制保留)。
- **RTL 还没有做**:`landing.css` / `home.css` / `history.css` / `base.css` 里仍有 31 处
`padding-left` 这类物理属性。真要上 ar/he/ur,先把它们换成逻辑属性,再谈翻译。

---

## 代码规范

- **注释与代码内字符串一律英文**:主体语言是英文,包括行内注释、JSDoc、`it()` /
Expand Down
Loading
Loading