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:28:14 UTC

[echarts-handbook] branch master updated: fix some routing issue with i18n

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 86044aa  fix some routing issue with i18n
86044aa is described below

commit 86044aaa2f48491475769198a5957b84700f9e18
Author: pissang <bm...@gmail.com>
AuthorDate: Wed Jul 28 18:28:00 2021 +0800

    fix some routing issue with i18n
---
 nuxt.config.js  | 10 +++++++---
 pages/_.vue     |  2 +-
 pages/index.vue | 15 ---------------
 3 files changed, 8 insertions(+), 19 deletions(-)

diff --git a/nuxt.config.js b/nuxt.config.js
index eea5a22..6f33315 100644
--- a/nuxt.config.js
+++ b/nuxt.config.js
@@ -139,13 +139,17 @@ export default {
       'nuxt-i18n',
       {
         locales: ['en', 'zh'],
-        strategy: 'prefix_except_default',
+        strategy: 'prefix',
         defaultLocale: 'en',
         vueI18n: {
           fallbackLocale: 'en',
           messages: {
-            en: {},
-            zh: {}
+            en: {
+              inThisPage: 'In This Page'
+            },
+            zh: {
+              inThisPage: '本页目录'
+            }
           }
         }
       }
diff --git a/pages/_.vue b/pages/_.vue
index d2bff15..4ea863f 100644
--- a/pages/_.vue
+++ b/pages/_.vue
@@ -3,7 +3,7 @@
     <div class="post-inner">
       <nuxt-content :document="article" />
       <div class="table-of-contents">
-        <h4 class="toc-container-header">本页目录</h4>
+        <h4 class="toc-container-header">{{ $t('inThisPage') }}</h4>
         <ul>
           <li
             v-for="link of article.toc"
diff --git a/pages/index.vue b/pages/index.vue
deleted file mode 100644
index 2fe85c8..0000000
--- a/pages/index.vue
+++ /dev/null
@@ -1,15 +0,0 @@
-<template>
-  <div>
-    <!-- These two links are for generate.crawler -->
-    <nuxt-link to="zh/get-started">中文</nuxt-link>
-    <nuxt-link to="en/get-started">English</nuxt-link>
-  </div>
-</template>
-
-<script lang="ts">
-export default {
-  async asyncData() {}
-}
-</script>
-
-<style></style>

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