Files
antd-admin/apps/docs/content/zh/templates/with-lingui.mdx
zuiideaandCursor b8bb7713b3 docs: align site with modular src/api layout
Document API_PREFIX, folder structure, templates, and E2E script usage in en/zh.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-18 21:17:47 +08:00

37 lines
1.3 KiB
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
title: With Lingui 模板
description: apps/with-lingui — 中英双语与 Lingui 工作流
---
# With Lingui 模板
路径:**[`apps/with-lingui`](https://github.com/zuiidea/antd-admin/tree/master/apps/with-lingui)**。
## 定位
在 Basic 能力集之上提供 **LinguiJS** 中英双语文案、**Ant Design locale** 与语言设置联动,以及 **`.po` 抽取/编译** 流程。为仓库中更完整的一号模板(`package.json` 的 `name` 为 `antd-admin`)。
## 技术栈补充
在 Basic 技术栈基础上增加 Lingui 6;**`src/api/` 目录与 Basic 同构**(`shared/`、`auth/`、`users/`)。`src/locales/{en,zh}/messages.po` 为翻译源;`lingui.config.ts` 与 Vite 插件见应用内配置。
## 国际化命令
| 命令 | 作用 |
|------|------|
| `pnpm run i18n:extract` | 从源码抽取可翻译字符串 |
| `pnpm run i18n:compile` | 编译为运行时可加载的 message |
| `pnpm run i18n:check` | 抽取后检查工作区无未提交变更(适合 CI) |
## 常用命令
```bash
cd apps/with-lingui
vp install
vp dev
```
## 权威文档
完整技术栈表、功能列表、目录树、E2E 子集说明、以及 **AI 指引(`AGENTS.md`)** 以 **[apps/with-lingui/README.md](https://github.com/zuiidea/antd-admin/blob/master/apps/with-lingui/README.md)** 为准。