Skip to content

Commit

Permalink
docs(zh): Init the Chinese translation and import existing files from…
Browse files Browse the repository at this point in the history
… a legacy repo (#19)

* translation: start the zh version from legacy repo (docs-next-zh-cn)

* translation: init locales config and create missing md file

* translation: add todos

* translation: add Overview content

* translation: add New Framework-level Recommendations about Build Toolchain

* translation: add New Framework-level Recommendations about Vue Router

* translation: add New Framework-level Recommendations about State Management

* translation: add how to use the Vuex 4.0 to support Vue3

* translation: add New Framework-level Recommendations about IDE Support and DevTools

* translation: add New Framework-level Recommendations about Typescript Static Site Generator and JSX

* translation: add some warnings for unfinished Chinese docs

* translation: update vue-tsc link

* translation: update vue-tsc link

* fix: VNode Lifecycle Event

* update jsx repo

* Expose configureCompat types

* update vue-router vuex url

* translation: add Breaking Changes about Global API and Template Directives

* translation: add Breaking Changes about Components

* translation: update dead links end components

* translation: Breaking Changes

* translation: update all dead links

* translation: update zh index links

* translation: update migration-badges component

* translation: update vue-tsc link

* translation: update vue-tsc link

* translation: update dead links end components

* fix: VNode Lifecycle Event

* update jsx repo

* Expose configureCompat types

* update vue-router vuex url

* translation: add Breaking Changes about Global API and Template Directives

* translation: add Breaking Changes about Components

* translation: update migration-badges component

* translation: Breaking Changes

* translation: update all dead links

* translation: update zh index links

* translation: reset en md

* translation: reset en md

* translation: updated relative link

* translation: updated badges locales

* translation: fix broken links in zh

* docs(zh): avoid internal weak map key error

Co-authored-by: zhousg <[email protected]>
Co-authored-by: chaichai-fe <[email protected]>
Co-authored-by: SuJiehao <[email protected]>
  • Loading branch information
4 people authored Nov 6, 2022
1 parent f5bb339 commit c136001
Show file tree
Hide file tree
Showing 45 changed files with 4,343 additions and 155 deletions.
164 changes: 14 additions & 150 deletions .vitepress/config.js
Original file line number Diff line number Diff line change
@@ -1,156 +1,20 @@
import locales from "./locales"

/**
* @type {import('vitepress').UserConfig}
*/
export default {
title: 'Vue 3 Migration Guide',
description: 'Guide on migrating from Vue 2 to Vue 3',
srcDir: 'src',
locales: locales.vitepressConfig,


themeConfig: {
nav: [{ text: 'Vue 3 Docs', link: 'https://vuejs.org' }],

sidebar: [
{
text: 'Guide',
items: [
{ text: 'Overview', link: '/' },
{ text: 'New Recommendations', link: '/recommendations' },
{ text: 'Migration Build', link: '/migration-build' },
{
text: 'Breaking Changes',
link: '/breaking-changes/'
}
]
},
{
text: 'Global API',
items: [
{
text: 'Global API Application Instance',
link: '/breaking-changes/global-api'
},
{
text: 'Global API Treeshaking',
link: '/breaking-changes/global-api-treeshaking'
}
]
},
{
text: 'Template Directives',
items: [
{ text: 'v-model', link: '/breaking-changes/v-model' },
{
text: 'key Usage Change',
link: '/breaking-changes/key-attribute'
},
{
text: 'v-if vs. v-for Precedence',
link: '/breaking-changes/v-if-v-for'
},
{ text: 'v-bind Merge Behavior', link: '/breaking-changes/v-bind' },
{
text: 'v-on.native modifier removed',
link: '/breaking-changes/v-on-native-modifier-removed'
}
]
},
{
text: 'Components',
items: [
{
text: 'Functional Components',
link: '/breaking-changes/functional-components'
},
{
text: 'Async Components',
link: '/breaking-changes/async-components'
},
{ text: 'emits Option', link: '/breaking-changes/emits-option' }
]
},
{
text: 'Render Function',
items: [
{
text: 'Render Function API',
link: '/breaking-changes/render-function-api'
},
{
text: 'Slots Unification',
link: '/breaking-changes/slots-unification'
},
{
text: '$listeners merged into $attrs',
link: '/breaking-changes/listeners-removed'
},
{
text: '$attrs includes class & style',
link: '/breaking-changes/attrs-includes-class-style'
}
]
},
{
text: 'Custom Elements',
items: [
{
text: 'Custom Elements Interop Changes',
link: '/breaking-changes/custom-elements-interop'
}
]
},
{
text: 'Removed APIs',
items: [
{
text: 'v-on keyCode Modifiers',
link: '/breaking-changes/keycode-modifiers'
},
{ text: 'Events API', link: '/breaking-changes/events-api' },
{ text: 'Filters', link: '/breaking-changes/filters' },
{
text: 'inline-template',
link: '/breaking-changes/inline-template-attribute'
},
{ text: '$children', link: '/breaking-changes/children' },
{ text: 'propsData option', link: '/breaking-changes/props-data' }
]
},
{
text: 'Other Minor Changes',
items: [
{
text: 'Attribute Coercion Behavior',
link: '/breaking-changes/attribute-coercion'
},
{
text: 'Custom Directives',
link: '/breaking-changes/custom-directives'
},
{ text: 'Data Option', link: '/breaking-changes/data-option' },
{
text: 'Mount API changes',
link: '/breaking-changes/mount-changes'
},
{
text: 'Props Default Function this Access',
link: '/breaking-changes/props-default-this'
},
{
text: 'Transition Class Change',
link: '/breaking-changes/transition'
},
{
text: 'Transition as Root',
link: '/breaking-changes/transition-as-root'
},
{
text: 'Transition Group Root Element',
link: '/breaking-changes/transition-group'
},
{
text: 'VNode lifecycle events',
link: '/breaking-changes/vnode-lifecycle-events'
},
{ text: 'Watch on Arrays', link: '/breaking-changes/watch' }
]
}
]
localeLinks: {
items: [
{text: 'English', link: '/'},
{text: '中文简体 (未完成)', link: '/zh/'}
]
},
locales: locales.themeConfig
}
}
159 changes: 159 additions & 0 deletions .vitepress/locales/en.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,159 @@
export default {
vitepressConfig: {
title: 'Vue 3 Migration Guide',
description: 'Guide on migrating from Vue 2 to Vue 3',
lang: 'en-US'
},
themeConfig: {
nav: [
{ text: 'Vue 3 Docs', link: 'https://vuejs.org' },
],

sidebar: [
{
text: 'Guide',
items: [
{ text: 'Overview', link: '/' },
{ text: 'New Recommendations', link: '/recommendations' },
{ text: 'Migration Build', link: '/migration-build' },
{
text: 'Breaking Changes',
link: '/breaking-changes/'
}
]
},
{
text: 'Global API',
items: [
{
text: 'Global API Application Instance',
link: '/breaking-changes/global-api'
},
{
text: 'Global API Treeshaking',
link: '/breaking-changes/global-api-treeshaking'
}
]
},
{
text: 'Template Directives',
items: [
{ text: 'v-model', link: '/breaking-changes/v-model' },
{
text: 'key Usage Change',
link: '/breaking-changes/key-attribute'
},
{
text: 'v-if vs. v-for Precedence',
link: '/breaking-changes/v-if-v-for'
},
{ text: 'v-bind Merge Behavior', link: '/breaking-changes/v-bind' },
{
text: 'v-on.native modifier removed',
link: '/breaking-changes/v-on-native-modifier-removed'
}
]
},
{
text: 'Components',
items: [
{
text: 'Functional Components',
link: '/breaking-changes/functional-components'
},
{
text: 'Async Components',
link: '/breaking-changes/async-components'
},
{ text: 'emits Option', link: '/breaking-changes/emits-option' }
]
},
{
text: 'Render Function',
items: [
{
text: 'Render Function API',
link: '/breaking-changes/render-function-api'
},
{
text: 'Slots Unification',
link: '/breaking-changes/slots-unification'
},
{
text: '$listeners merged into $attrs',
link: '/breaking-changes/listeners-removed'
},
{
text: '$attrs includes class & style',
link: '/breaking-changes/attrs-includes-class-style'
}
]
},
{
text: 'Custom Elements',
items: [
{
text: 'Custom Elements Interop Changes',
link: '/breaking-changes/custom-elements-interop'
}
]
},
{
text: 'Removed APIs',
items: [
{
text: 'v-on keyCode Modifiers',
link: '/breaking-changes/keycode-modifiers'
},
{ text: 'Events API', link: '/breaking-changes/events-api' },
{ text: 'Filters', link: '/breaking-changes/filters' },
{
text: 'inline-template',
link: '/breaking-changes/inline-template-attribute'
},
{ text: '$children', link: '/breaking-changes/children' },
{ text: 'propsData option', link: '/breaking-changes/props-data' }
]
},
{
text: 'Other Minor Changes',
items: [
{
text: 'Attribute Coercion Behavior',
link: '/breaking-changes/attribute-coercion'
},
{
text: 'Custom Directives',
link: '/breaking-changes/custom-directives'
},
{ text: 'Data Option', link: '/breaking-changes/data-option' },
{
text: 'Mount API changes',
link: '/breaking-changes/mount-changes'
},
{
text: 'Props Default Function this Access',
link: '/breaking-changes/props-default-this'
},
{
text: 'Transition Class Change',
link: '/breaking-changes/transition'
},
{
text: 'Transition as Root',
link: '/breaking-changes/transition-as-root'
},
{
text: 'Transition Group Root Element',
link: '/breaking-changes/transition-group'
},
{
text: 'VNode lifecycle events',
link: '/breaking-changes/vnode-lifecycle-events'
},
{ text: 'Watch on Arrays', link: '/breaking-changes/watch' }
]
}
]
}
}
13 changes: 13 additions & 0 deletions .vitepress/locales/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import en from './en'
import zh from './zh'

export default {
vitepressConfig: {
'/': en.vitepressConfig,
'/zh/': zh.vitepressConfig
},
themeConfig: {
'/': en.themeConfig,
'/zh/': zh.themeConfig
}
}
Loading

0 comments on commit c136001

Please sign in to comment.