Skip to content

Commit

Permalink
fix(theme-press): i18n menu
Browse files Browse the repository at this point in the history
  • Loading branch information
YunYouJun committed Oct 4, 2023
1 parent 0862c12 commit b09dd4c
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 29 deletions.
11 changes: 6 additions & 5 deletions docs/locales/en.yml
@@ -1,11 +1,7 @@
gallery:
tip: search

button:
get-started: Get Started
view-github: View Github

menu:
nav:
guide: Guide
theme: Themes
addon: Addons
Expand Down Expand Up @@ -38,3 +34,8 @@ banner:
static: Static
blog: Blog
framework: Framework

hero:
actions:
get-started: Get Started
view-github: View Github
11 changes: 6 additions & 5 deletions docs/locales/zh-CN.yml
@@ -1,11 +1,7 @@
gallery:
tip: 搜索

button:
get-started: 快速上手
view-github: 查看 Github

menu:
nav:
guide: 指南
theme: 主题
addon: 插件
Expand Down Expand Up @@ -38,3 +34,8 @@ banner:
static: 静态
blog: 博客
framework: 框架

hero:
actions:
get-started: 快速上手
view-github: 查看 Github
6 changes: 3 additions & 3 deletions docs/package.json
Expand Up @@ -9,9 +9,9 @@
"dev": "nodemon -w \"../packages/valaxy/dist/*.mjs\" --exec \"valaxy .\"",
"rss": "valaxy rss",
"serve": "vite preview",
"docs:dev": "vitepress dev",
"docs:build": "vitepress build",
"docs:preview": "vitepress preview"
"vitepress:dev": "vitepress dev",
"vitepress:build": "vitepress build",
"vitepress:preview": "vitepress preview"
},
"dependencies": {
"valaxy": "link:../packages/valaxy",
Expand Down
4 changes: 2 additions & 2 deletions docs/pages/index.md
Expand Up @@ -9,10 +9,10 @@ hero:
tagline: Simple, powerful, and performant. Meet the modern BLOG framework you've always wanted.
actions:
- theme: brand
text: button.get-started
text: hero.actions.get-started
link: /guide/getting-started
- theme: alt
text: button.view-github
text: hero.actions.view-github
link: https://github.com/YunYouJun/valaxy

# todo, rewrite with valaxy
Expand Down
24 changes: 12 additions & 12 deletions docs/valaxy.config.ts
Expand Up @@ -41,52 +41,52 @@ export default defineValaxyConfig<PressTheme.Config>({
],
nav: [
{
text: 'menu.guide',
text: 'nav.guide',
items: [
{
text: 'menu.getting-started',
text: 'nav.getting-started',
link: '/guide/getting-started',
},
{
text: 'menu.migrate-from-other',
text: 'nav.migrate-from-other',
link: '/migration/',
},
],
},
{
text: 'menu.theme',
text: 'nav.theme',
items: [
{
text: 'menu.use-a-theme',
text: 'nav.use-a-theme',
link: '/themes/use',
},
{
text: 'menu.write-a-theme',
text: 'nav.write-a-theme',
link: '/themes/write',
},
{
text: 'menu.themes-gallery',
text: 'nav.themes-gallery',
link: '/themes/gallery',
},
],
},
{
text: 'menu.addon',
text: 'nav.addon',
items: [
{
text: 'menu.why-need-addons',
text: 'nav.why-need-addons',
link: '/addons',
},
{
text: 'menu.use-an-addon',
text: 'nav.use-an-addon',
link: '/addons/use',
},
{
text: 'menu.write-an-addon',
text: 'nav.write-an-addon',
link: '/addons/write',
},
{
text: 'menu.addons-gallery',
text: 'nav.addons-gallery',
link: '/addons/gallery',
},
],
Expand Down
4 changes: 2 additions & 2 deletions package.json
Expand Up @@ -33,8 +33,8 @@
"dev:lib": "pnpm -C packages/valaxy run dev",
"dev": "pnpm -r --filter=./packages/** --parallel run dev",
"docs": "pnpm -C docs run dev",
"docs:dev": "pnpm -C docs run docs:dev",
"docs:build": "pnpm -C docs run docs:build",
"docs:dev": "pnpm -C docs run dev",
"docs:vitepress": "pnpm -C docs run vitepress:dev",
"lint": "eslint .",
"prepublishOnly": "npm run build",
"release": "tsx scripts/release.ts",
Expand Down

0 comments on commit b09dd4c

Please sign in to comment.