Skip to content

Commit

Permalink
✨ 添加日语支持,更新多语言导航和首页链接
Browse files Browse the repository at this point in the history
  • Loading branch information
snowykami committed Dec 15, 2024
1 parent 26fe0e9 commit ebcdffa
Show file tree
Hide file tree
Showing 8 changed files with 75 additions and 7 deletions.
5 changes: 5 additions & 0 deletions docs/.vitepress/config/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ export const en = defineConfig({
prev: 'Prev',
next: 'Next'
},
nav: [
{text: 'Home', link: '/en'},
{text: 'Usage', link: '/en/start/install'},
{text: 'Develop', link: '/en/dev/extension'},
],
langMenuLabel: 'Language',
returnToTopLabel: 'To top',
sidebarMenuLabel: 'Option',
Expand Down
2 changes: 2 additions & 0 deletions docs/.vitepress/config/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { defineConfig } from 'vitepress'
import { zh } from './zh'
import { en } from './en'
import { ja } from './ja'
import { defaultLang, generateSidebarConfig, gitea } from './common'
import { generateSidebar } from 'vitepress-sidebar'

Expand Down Expand Up @@ -33,5 +34,6 @@ export default defineConfig({
locales: {
root: { label: "简体中文", ...zh },
en: { label: "English", ...en },
ja: { label: "日本語", ...ja },
},
})
24 changes: 24 additions & 0 deletions docs/.vitepress/config/ja.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import {defineConfig} from 'vitepress'

export const ja = defineConfig({
lang: "ja-JP",
title: "Marsho AI",
description: "かわいくて、賢くて、拡張しやすい",
themeConfig: {
docFooter: {
prev: '前へ',
next: '次へ'
},
nav: [
{text: 'ホーム', link: '/ja'},
{text: '使用方法', link: '/ja/start/install'},
{text: '開発', link: '/ja/dev/extension'},
],
langMenuLabel: '言語',
returnToTopLabel: 'トップへ戻る',
sidebarMenuLabel: 'オプション',
darkModeSwitchLabel: 'テーマ',
lightModeSwitchTitle: 'ライト',
darkModeSwitchTitle: 'ダーク',
},
})
9 changes: 9 additions & 0 deletions docs/.vitepress/config/zh.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,20 @@ export const zh = defineConfig({
prev: '上一页',
next: '下一页'
},
nav: [
{text: '家', link: '/'},
{text: '使用', link: '/start/install'},
{text: '开发', link: '/dev/extension'},
],
langMenuLabel: '语言',
returnToTopLabel: '返回顶部',
sidebarMenuLabel: '菜单',
darkModeSwitchLabel: '主题',
lightModeSwitchTitle: '轻色模式',
darkModeSwitchTitle: '深色模式',
footer: {
message: "文档完善中,欢迎提出建议或帮助我们完善。",
copyright: '© 2024 <a href="https://liteyuki.icu" target="_blank">Liteyuki Studio</a>',
}
},
})
8 changes: 4 additions & 4 deletions docs/en/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ hero:
actions:
- theme: brand
text: Start
link: /start
link: /en/start/install/
- theme: alt
text: Develop & Extened
link: /dev
link: /en/dev/extension/
image:
light: ./marsho-full.svg
dark: ./marsho-full.svg
light: /marsho-full.svg
dark: /marsho-full.svg
alt: Marsho Logo

features:
Expand Down
28 changes: 28 additions & 0 deletions docs/ja/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
# https://vitepress.dev/reference/default-theme-home-page
layout: home

hero:
name: "小綿智能"
text: "猫娘ロボット"
tagline: かわいくて、賢くて、拡張可能なAIサービスプラグイン
actions:
- theme: brand
text: 始める
link: /ja/start/install/
- theme: alt
text: 開発と拡張
link: /ja/dev/extension/
image:
light: /marsho-full.svg
dark: /marsho-full.svg
alt: Marshoロゴ

features:
- title: 強力なドライバー
details: NoneBot2に基づいており、既存のNoneBot2またはLiteyukiインスタンスに迅速にインストールできます
- title: インターフェース規格
details: どんなオープンAI標準に従うインターフェースでも小綿智能と対話できます
- title: 簡単に拡張
details: Pythonでツールやプラグインを作成し、関数呼び出しを実現し、小綿智能の機能を簡単に拡張できます
---
2 changes: 1 addition & 1 deletion docs/zh/dev/extension.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def execute_command(command: str) -> str:

## 依赖注入

function call支持NoneBot2原生的会话上下文依赖注入,例如Bot、Event等,只需要在函数的参数中声明即可,无需在装饰器中声明。
function call支持NoneBot2原生的会话上下文依赖注入,例如Bot、Event等

```python
@on_function_call(description="获取个人信息")
Expand Down
4 changes: 2 additions & 2 deletions docs/zh/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ hero:
text: 开发及扩展
link: /dev/extension/
image:
light: ./marsho-full.svg
dark: ./marsho-full.svg
light: /marsho-full.svg
dark: /marsho-full.svg
alt: Marsho Logo

features:
Expand Down

0 comments on commit ebcdffa

Please sign in to comment.