mirror of
https://github.com/acepanel/acepanel.github.io.git
synced 2026-02-04 14:07:16 +08:00
l10n: update translations (#6)
* New translations en.ts (Chinese Simplified) [skip ci] Update translations (Chinese Simplified) en.ts * New translations en.ts (Chinese Traditional) [skip ci] Update translations (Chinese Traditional) en.ts * New translations en.ts (Chinese Simplified) [skip ci] Update translations (Chinese Simplified) en.ts * New translations en.ts (Chinese Traditional) [skip ci] Update translations (Chinese Traditional) en.ts * New translations en.ts (Chinese Simplified) [skip ci] Update translations (Chinese Simplified) en.ts * New translations en.ts (Chinese Traditional) [skip ci] Update translations (Chinese Traditional) en.ts * New translations en.ts (Chinese Simplified) [skip ci] Update translations (Chinese Simplified) en.ts * New translations en.ts (Chinese Traditional) [skip ci] Update translations (Chinese Traditional) en.ts * New translations en.ts (Chinese Simplified) [skip ci] Update translations (Chinese Simplified) en.ts * New translations en.ts (Chinese Traditional) [skip ci] Update translations (Chinese Traditional) en.ts * New translations en.ts (Chinese Simplified) [skip ci] Update translations (Chinese Simplified) en.ts
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { type DefaultTheme, defineConfig } from 'vitepress';
|
||||
const locale = "zh_CN";
|
||||
const resp = await (await fetch('https://panel.haozi.net/api/versions')).json();
|
||||
const versions = resp.data.slice(0, 10).map((item: any) => {
|
||||
return item.version;
|
||||
@@ -11,11 +12,11 @@ export const config = defineConfig({
|
||||
nav: nav(),
|
||||
sidebar: [{
|
||||
text: "快速开始",
|
||||
base: "/zh_CN/quickstart",
|
||||
base: locale == 'en' ? '/quickstart' : `/${locale}/quickstart`,
|
||||
items: sidebarQuickstart()
|
||||
}, {
|
||||
text: "进阶指南",
|
||||
base: "/zh_CN/advanced",
|
||||
base: locale == 'en' ? '/advanced' : `/${locale}/advanced`,
|
||||
items: sidebarAdvanced()
|
||||
}, {
|
||||
text: "版本历史",
|
||||
@@ -23,7 +24,7 @@ export const config = defineConfig({
|
||||
items: [...versions.map((version: string) => {
|
||||
return {
|
||||
text: version,
|
||||
link: `/version-${version}`
|
||||
link: locale == 'en' ? `/version-${version}` : `/${locale}/version-${version}`
|
||||
};
|
||||
})]
|
||||
}],
|
||||
@@ -61,19 +62,19 @@ export const config = defineConfig({
|
||||
function nav(): DefaultTheme.NavItem[] {
|
||||
return [{
|
||||
text: "首页",
|
||||
link: "/zh_CN/"
|
||||
link: locale == 'en' ? '/' : `/${locale}/`
|
||||
}, {
|
||||
text: "文档",
|
||||
link: "/zh_CN/quickstart/install"
|
||||
link: locale == 'en' ? '/quickstart/install' : `/${locale}/quickstart/install`
|
||||
}, {
|
||||
text: "支持",
|
||||
link: "/zh_CN/support"
|
||||
link: locale == 'en' ? '/support' : `/${locale}/support`
|
||||
}, {
|
||||
text: "🔥证书",
|
||||
link: "/zh_CN/cert"
|
||||
link: locale == 'en' ? '/cert' : `/${locale}/cert`
|
||||
}, {
|
||||
text: "关于",
|
||||
link: "/zh_CN/about"
|
||||
link: locale == 'en' ? '/about' : `/${locale}/about`
|
||||
}];
|
||||
}
|
||||
function sidebarQuickstart(): DefaultTheme.SidebarItem[] {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { type DefaultTheme, defineConfig } from 'vitepress';
|
||||
const locale = 'en';
|
||||
const resp = await (await fetch('https://panel.haozi.net/api/versions')).json();
|
||||
const versions = resp.data.slice(0, 10).map((item: any) => {
|
||||
return item.version;
|
||||
@@ -11,11 +12,11 @@ export const config = defineConfig({
|
||||
nav: nav(),
|
||||
sidebar: [{
|
||||
text: "Quickstart",
|
||||
base: '/quickstart',
|
||||
base: locale == 'en' ? '/quickstart' : `/${locale}/quickstart`,
|
||||
items: sidebarQuickstart()
|
||||
}, {
|
||||
text: "Advanced",
|
||||
base: '/advanced',
|
||||
base: locale == 'en' ? '/advanced' : `/${locale}/advanced`,
|
||||
items: sidebarAdvanced()
|
||||
}, {
|
||||
text: "Versions",
|
||||
@@ -23,7 +24,7 @@ export const config = defineConfig({
|
||||
items: [...versions.map((version: string) => {
|
||||
return {
|
||||
text: version,
|
||||
link: `/version-${version}`
|
||||
link: locale == 'en' ? `/version-${version}` : `/${locale}/version-${version}`
|
||||
};
|
||||
})]
|
||||
}],
|
||||
@@ -61,19 +62,19 @@ export const config = defineConfig({
|
||||
function nav(): DefaultTheme.NavItem[] {
|
||||
return [{
|
||||
text: 'Home',
|
||||
link: '/'
|
||||
link: locale == 'en' ? '/' : `/${locale}/`
|
||||
}, {
|
||||
text: 'Document',
|
||||
link: '/quickstart/install'
|
||||
link: locale == 'en' ? '/quickstart/install' : `/${locale}/quickstart/install`
|
||||
}, {
|
||||
text: 'Support',
|
||||
link: '/support'
|
||||
link: locale == 'en' ? '/support' : `/${locale}/support`
|
||||
}, {
|
||||
text: "🔥證書",
|
||||
link: '/cert'
|
||||
link: locale == 'en' ? '/cert' : `/${locale}/cert`
|
||||
}, {
|
||||
text: 'About',
|
||||
link: '/about'
|
||||
link: locale == 'en' ? '/about' : `/${locale}/about`
|
||||
}];
|
||||
}
|
||||
function sidebarQuickstart(): DefaultTheme.SidebarItem[] {
|
||||
|
||||
Reference in New Issue
Block a user