Skip to content

Commit

Permalink
config + links
Browse files Browse the repository at this point in the history
  • Loading branch information
jay-es committed Mar 12, 2023
1 parent f3ff05d commit 3fcfc14
Show file tree
Hide file tree
Showing 24 changed files with 93 additions and 84 deletions.
5 changes: 3 additions & 2 deletions .vitepress/config.js
Expand Up @@ -6,13 +6,14 @@ import locales from "./locales"
export default {
srcDir: 'src',
locales: locales.vitepressConfig,


themeConfig: {
localeLinks: {
items: [
{text: 'English', link: '/'},
{text: '中文简体 (未完成)', link: '/zh/'}
{text: '中文简体 (未完成)', link: '/zh/'},
{text: '日本語(未完成)', link: '/ja/'},
]
},
locales: locales.themeConfig
Expand Down
9 changes: 6 additions & 3 deletions .vitepress/locales/index.js
@@ -1,13 +1,16 @@
import en from './en'
import zh from './zh'
import ja from './ja'

export default {
vitepressConfig: {
'/': en.vitepressConfig,
'/zh/': zh.vitepressConfig
'/zh/': zh.vitepressConfig,
'/ja/': ja.vitepressConfig,
},
themeConfig: {
'/': en.themeConfig,
'/zh/': zh.themeConfig
'/zh/': zh.themeConfig,
'/ja/': ja.themeConfig,
}
}
}
83 changes: 44 additions & 39 deletions .vitepress/locales/ja.js
@@ -1,24 +1,29 @@
export default {
vitepressConfig: {
title: 'Vue 3 Migration Guide',
description: 'Guide on migrating from Vue 2 to Vue 3',
lang: 'en-US'
title: 'Vue 3 移行ガイド',
description: 'Vue 2 から Vue 3 への移行に関するガイド',
lang: 'ja-JP',
},
themeConfig: {
docFooter: {
prev: '前のページ',
next: '次のページ',
},
outlineTitle: 'ページの内容',
nav: [
{ text: 'Vue 3 Docs', link: 'https://vuejs.org' },
{ text: 'Vue 3 ドキュメント', link: 'https://ja.vuejs.org' },
],

sidebar: [
{
text: 'Guide',
items: [
{ text: 'Overview', link: '/' },
{ text: 'New Recommendations', link: '/recommendations' },
{ text: 'Migration Build', link: '/migration-build' },
{ text: 'Overview', link: '/ja/' },
{ text: 'New Recommendations', link: '/ja/recommendations' },
{ text: 'Migration Build', link: '/ja/migration-build' },
{
text: 'Breaking Changes',
link: '/breaking-changes/'
link: '/ja/breaking-changes/'
}
]
},
Expand All @@ -27,30 +32,30 @@ export default {
items: [
{
text: 'Global API Application Instance',
link: '/breaking-changes/global-api'
link: '/ja/breaking-changes/global-api'
},
{
text: 'Global API Treeshaking',
link: '/breaking-changes/global-api-treeshaking'
link: '/ja/breaking-changes/global-api-treeshaking'
}
]
},
{
text: 'Template Directives',
items: [
{ text: 'v-model', link: '/breaking-changes/v-model' },
{ text: 'v-model', link: '/ja/breaking-changes/v-model' },
{
text: 'key Usage Change',
link: '/breaking-changes/key-attribute'
link: '/ja/breaking-changes/key-attribute'
},
{
text: 'v-if vs. v-for Precedence',
link: '/breaking-changes/v-if-v-for'
link: '/ja/breaking-changes/v-if-v-for'
},
{ text: 'v-bind Merge Behavior', link: '/breaking-changes/v-bind' },
{ text: 'v-bind Merge Behavior', link: '/ja/breaking-changes/v-bind' },
{
text: 'v-on.native modifier removed',
link: '/breaking-changes/v-on-native-modifier-removed'
link: '/ja/breaking-changes/v-on-native-modifier-removed'
}
]
},
Expand All @@ -59,33 +64,33 @@ export default {
items: [
{
text: 'Functional Components',
link: '/breaking-changes/functional-components'
link: '/ja/breaking-changes/functional-components'
},
{
text: 'Async Components',
link: '/breaking-changes/async-components'
link: '/ja/breaking-changes/async-components'
},
{ text: 'emits Option', link: '/breaking-changes/emits-option' }
{ text: 'emits Option', link: '/ja/breaking-changes/emits-option' }
]
},
{
text: 'Render Function',
items: [
{
text: 'Render Function API',
link: '/breaking-changes/render-function-api'
link: '/ja/breaking-changes/render-function-api'
},
{
text: 'Slots Unification',
link: '/breaking-changes/slots-unification'
link: '/ja/breaking-changes/slots-unification'
},
{
text: '$listeners merged into $attrs',
link: '/breaking-changes/listeners-removed'
link: '/ja/breaking-changes/listeners-removed'
},
{
text: '$attrs includes class & style',
link: '/breaking-changes/attrs-includes-class-style'
link: '/ja/breaking-changes/attrs-includes-class-style'
}
]
},
Expand All @@ -94,7 +99,7 @@ export default {
items: [
{
text: 'Custom Elements Interop Changes',
link: '/breaking-changes/custom-elements-interop'
link: '/ja/breaking-changes/custom-elements-interop'
}
]
},
Expand All @@ -103,55 +108,55 @@ export default {
items: [
{
text: 'v-on keyCode Modifiers',
link: '/breaking-changes/keycode-modifiers'
link: '/ja/breaking-changes/keycode-modifiers'
},
{ text: 'Events API', link: '/breaking-changes/events-api' },
{ text: 'Filters', link: '/breaking-changes/filters' },
{ text: 'Events API', link: '/ja/breaking-changes/events-api' },
{ text: 'Filters', link: '/ja/breaking-changes/filters' },
{
text: 'inline-template',
link: '/breaking-changes/inline-template-attribute'
link: '/ja/breaking-changes/inline-template-attribute'
},
{ text: '$children', link: '/breaking-changes/children' },
{ text: 'propsData option', link: '/breaking-changes/props-data' }
{ text: '$children', link: '/ja/breaking-changes/children' },
{ text: 'propsData option', link: '/ja/breaking-changes/props-data' }
]
},
{
text: 'Other Minor Changes',
items: [
{
text: 'Attribute Coercion Behavior',
link: '/breaking-changes/attribute-coercion'
link: '/ja/breaking-changes/attribute-coercion'
},
{
text: 'Custom Directives',
link: '/breaking-changes/custom-directives'
link: '/ja/breaking-changes/custom-directives'
},
{ text: 'Data Option', link: '/breaking-changes/data-option' },
{ text: 'Data Option', link: '/ja/breaking-changes/data-option' },
{
text: 'Mount API changes',
link: '/breaking-changes/mount-changes'
link: '/ja/breaking-changes/mount-changes'
},
{
text: 'Props Default Function this Access',
link: '/breaking-changes/props-default-this'
link: '/ja/breaking-changes/props-default-this'
},
{
text: 'Transition Class Change',
link: '/breaking-changes/transition'
link: '/ja/breaking-changes/transition'
},
{
text: 'Transition as Root',
link: '/breaking-changes/transition-as-root'
link: '/ja/breaking-changes/transition-as-root'
},
{
text: 'Transition Group Root Element',
link: '/breaking-changes/transition-group'
link: '/ja/breaking-changes/transition-group'
},
{
text: 'VNode lifecycle events',
link: '/breaking-changes/vnode-lifecycle-events'
link: '/ja/breaking-changes/vnode-lifecycle-events'
},
{ text: 'Watch on Arrays', link: '/breaking-changes/watch' }
{ text: 'Watch on Arrays', link: '/ja/breaking-changes/watch' }
]
}
]
Expand Down
2 changes: 1 addition & 1 deletion src/ja/breaking-changes/async-components.md
Expand Up @@ -94,5 +94,5 @@ const asyncComponent = defineAsyncComponent(

For more information on the usage of async components, see:

- [Guide: Async Components](https://vuejs.org/guide/components/async.html)
- [Guide: Async Components](https://ja.vuejs.org/guide/components/async.html)
- [Migration build flag: `COMPONENT_ASYNC`](../migration-build.html#compat-configuration)
2 changes: 1 addition & 1 deletion src/ja/breaking-changes/children.md
Expand Up @@ -37,7 +37,7 @@ export default {

## 3.x Update

In 3.x, the `$children` property is removed and no longer supported. Instead, if you need to access a child component instance, we recommend using [template refs](https://vuejs.org/guide/essentials/template-refs.html#template-refs).
In 3.x, the `$children` property is removed and no longer supported. Instead, if you need to access a child component instance, we recommend using [template refs](https://ja.vuejs.org/guide/essentials/template-refs.html#template-refs).

## Migration Strategy

Expand Down
2 changes: 1 addition & 1 deletion src/ja/breaking-changes/custom-elements-interop.md
Expand Up @@ -131,4 +131,4 @@ With the behavior change of `is`, a `vue:` prefix is now required to resolve the

## See Also

- [Guide - Vue and Web Components](https://vuejs.org/guide/extras/web-components.html)
- [Guide - Vue and Web Components](https://ja.vuejs.org/guide/extras/web-components.html)
2 changes: 1 addition & 1 deletion src/ja/breaking-changes/emits-option.md
Expand Up @@ -49,7 +49,7 @@ Similar to props, the events that the component emits can now be defined with th

The option also accepts an object, which allows the developer to define validators for the arguments that are passed with the emitted event, similar to validators in `props` definitions.

For more information on this, please read the [API documentation for this feature](https://vuejs.org/api/options-state.html#emits).
For more information on this, please read the [API documentation for this feature](https://ja.vuejs.org/api/options-state.html#emits).

## Migration Strategy

Expand Down
2 changes: 1 addition & 1 deletion src/ja/breaking-changes/events-api.md
Expand Up @@ -101,4 +101,4 @@ In most circumstances, using a global event bus for communicating between compon
* Provide / inject allow a component to communicate with its slot contents. This is useful for tightly-coupled components that are always used together.
* Provide / inject can also be used for long-distance communication between components. It can help to avoid 'prop drilling', where props need to be passed down through many levels of components that don't need those props themselves.
* Prop drilling can also be avoided by refactoring to use slots. If an interim component doesn't need the props then it might indicate a problem with separation of concerns. Introducing a slot in that component allows the parent to create the content directly, so that props can be passed without the interim component needing to get involved.
* [Global state management](https://vuejs.org/guide/scaling-up/state-management.html), such as [Pinia](https://pinia.vuejs.org/).
* [Global state management](https://ja.vuejs.org/guide/scaling-up/state-management.html), such as [Pinia](https://pinia.vuejs.org/).
2 changes: 1 addition & 1 deletion src/ja/breaking-changes/filters.md
Expand Up @@ -82,7 +82,7 @@ Instead of using filters, we recommend replacing them with computed properties o

If you are using filters that were globally registered and then used throughout your app, it's likely not convenient to replace them with computed properties or methods in each individual component.

Instead, you can make your global filters available to all components through [globalProperties](https://vuejs.org/api/application.html#app-config-globalproperties):
Instead, you can make your global filters available to all components through [globalProperties](https://ja.vuejs.org/api/application.html#app-config-globalproperties):

```js
// main.js
Expand Down
2 changes: 1 addition & 1 deletion src/ja/breaking-changes/functional-components.md
Expand Up @@ -116,5 +116,5 @@ The main differences are that:
For more information on the usage of the new functional components and the changes to render functions in general, see:

- [Migration: Render Functions](./render-function-api.html)
- [Guide: Render Functions](https://vuejs.org/guide/extras/render-function.html#render-functions-jsx)
- [Guide: Render Functions](https://ja.vuejs.org/guide/extras/render-function.html#render-functions-jsx)
- [Migration build flag: `COMPONENT_FUNCTIONAL`](../migration-build.html#compat-configuration)
4 changes: 2 additions & 2 deletions src/ja/breaking-changes/global-api.md
Expand Up @@ -124,7 +124,7 @@ In Vue 3, the check of whether an element is a component or not has been moved t

In Vue 2, `Vue.prototype` was commonly used to add properties that would be accessible in all components.

The equivalent in Vue 3 is [`config.globalProperties`](https://vuejs.org/api/application.html#app-config-globalproperties). These properties will be copied across as part of instantiating a component within the application:
The equivalent in Vue 3 is [`config.globalProperties`](https://ja.vuejs.org/api/application.html#app-config-globalproperties). These properties will be copied across as part of instantiating a component within the application:

```js
// before - Vue 2
Expand Down Expand Up @@ -187,7 +187,7 @@ Note that although the return type of `defineComponent` is a constructor-like ty

#### Component Inheritance

In Vue 3, we strongly recommend favoring composition via [Composition API](https://vuejs.org/guide/reusability/composables.html) over inheritance and mixins. If for some reason you still need component inheritance, you can use the [`extends` option](https://vuejs.org/api/options-composition.html#extends) instead of `Vue.extend`.
In Vue 3, we strongly recommend favoring composition via [Composition API](https://ja.vuejs.org/guide/reusability/composables.html) over inheritance and mixins. If for some reason you still need component inheritance, you can use the [`extends` option](https://ja.vuejs.org/api/options-composition.html#extends) instead of `Vue.extend`.

[Migration build flag: `GLOBAL_EXTEND`](../migration-build.html#compat-configuration)

Expand Down
2 changes: 1 addition & 1 deletion src/ja/breaking-changes/inline-template-attribute.md
Expand Up @@ -7,7 +7,7 @@ badges:

## Overview

Support for the [inline-template feature](https://vuejs.org/v2/guide/components-edge-cases.html#Inline-Templates) has been removed.
Support for the [inline-template feature](https://v2.ja.vuejs.org/v2/guide/components-edge-cases#%E3%82%A4%E3%83%B3%E3%83%A9%E3%82%A4%E3%83%B3%E3%83%86%E3%83%B3%E3%83%97%E3%83%AC%E3%83%BC%E3%83%88) has been removed.

## 2.x Syntax

Expand Down
4 changes: 2 additions & 2 deletions src/ja/breaking-changes/key-attribute.md
Expand Up @@ -15,8 +15,8 @@ badges:

The `key` special attribute is used as a hint for Vue's virtual DOM algorithm to keep track of a node's identity. That way, Vue knows when it can reuse and patch existing nodes and when it needs to reorder or recreate them. For more information, see the following sections:

- [List Rendering: Maintaining State](https://vuejs.org/guide/essentials/list.html#maintaining-state-with-key)
- [API Reference: `key` Special Attribute](https://vuejs.org/api/built-in-special-attributes.html#key)
- [List Rendering: Maintaining State](https://ja.vuejs.org/guide/essentials/list.html#maintaining-state-with-key)
- [API Reference: `key` Special Attribute](https://ja.vuejs.org/api/built-in-special-attributes.html#key)

## On conditional branches

Expand Down
2 changes: 1 addition & 1 deletion src/ja/breaking-changes/mount-changes.md
Expand Up @@ -95,4 +95,4 @@ When this app is mounted to the page that has a `div` with `id="app"`, this will

## See Also

- [`mount` API](https://vuejs.org/api/application.html#app-mount)
- [`mount` API](https://ja.vuejs.org/api/application.html#app-mount)
2 changes: 1 addition & 1 deletion src/ja/breaking-changes/props-data.md
Expand Up @@ -7,7 +7,7 @@ badges:

## Overview

The `propsData` option, used to pass props to the Vue instance during its creation, is removed. To pass props to the root component of a Vue 3 application, use the second argument of [createApp](https://vuejs.org/api/application.html#createapp).
The `propsData` option, used to pass props to the Vue instance during its creation, is removed. To pass props to the root component of a Vue 3 application, use the second argument of [createApp](https://ja.vuejs.org/api/application.html#createapp).

## 2.x Syntax

Expand Down
2 changes: 1 addition & 1 deletion src/ja/breaking-changes/props-default-this.md
Expand Up @@ -12,7 +12,7 @@ Instead:

- Raw props received by the component are passed to the default function as argument;

- The [inject](https://vuejs.org/api/composition-api-dependency-injection.html#inject) API can be used inside default functions.
- The [inject](https://ja.vuejs.org/api/composition-api-dependency-injection.html#inject) API can be used inside default functions.

```js
import { inject } from 'vue'
Expand Down
2 changes: 1 addition & 1 deletion src/ja/breaking-changes/render-function-api.md
Expand Up @@ -143,4 +143,4 @@ For more information, see [The Render Function Api Change RFC](https://github.co

## Next Steps

See [Render Function Guide](https://vuejs.org/guide/extras/render-function.html) for more detailed documentation!
See [Render Function Guide](https://ja.vuejs.org/guide/extras/render-function.html) for more detailed documentation!
4 changes: 2 additions & 2 deletions src/ja/breaking-changes/v-if-v-for.md
Expand Up @@ -32,5 +32,5 @@ Rather than managing this at the template level, one method for accomplishing th

## See also

- [List Rendering - Displaying Filtered/Sorted Results](https://vuejs.org/guide/essentials/list.html#displaying-filtered-sorted-results)
- [List Rendering - `v-for` with `v-if`](https://vuejs.org/guide/essentials/list.html#v-for-with-v-if)
- [List Rendering - Displaying Filtered/Sorted Results](https://ja.vuejs.org/guide/essentials/list.html#displaying-filtered-sorted-results)
- [List Rendering - `v-for` with `v-if`](https://ja.vuejs.org/guide/essentials/list.html#v-for-with-v-if)
8 changes: 4 additions & 4 deletions src/ja/breaking-changes/v-model.md
Expand Up @@ -144,7 +144,7 @@ In addition to 2.x hard-coded `v-model` modifiers like `.trim`, now 3.x supports
<ChildComponent v-model.capitalize="pageTitle" />
```

Read more about custom `v-model` modifiers in the [Component Events](http://vuejs.org/guide/components/events.html#usage-with-v-model) section.
Read more about custom `v-model` modifiers in the [Component Events](https://ja.vuejs.org/guide/components/v-model.html) section.

## Migration Strategy

Expand Down Expand Up @@ -191,6 +191,6 @@ We recommend:

For more information on the new `v-model` syntax, see:

- [Using `v-model` on Components](https://vuejs.org/guide/components/events.html#usage-with-v-model)
- [`v-model` arguments](https://vuejs.org/guide/components/events.html#v-model-arguments)
- [Handling `v-model` modifiers](https://vuejs.org/guide/components/events.html#usage-with-v-model)
- [Using `v-model` on Components](https://ja.vuejs.org/guide/components/v-model.html)
- [`v-model` arguments](https://ja.vuejs.org/guide/components/v-model.html#v-model-arguments)
- [Handling `v-model` modifiers](https://ja.vuejs.org/guide/components/v-model.html#handling-v-model-modifiers)
2 changes: 1 addition & 1 deletion src/ja/breaking-changes/watch.md
Expand Up @@ -12,7 +12,7 @@ badges:

## 3.x Syntax

When using [the `watch` option](https://vuejs.org/api/options-state.html#watch) to watch an array, the callback will only trigger when the array is replaced. In other words, the watch callback will no longer be triggered on array mutation. To trigger on mutation, the `deep` option must be specified.
When using [the `watch` option](https://ja.vuejs.org/api/options-state.html#watch) to watch an array, the callback will only trigger when the array is replaced. In other words, the watch callback will no longer be triggered on array mutation. To trigger on mutation, the `deep` option must be specified.

```js
watch: {
Expand Down

0 comments on commit 3fcfc14

Please sign in to comment.