website: add zh_CN translation (#88)
* website: bump vitepress to 1.0.0-alpha.38 * i18n: add zh-CN translation
This commit is contained in:
55
website/docs/.vitepress/locales/en.ts
Normal file
55
website/docs/.vitepress/locales/en.ts
Normal file
@@ -0,0 +1,55 @@
|
||||
import { createRequire } from 'module'
|
||||
import { defineConfig } from 'vitepress'
|
||||
|
||||
const require = createRequire(import.meta.url)
|
||||
const pkg = require('vitepress/package.json')
|
||||
|
||||
export default defineConfig({
|
||||
lang: 'en-US',
|
||||
description: 'A kernel-based root solution for Android GKI devices.',
|
||||
|
||||
themeConfig: {
|
||||
nav: nav(),
|
||||
|
||||
lastUpdatedText: 'last Updated',
|
||||
|
||||
sidebar: {
|
||||
'/guide/': sidebarGuide()
|
||||
},
|
||||
|
||||
socialLinks: [
|
||||
{ icon: 'github', link: 'https://github.com/tiann/KernelSU' }
|
||||
],
|
||||
|
||||
footer: {
|
||||
message: 'Released under the GPL3 License.',
|
||||
copyright: 'Copyright © 2022-present KernelSU Developers'
|
||||
},
|
||||
|
||||
editLink: {
|
||||
pattern: 'https://github.com/tiann/KernelSU/edit/main/website/docs/:path',
|
||||
text: 'Edit this page on GitHub'
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
function nav() {
|
||||
return [
|
||||
{ text: 'Guide', link: '/guide/what-is-kernelsu' },
|
||||
{ text: 'Github', link: 'https://github.com/tiann/KernelSU' }
|
||||
]
|
||||
}
|
||||
|
||||
function sidebarGuide() {
|
||||
return [
|
||||
{
|
||||
text: 'Guide',
|
||||
items: [
|
||||
{ text: 'What is KernelSU?', link: '/guide/what-is-kernelsu' },
|
||||
{ text: 'Installation', link: '/guide/installation' },
|
||||
{ text: 'How to build?', link: '/guide/how-to-build' },
|
||||
{ text: 'FAQ', link: '/guide/faq' },
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
20
website/docs/.vitepress/locales/index.ts
Normal file
20
website/docs/.vitepress/locales/index.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
import { defineConfig } from 'vitepress'
|
||||
import en from './en'
|
||||
import zh_CN from './zh_CN'
|
||||
|
||||
export default defineConfig({
|
||||
locales: {
|
||||
root: {
|
||||
label: 'English',
|
||||
lang: en.lang,
|
||||
themeConfig: en.themeConfig,
|
||||
description: en.description
|
||||
},
|
||||
zh_CN: {
|
||||
label: '简体中文',
|
||||
lang: zh_CN.lang,
|
||||
themeConfig: zh_CN.themeConfig,
|
||||
description: zh_CN.description
|
||||
}
|
||||
}
|
||||
})
|
||||
55
website/docs/.vitepress/locales/zh_CN.ts
Normal file
55
website/docs/.vitepress/locales/zh_CN.ts
Normal file
@@ -0,0 +1,55 @@
|
||||
import { createRequire } from 'module'
|
||||
import { defineConfig } from 'vitepress'
|
||||
|
||||
const require = createRequire(import.meta.url)
|
||||
const pkg = require('vitepress/package.json')
|
||||
|
||||
export default defineConfig({
|
||||
lang: 'zh-CN',
|
||||
description: '一个基于内核,为安卓 GKI 准备的 root 方案。',
|
||||
|
||||
themeConfig: {
|
||||
nav: nav(),
|
||||
|
||||
lastUpdatedText: '最后更新',
|
||||
|
||||
sidebar: {
|
||||
'/zh_CN/guide/': sidebarGuide()
|
||||
},
|
||||
|
||||
socialLinks: [
|
||||
{ icon: 'github', link: 'https://github.com/tiann/KernelSU' }
|
||||
],
|
||||
|
||||
footer: {
|
||||
message: '在 GPL3 许可证下发布。',
|
||||
copyright: 'Copyright © 2022-现在 KernelSU 开发者'
|
||||
},
|
||||
|
||||
editLink: {
|
||||
pattern: 'https://github.com/tiann/KernelSU/edit/main/website/docs/:path',
|
||||
text: '在 GitHub 中编辑本页'
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
function nav() {
|
||||
return [
|
||||
{ text: '指南', link: '/zh_CN/guide/what-is-kernelsu' },
|
||||
{ text: 'Github', link: 'https://github.com/tiann/KernelSU' }
|
||||
]
|
||||
}
|
||||
|
||||
function sidebarGuide() {
|
||||
return [
|
||||
{
|
||||
text: 'Guide',
|
||||
items: [
|
||||
{ text: '什么是 KernelSU?', link: '/zh_CN/guide/what-is-kernelsu' },
|
||||
{ text: '安装', link: '/zh_CN/guide/installation' },
|
||||
{ text: '如何构建?', link: '/zh_CN/guide/how-to-build' },
|
||||
{ text: '常见问题', link: '/zh_CN/guide/faq' },
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user