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/28 10:34:21 UTC

[echarts-handbook] branch master updated: add changelang

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 f5caa84  add changelang
f5caa84 is described below

commit f5caa84dbea638778aabb53b855690ed393bfdfe
Author: pissang <bm...@gmail.com>
AuthorDate: Wed Jul 28 18:34:10 2021 +0800

    add changelang
---
 components/partials/Navbar.vue | 10 ++++++++++
 contents/en/concepts/axis.md   |  2 +-
 2 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/components/partials/Navbar.vue b/components/partials/Navbar.vue
index 1e4dd23..bbb8a33 100644
--- a/components/partials/Navbar.vue
+++ b/components/partials/Navbar.vue
@@ -9,6 +9,16 @@ import enNav from './Navbar/en.vue'
 
 export default Vue.extend({
   components: {},
+  mounted() {
+    const locale = (this as any).$i18n.locale
+      // TODO
+    ;(window as any).changeLang = () => {
+      window.location.href = window.location.href.replace(
+        `/${locale}/`,
+        locale === 'zh' ? '/en/' : '/zh/'
+      )
+    }
+  },
   computed: {
     navComponent() {
       return (this as any).$i18n.locale === 'zh' ? zhNav : enNav
diff --git a/contents/en/concepts/axis.md b/contents/en/concepts/axis.md
index c69ec1b..fdaaca5 100644
--- a/contents/en/concepts/axis.md
+++ b/contents/en/concepts/axis.md
@@ -4,7 +4,7 @@ The x/y-axis in the Cartesian coordinate system.
 
 ## x-axis, y-axis
 
-1. Both x-axis and y-axis included axis line, tick, label and title. Some chart will use the grid to assist the data viewing and calculating.
+Both x-axis and y-axis included axis line, tick, label and title. Some chart will use the grid to assist the data viewing and calculating.
 
 <img max-width="830" width="100%" height="100%"
 src="/images/design/axis/charts_axis_img02.jpg">

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org