Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
ff090e7
Update docusaurus.config.js
McGuffinCN Aug 18, 2025
66ab035
Update docusaurus.config.js
McGuffinCN Aug 18, 2025
e6e0d5c
Create test
McGuffinCN Aug 18, 2025
ec7b33a
Add files via upload
McGuffinCN Aug 18, 2025
80006e3
Add files via upload
McGuffinCN Aug 18, 2025
59ffd2c
Delete i18n/zh/docusaurus-plugin-content-docs/current/test
McGuffinCN Aug 18, 2025
9488044
Add files via upload
McGuffinCN Aug 18, 2025
ef87931
Delete i18n/zh/docusaurus-plugin-content-pages directory
McGuffinCN Aug 18, 2025
f9869dd
docs(i18n): add Chinese translations for <模块/页面>
McGuffinCN Aug 18, 2025
c077eb1
docs(i18n): add Chinese translations for rgb-leds.mdx
McGuffinCN Aug 18, 2025
e265a12
fix(i18n): update Chinese translations for clarity and consistency ac…
McGuffinCN Aug 19, 2025
bfe6dc4
Update Chinese documentation for GP2040-CE:
McGuffinCN Aug 20, 2025
d059eaf
fix(i18n): 修正使用指南中的输入模式表格标题翻译
McGuffinCN Aug 20, 2025
b246cf4
Changes to be committed:
McGuffinCN Aug 22, 2025
d1406a2
fix: correct terminology and formatting in various documents
McGuffinCN Aug 22, 2025
086dc21
Stop tracking extensions.json
McGuffinCN Aug 23, 2025
ce342c6
fix(i18n): 修正安装指南和介绍文档中的术语和格式
McGuffinCN Aug 23, 2025
7b9e9bb
Delete .vscode directory
McGuffinCN Aug 23, 2025
7f2866e
fix: 使用翻译函数更新控制器标签以支持国际化
McGuffinCN Aug 28, 2025
a5751ad
feat: 使搜索功能 @easyops-cn/docusaurus-search-local 支持多语言
McGuffinCN Aug 28, 2025
cc45127
fix: 更新文档中的术语和格式以提高可读性和一致性
McGuffinCN Aug 29, 2025
dd6423e
i18n翻译质量提升
McGuffinCN Aug 31, 2025
6289018
翻译更新和术语修正:更新多个文档中的中文翻译,确保术语一致性,包括“游戏手柄”改为“游戏控制器”,并修正了一些描述和选项名称。同时,调整了…
McGuffinCN Sep 1, 2025
a918fb0
添加“贡献”分类下页面的翻译
McGuffinCN Sep 11, 2025
2f3fbd1
fix: 修正文档中的标题和描述,确保术语一致性和准确性
McGuffinCN Sep 23, 2025
cab495e
Merge branch 'OpenStickCommunity:main' into i18n-zh-CN
McGuffinCN Sep 30, 2025
b9677e7
fix: update build environment instructions for clarity and accuracy i…
McGuffinCN Sep 30, 2025
ad59aa6
“下载”页面翻译
McGuffinCN Oct 21, 2025
0f3f720
fix: 更新“下载”页面标题为中文,并修复下载链接文本的类型声明
McGuffinCN Oct 21, 2025
d35192f
fix: 更新双重方向输入和主页描述,修正模式名称和SOCD覆盖模式的选项
McGuffinCN Dec 15, 2025
474d359
Merge upstream/main into i18n-zh-CN
McGuffinCN Oct 18, 2026
421cace
同步上游 v0.7.12 文档更新的中文翻译
McGuffinCN Oct 18, 2026
60ddec0
顶部横幅按语言显示,新增中文版本公告
McGuffinCN Oct 18, 2026
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
4 changes: 2 additions & 2 deletions docs/add-ons/socd-selection-slider.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ The pin(s) are now configured on the [GPIO Pin Mapping page](../web-configurator
- [Up Priority SOCD Cleaning](../hotkeys.mdx#socd-up-priority)
- [Neutral SOCD Cleaning](../hotkeys.mdx#socd-neutral)
- [Last Win SOCD Cleaning](../hotkeys.mdx#socd-last-win)
- [First Wins SOCD Cleaning](../hotkeys.mdx#socd-first-wins)
- [First Wins SOCD Cleaning](../hotkeys.mdx#socd-first-win)
- [SOCD Cleaning Off](../hotkeys.mdx#socd-cleaning-off)

:::
Expand All @@ -33,7 +33,7 @@ The pin(s) are now configured on the [GPIO Pin Mapping page](../web-configurator
- [Up Priority](../hotkeys.mdx#socd-up-priority)
- [Neutral](../hotkeys.mdx#socd-neutral)
- [Last Win](../hotkeys.mdx#socd-last-win)
- [First Wins](../hotkeys.mdx#socd-first-wins)
- [First Wins](../hotkeys.mdx#socd-first-win)
- [SOCD Cleaning Off](../hotkeys.mdx#socd-cleaning-off)

## Hardware
Expand Down
2 changes: 1 addition & 1 deletion docs/web-configurator/menu-pages/02-gpio-pin-mapping.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ The following options are available for assignment to each GPIO Pin.
- [Up Priority SOCD Cleaning](../../hotkeys.mdx#socd-up-priority)
- [Neutral SOCD Cleaning](../../hotkeys.mdx#socd-neutral)
- [Last Win SOCD Cleaning](../../hotkeys.mdx#socd-last-win)
- [First Wins SOCD Cleaning](../../hotkeys.mdx#socd-first-wins)
- [First Wins SOCD Cleaning](../../hotkeys.mdx#socd-first-win)
- [SOCD Cleaning Off](../../hotkeys.mdx#socd-cleaning-off)
- [Turbo](../../add-ons/turbo.mdx)
- [Macro](./09-macros.mdx)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ Going from left to right, the display elements are
- `SOCD-U` - [SOCD Up Priority](../../hotkeys.mdx#socd-up-priority)
- `SOCD-N` - [SOCD Neutral](../../hotkeys.mdx#socd-neutral)
- `SOCD-L` - [SOCD Last Win](../../hotkeys.mdx#socd-last-win)
- `SOCD-F` - [SOCD First Wins](../../hotkeys.mdx#socd-first-wins)
- `SOCD-F` - [SOCD First Wins](../../hotkeys.mdx#socd-first-win)
- `SOCD-X` - [SOCD Cleaning Off](../../hotkeys.mdx#socd-cleaning-off)
- [Macros](./09-macros.mdx) - `M` will appear if Macros are enabled and this cannot be disabled.

Expand Down
24 changes: 21 additions & 3 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ const darkCodeTheme = require("prism-react-renderer").themes.dracula;

const releaseVersion = "0.7.12";

const releaseLink = `<a href="https://github.com/OpenStickCommunity/GP2040-CE/releases/tag/v${releaseVersion}" target="_blank">GP2040-CE Releases</a>`;
const announcementContent = {
en: `New Version Available! To get the v${releaseVersion} update, go to ${releaseLink}`,
zh: `新版本已发布!请前往 ${releaseLink} 获取 v${releaseVersion} 更新`,
};

/** @type {import('@docusaurus/types').Config} */
const config = {
title: "GP2040-CE",
Expand All @@ -23,7 +29,7 @@ const config = {

i18n: {
defaultLocale: "en",
locales: ["en"],
locales: ['en', 'zh'],
},
markdown: {
mermaid: true,
Expand Down Expand Up @@ -52,6 +58,7 @@ const config = {
highlightSearchTermsOnTargetPage: true,
docsRouteBasePath: "/",
indexBlog: false,
language: ["en", "zh"],
},
],
"@docusaurus/theme-mermaid",
Expand All @@ -66,7 +73,7 @@ const config = {
},
announcementBar: {
id: "new_release",
content: `New Version Available! To get the v${releaseVersion} update, go to <a href="https://github.com/OpenStickCommunity/GP2040-CE/releases/tag/v${releaseVersion}" target="_blank">GP2040-CE Releases<a/>`,
content: announcementContent.en,
backgroundColor: "#ec008c",
textColor: "#FFFFFF",
isCloseable: true,
Expand Down Expand Up @@ -107,6 +114,10 @@ const config = {
// position: "left",
// dropdownActiveClassDisabled: true,
// },
{
type: 'localeDropdown',
position: 'right',
},
{
"aria-label": "Discord Invite",
className: "navbar-discord-link",
Expand Down Expand Up @@ -180,4 +191,11 @@ const config = {
],
};

module.exports = config;
// Exported as a function: Docusaurus caches this module but re-invokes the function for each
// locale build, after setting DOCUSAURUS_CURRENT_LOCALE, so the banner can be localized.
module.exports = () => {
const locale = process.env.DOCUSAURUS_CURRENT_LOCALE;
config.themeConfig.announcementBar.content =
announcementContent[locale] ?? announcementContent.en;
return config;
};
Loading