From 39e6d6c53564a381d0d65fb8aff4f143ee7f4d05 Mon Sep 17 00:00:00 2001 From: bake0937 Date: Wed, 23 Sep 2020 00:21:29 +0900 Subject: [PATCH] docs: translate guide/routing.md (#42) --- src/guide/routing.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/guide/routing.md b/src/guide/routing.md index 6c1b0bec..34ddeb9d 100644 --- a/src/guide/routing.md +++ b/src/guide/routing.md @@ -1,12 +1,12 @@ -# Routing +# ルーティング -## Official Router +## 公式ルータ -For most Single Page Applications, it's recommended to use the officially-supported [vue-router library](https://github.com/vuejs/vue-router). For more details, see vue-router's [documentation](https://router.vuejs.org/). +ほとんどのシングルページアプリケーションでは、公式にサポートされている [vue-router ライブラリ](https://github.com/vuejs/vue-router)を使うことをオススメします。詳細は vue-router の[ドキュメント](https://router.vuejs.org/)を参照してください。 -## Simple Routing from Scratch +## スクラッチからのシンプルなルーティング -If you only need very simple routing and do not wish to involve a full-featured router library, you can do so by dynamically rendering a page-level component like this: +とてもシンプルなルーティングだけが必要で、フル機能のルータライブラリを使用したくない場合は、以下のようにページレベルのコンポーネントで動的にレンダリングができます。 ```js const NotFoundComponent = { template: '

Page not found

' } @@ -37,8 +37,8 @@ const SimpleRouter = { Vue.createApp(SimpleRouter).mount('#app') ``` -Combined with the [History API](https://developer.mozilla.org/en-US/docs/Web/API/History_API/Working_with_the_History_API), you can build a very basic but fully-functional client-side router. To see that in practice, check out [this example app](https://github.com/phanan/vue-3.0-simple-routing-example). +[History API](https://developer.mozilla.org/en-US/docs/Web/API/History_API/Working_with_the_History_API) と組み合わせることで、とても基本的ですが完全に機能するクライアント側のルータを構築できます。実際に確認するには、[このサンプルアプリ](https://github.com/phanan/vue-3.0-simple-routing-example)をチェックしてみてください。 -## Integrating 3rd-Party Routers +## サードパーティ製ルータとの統合 -If there's a 3rd-party router you prefer to use, such as [Page.js](https://github.com/visionmedia/page.js) or [Director](https://github.com/flatiron/director), integration is [similarly straightforward](https://github.com/phanan/vue-3.0-simple-routing-example/compare/master...pagejs). Here's a [complete example](https://github.com/phanan/vue-3.0-simple-routing-example/tree/pagejs) using Page.js. +[Page.js](https://github.com/visionmedia/page.js) や [Director](https://github.com/flatiron/director) のようなサードパーティ製のルータを使いたい場合は、統合は[同様に簡単](https://github.com/phanan/vue-3.0-simple-routing-example/compare/master...pagejs)です。ここに、Page.js を使った[サンプル](https://github.com/phanan/vue-3.0-simple-routing-example/tree/pagejs)があります。