You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by sh...@apache.org on 2021/07/21 08:32:57 UTC
[echarts-handbook] branch master updated: fix locale
This is an automated email from the ASF dual-hosted git repository.
shenyi pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/echarts-handbook.git
The following commit(s) were added to refs/heads/master by this push:
new 89d546c fix locale
89d546c is described below
commit 89d546cc9043effa5996c4bb2be03598834a1153
Author: pissang <bm...@gmail.com>
AuthorDate: Wed Jul 21 16:32:34 2021 +0800
fix locale
---
contents/en/posts.yml | 10 +++++-----
pages/en/_.vue | 5 +++++
pages/zh/_.vue | 3 +++
store/index.js | 2 +-
4 files changed, 14 insertions(+), 6 deletions(-)
diff --git a/contents/en/posts.yml b/contents/en/posts.yml
index 35cf92d..6748198 100644
--- a/contents/en/posts.yml
+++ b/contents/en/posts.yml
@@ -130,18 +130,18 @@
- title: Connect
dir: connect
draft: true
-- title: 最佳实践
+- title: Best Practice
dir: best-practice
children:
- - title: 移动端优化
+ - title: Mobile Optimization
dir: mobile
draft: true
- title: Canvas vs. SVG
dir: canvas-vs-svg
- - title: 无障碍访问
+ - title: Aria
dir: aria
-- title: 编辑本文档
+- title: Edit Handbook
dir: meta
children:
- - title: 文档编辑指南
+ - title: Edit Guide
dir: get-started
diff --git a/pages/en/_.vue b/pages/en/_.vue
index 89111d0..929d113 100644
--- a/pages/en/_.vue
+++ b/pages/en/_.vue
@@ -23,11 +23,16 @@
import '~/components/markdown/global'
import Contributors from '~/components/partials/Contributors.vue'
+// import { mutations } from '~/store'
+// mutations.setLocale('en')
export default {
components: {
Contributors
},
+ mounted() {
+ this.$store.commit('setLocale', 'en')
+ },
async asyncData({ $content, params }) {
const postPath = `en/${params.pathMatch}`
const article = await $content(postPath).fetch()
diff --git a/pages/zh/_.vue b/pages/zh/_.vue
index c7b5e1e..05d5f27 100644
--- a/pages/zh/_.vue
+++ b/pages/zh/_.vue
@@ -28,6 +28,9 @@ export default {
components: {
Contributors
},
+ mounted() {
+ this.$store.commit('setLocale', 'zh')
+ },
async asyncData({ $content, params }) {
const postPath = `zh/${params.pathMatch}`
const article = await $content(postPath).fetch()
diff --git a/store/index.js b/store/index.js
index 09d2d4a..970d4f0 100644
--- a/store/index.js
+++ b/store/index.js
@@ -7,7 +7,7 @@ export const state = () => ({
docVersion: '',
ghVersion: '',
visibleAffix: false,
- locale: 'zh',
+ locale: 'en',
lang: {},
menu: {},
homepage: {},
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org