` with Ionic's routing and layout components. The router outlet is where your pages will be displayed.
+これで Ionic の `ion-app`、`ion-router`、`ion-router-outlet` コンポーネントを使ったアプリのルートが構成できました。主な変更点は、デフォルトの `
` を Ionic のルーティングとレイアウトのコンポーネントに置き換えたことです。ページは router outlet に表示されます。
## View Routes {/* #view-routes */}
-Routes are defined in the `index.html` using `ion-route` components inside the `ion-router`:
+ルートは、`index.html`ファイル内で、`ion-router`内の`ion-route`コンポーネントを使って定義されます。
```html title="index.html"
@@ -193,11 +193,11 @@ Routes are defined in the `index.html` using `ion-route` components inside the `
```
-When you visit the root URL (`/`), the `home-page` component will be loaded. When you visit the `/new` URL, the `new-page` component will be loaded. We will define these components next.
+root URL(`/`)にアクセスすると、`home-page`コンポーネントが読み込まれます。一方、`/new`という URL にアクセスすると、`new-page`コンポーネントが読み込まれます。これらのコンポーネントについては、後ほど定義します。
## Add the Home Page {/* #add-the-home-page */}
-Create a new directory called `pages` inside the `src` folder, then add a file called `HomePage.js` in that directory with the following content:
+`src`フォルダ内に`pages`という名前の新しいディレクトリを作成します。そのディレクトリに`HomePage.js`という名前のファイルを追加してください。ファイル内の内容は以下の通りです:
```js title="src/pages/HomePage.js"
class HomePage extends HTMLElement {
@@ -224,7 +224,7 @@ class HomePage extends HTMLElement {
customElements.define('home-page', HomePage);
```
-This creates a custom element called `home-page` that contains the layout for your Home page. The page uses Ionic's layout components to create a header with a toolbar and scrollable content area.
+Home ページのレイアウトを含む `home-page` という Custom Element を作成します。Ionic のレイアウトコンポーネントを使い、ツールバー付きのヘッダーとスクロール可能なコンテンツ領域を配置しています。
:::tip[詳しく学ぶ]
@@ -232,7 +232,7 @@ Ionic のレイアウトコンポーネントの詳細については、[Header]
:::
-Next, add a `
```
-At this point your browser should be displaying the Home page.
+この時点で、お使いのブラウザには Home ページが表示されているはずです。
-
+
## Add an Ionic Component {/* #add-an-ionic-component */}
-You can enhance your Home page with more Ionic UI components. For example, add a [Button](../api/button.mdx) to navigate to another page. Update the `HomePage` component in `HomePage.js`:
+Home ページには Ionic UI コンポーネントを追加できます。例として、別のページに移動する [Button](../api/button.mdx) を追加しましょう。`HomePage.js` の `HomePage` コンポーネントを次のように更新します。
```js title="src/pages/HomePage.js"
class HomePage extends HTMLElement {
@@ -279,7 +279,7 @@ customElements.define('home-page', HomePage);
## Add a New Page {/* #add-a-new-page */}
-Add a new file named `NewPage.js` to `src/pages` with the following content:
+`src/pages`ディレクトリに、`NewPage.js`という名前の新しいファイルを作成してください。ファイル内の内容は以下の通りです:
```js title="src/pages/NewPage.js"
class NewPage extends HTMLElement {
@@ -303,9 +303,9 @@ class NewPage extends HTMLElement {
customElements.define('new-page', NewPage);
```
-This creates a page with a [Back Button](../api/back-button.mdx) in the [Toolbar](../api/toolbar.mdx). The back button will automatically handle navigation back to the previous page, or to `/` if there is no history.
+これにより、[Toolbar](../api/toolbar.mdx) に [Back Button](../api/back-button.mdx)を持つページが作成されます。戻るボタンは、前のページへのナビゲーション、または履歴がない場合は`/`へのナビゲーションを自動的に処理します。
-Next, update the `
```
**After**
-```html
+```vue
...
```
@@ -315,7 +315,7 @@ npm install @ionic/core@6
1. `placeholder`、`pickerOptions`、`pickerFormat`、`monthNames`、`monthShortNames`、`dayNames`、および`dayShortNames`プロパティの使用をすべて削除してください。`ion-datetime`は、デバイスで設定された言語と地域に従って、コンポーネント内に表示される月名、曜日名、および時刻を自動的にフォーマットします。詳細については、[ion-datetime ローカリゼーションドキュメント](../api/datetime.mdx#localization)を参照してください。
-2. `text` と `placeholder` の CSS シャドウパーツの使用をすべて削除します。
+2. `text` と `placeholder` の CSS Shadow Parts の使用をすべて削除します。
3. CSS 変数 `--padding-bottom`, `--padding-end`, `--padding-start`, `--padding-top`, `--placeholder-color` のすべての使用を削除します。 `ion-datetime` のパディングをカスタマイズするには、 `padding` CSS プロパティのいずれかを使用することができます。
@@ -417,7 +417,7 @@ ion-popover::part(content) {
Ionic がサポートしているブラウザのリストが変更されました。 [ブラウザサポートガイド](../reference/browser-support.mdx) を確認し、サポートされているブラウザにアプリをデプロイするようにしましょう。
-If you have a `browserslist` or `.browserslistrc` file, update it with the following content:
+もし、`browserslist`や`.browserslistrc`というファイルを持っている場合は、以下の内容でファイルを更新してください。
```
Chrome >=60
@@ -474,7 +474,7 @@ Create React App (CRA) を使用している開発者にとっては、現在の
2. `package.json` ファイルに `browserslist/test` フィールドがある場合、それが `current node` に設定されていることを確認してください。
-## アップグレートへの助けが必要? {/* #need-help-upgrading */}
+## アップグレードでお困りの場合 {/* #need-help-upgrading */}
必ず[Ionic 6 変更点ガイド](https://github.com/ionic-team/ionic-framework/blob/main/BREAKING_ARCHIVE/v6.md)を確認してください。開発者が知っておく必要のある、デフォルトプロパティおよび CSS 変数値の複数の変更があります。このページには、ユーザーの操作が必要な破壊的変更のみが記載されています。
diff --git a/docs/updating/7-0.mdx b/docs/updating/7-0.mdx
index 9d84c6a8302..a07a31bda98 100644
--- a/docs/updating/7-0.mdx
+++ b/docs/updating/7-0.mdx
@@ -1,13 +1,13 @@
---
-description: 'Update an Ionic 6 app to Ionic 7, with the package updates for each framework and the breaking changes to review in your code.'
title: Updating to v7
+description: 'Ionic 6 から Ionic 7 にアップデートする際の、フレームワークごとのパッケージ更新とコードで確認すべき破壊的変更を説明します。'
---
-# Updating from Ionic 6 to 7
+# Ionic 6 から Ionic 7 へアップデートする方法
:::note
-This guide assumes that you have already updated your app to the latest version of Ionic 6. Make sure you have followed the [Upgrading to Ionic 6 Guide](./6-0.mdx) before starting this guide.
+このガイドでは、アプリを最新バージョンの Ionic 6 にアップデートしていることを前提としています。このガイドを開始する前に、[Ionic 6 へのアップグレードガイド](./6-0.mdx)に従ってアプリをアップデートしていることを確認してください。
:::
@@ -40,7 +40,7 @@ Ionic Angular Server と Ionic Angular Toolkit を使用している場合は、
npm install @ionic/angular@7 @ionic/angular-server@7 @ionic/angular-toolkit@9
```
-> Note: `@ionic/angular-toolkit@9` requires a minimum of Angular 15. If you are still on Angular 14, then you can skip updating to `@ionic/angular-toolkit@9`.
+> 注: `@ionic/angular-toolkit@9` を使用するには、最低でも Angular 15 が必要です。もし、まだ Angular 14 を使用している場合は、 `@ionic/angular-toolkit@9` への更新を省略することができます。
### React {/* #react */}
@@ -114,8 +114,8 @@ iOS >=14
### Modal {/* #modal */}
-1. Remove any usage of the `swipeToClose` property. Card modals are swipeable by default, so you can remove `swipeToClose` if you want your card modal to remain swipeable. Use the [canDismiss](../api/modal.mdx#preventing-a-modal-from-dismissing) property if you want to prevent a modal from dismissing.
-2. Remove any code that sets the `canDismiss` property to `undefined`. The `canDismiss` property now defaults to `true`, so this code is no longer needed.
+1. `swipeToClose` プロパティの使用箇所をすべて削除します。カードモーダルはデフォルトでスワイプできるため、その動作を維持したい場合は `swipeToClose` を削除できます。モーダルが閉じないようにするには、[canDismiss](../api/modal.mdx#preventing-a-modal-from-dismissing) プロパティを使用します。
+2. `canDismiss`プロパティを`undefined`に設定するコードをすべて削除してください。`canDismiss`プロパティは現在、`true`の値に設定されているため、このコードはもはや不要です。
### Picker {/* #picker */}
@@ -127,13 +127,13 @@ iOS >=14
### Segment {/* #segment */}
-1. Remove any code that sets the `value` property to `null`. Developers should use either `''` or `undefined` instead.
+1. `value`プロパティを`null`に設定するようなコードはすべて削除してください。開発者は、`''`や`undefined`を使用するべきです。
### Slides {/* #slides */}
1. `ion-slides`、`ion-slide`、および関連する型を削除する。これらのコンポーネントは、Swiper.js を直接使用するために削除されました。この移行については、以下のガイドに詳細が記載されています。
-[Angular Migration Guide](../angular/slides.mdx)
[React Migration Guide](../react/slides.mdx)
[Vue Migration Guide](../vue/slides.mdx)
+[Angular 移行ガイド](../angular/slides.mdx)
[React 移行ガイド](../react/slides.mdx)
[Vue 移行ガイド](../vue/slides.mdx)
### Textarea {/* #textarea */}
@@ -145,11 +145,11 @@ iOS >=14
### Virtual Scroll {/* #virtual-scroll */}
-`ion-virtual-scroll`とそれに関連する型を削除する。このコンポーネントは、JavaScript Frameworks が提供する仮想スクロールのソリューションを使用するために削除されました。この移行については、以下のガイドに詳細が記載されています。
+1. `ion-virtual-scroll`とそれに関連する型を削除する。このコンポーネントは、JavaScript Frameworks が提供する仮想スクロールのソリューションを使用するために削除されました。この移行については、以下のガイドに詳細が記載されています。
-[Angular Migration Guide](../angular/virtual-scroll.mdx)
[React Migration Guide](../react/virtual-scroll.mdx)
[Vue Migration Guide](../vue/virtual-scroll.mdx)
+[Angular 移行ガイド](../angular/virtual-scroll.mdx)
[React 移行ガイド](../react/virtual-scroll.mdx)
[Vue 移行ガイド](../vue/virtual-scroll.mdx)
-## アップグレードに助けが必要? {/* #need-help-upgrading */}
+## アップグレードでお困りの場合 {/* #need-help-upgrading */}
必ず[Ionic 7 破壊的変更ガイド](https://github.com/ionic-team/ionic-framework/blob/main/BREAKING.md#version-7x)を確認してください。開発者が把握しておく必要がある可能性のあるデフォルトのプロパティや CSS 変数の値に関する変更がいくつかあります。このページには、ユーザーの操作が必要な破壊的変更のみが記載されています。
diff --git a/docs/updating/8-0.mdx b/docs/updating/8-0.mdx
index c734e2627b0..4c0823b9c22 100644
--- a/docs/updating/8-0.mdx
+++ b/docs/updating/8-0.mdx
@@ -1,6 +1,6 @@
---
-description: 'Update an Ionic 7 app to Ionic 8, with the package updates for each framework and the breaking changes to review in your code.'
title: Updating to v8
+description: 'Ionic 7 から Ionic 8 にアップデートする際の、フレームワークごとのパッケージ更新とコードで確認すべき破壊的変更を説明します。'
---
# Ionic 7 から 8 への更新
@@ -23,7 +23,7 @@ Ionic 7 から Ionic 8 への**破壊的変更の完全なリスト**につい
1. Ionic 8 は Angular 16 以上をサポートしています。[Angular 更新ガイド](https://update.angular.io/)に従って、Angular を最新バージョンにアップデートしてください。
-2. Ionic 8 の最新バージョンにアップデートする:
+2. Ionic 8 を最新バージョンに更新してください:
```shell
npm install @ionic/angular@latest
@@ -55,7 +55,7 @@ npm install @ionic/react@8 @ionic/react-router@8
### Vue {/* #vue */}
-1. Ionic 8 supports Vue 3.0.6+. Update to the latest version of Vue:
+1. Ionic 8 は、Vue 3.0.6 以降をサポートしています。最新バージョンの Vue にアップグレードしてください。
```shell
npm install vue@^3.0.6 vue-router@^3.0.6
@@ -103,7 +103,7 @@ Ionic Framework バージョン 8 では、`core.css` がインポートされ
### Dark Palette {/* #dark-palette */}
-In previous versions, it was recommended to define the dark palette in the following way:
+以前のバージョンでは、ダークパレットを以下のように定義することが推奨されていました。
```css
@media (prefers-color-scheme: dark) {
@@ -129,17 +129,17 @@ Ionic Framework バージョン 8 では、ダークパレットがインポー
@import '@ionic/angular/css/palettes/dark.system.css';
```
-ダークパレットは、`body`セレクターではなく、現在`:root`セレクターに適用されています。[`:root`](https://developer.mozilla.org/en-US/docs/Web/CSS/:root)セレクターは``要素を表しており、`html`セレクターと同一ですが、特異性はより高くなっています。
+ダークパレットは、`body` selector ではなく、現在`:root` selector に適用されています。[`:root`](https://developer.mozilla.org/en-US/docs/Web/CSS/:root)selector は``要素を表しており、`html` selector と同一ですが、特異性はより高くなっています。
-新しいダークパレットファイルを含めるための移行は、破壊的な変更を引き起こす可能性は低いですが、カスタム CSS 変数が`body`要素に設定されている場合、これらの新しいセレクタが予期しない上書きを引き起こす可能性があります。グローバルなアプリケーション変数が設定されている箇所については、代わりに`:root`セレクタをターゲットにするよう更新することを推奨します。
+新しいダークパレットファイルを含めるための移行は、破壊的な変更を引き起こす可能性は低いですが、カスタム CSS 変数が`body`要素に設定されている場合、これらの新しい selector が予期しない上書きを引き起こす可能性があります。グローバルなアプリケーション変数が設定されている箇所については、代わりに`:root` selector をターゲットにするよう更新することを推奨します。
新しいダークパレットファイルに関する詳細は、[ダークモードのドキュメント](../theming/dark-mode.mdx)を参照してください。
-### ステップカラートークン {/* #step-color-tokens */}
+### Step Color Tokens {/* #step-color-tokens */}
-Ionic 8 のハイコントラストパレットをより適切にサポートするため、テキスト色と背景色に個別のステップカラートークンが導入されました。以前は、テキスト色と背景色の両方が単一の `--ion-color-step-[number]` トークン群で制御されていました。
+Ionic 8 のハイコントラストパレットをより適切にサポートするため、テキスト色と背景色に個別の step color token が導入されました。以前は、テキスト色と背景色の両方が単一の `--ion-color-step-[number]` トークン群で制御されていました。
-上記で述べた新しくインポートされたダークパレットを使用すると、これらの新しいステップカラートークンもインポートされます。ただし、開発者はアプリケーション内で手動で定義されたステップカラートークンを更新する必要があります。
+上記で述べた新しくインポートされたダークパレットを使用すると、これらの新しい step color token もインポートされます。ただし、開発者はアプリケーション内で手動で定義された step color token を更新する必要があります。
**背景色**に使用している `--ion-color-step-[number]` は、トークン名を `--ion-background-color-step-[number]` に変更することで移行できます。
@@ -169,19 +169,19 @@ button { color: var(--ion-color-step-400); }
button { color: var(--ion-text-color-step-600); /* 1000 - 400 = 600 */ }
```
-The [stepped color generator](../theming/themes.mdx#stepped-color-generator) has been updated to generate text and background color stepped variables.
+[stepped color generator](../theming/themes.mdx#stepped-color-generator) が更新され、テキスト用と背景色用の stepped color 変数を生成できるようになりました。
-### ダイナミックフォント {/* #dynamic-font */}
+### Dynamic Font {/* #dynamic-font */}
-`core.css`ファイルは、デフォルトで動的フォントスケーリングを有効にするように更新されました。
+`core.css`ファイルは、デフォルトで Dynamic Font Scaling を有効にするように更新されました。
`--ion-default-dynamic-font` 変数は削除され、`--ion-dynamic-font` に置き換えられました。
-以前にグローバルスタイルシートで動的フォントスケーリングを有効にすることでそれを選択した開発者は、カスタム CSS を削除することでデフォルト設定に戻すことができます。そうすることで、アプリケーションは以前と同様にシームレスに動的フォントスケーリングを利用し続けます。html 要素のフォントサイズを変更すると、動的フォントスケーリングの正しい動作が妨げられる可能性があるため、変更は避けることが重要です。
+以前にグローバルスタイルシートで Dynamic Font Scaling を有効にすることでそれを選択した開発者は、カスタム CSS を削除することでデフォルト設定に戻すことができます。そうすることで、アプリケーションは以前と同様にシームレスに Dynamic Font Scaling を利用し続けます。html 要素のフォントサイズを変更すると、Dynamic Font Scaling の正しい動作が妨げられる可能性があるため、変更は避けることが重要です。
-動的フォントスケーリングを無効にしたい開発者は、グローバルスタイルシートで`--ion-dynamic-font: initial;`を設定できます。ただし、拡大フォントサイズに依存するユーザーにとってアクセシビリティ上の課題を引き起こす可能性があるため、これは推奨されません。
+Dynamic Font Scaling を無効にしたい開発者は、グローバルスタイルシートで`--ion-dynamic-font: initial;`を設定できます。ただし、拡大フォントサイズに依存するユーザーにとってアクセシビリティ上の課題を引き起こす可能性があるため、これは推奨されません。
-動的フォントに関する詳細は、[動的フォントのスケーリングに関するドキュメント](../layout/dynamic-font-scaling.mdx)を参照してください。
+動的フォントに関する詳細は、[Dynamic Font Scaling に関するドキュメント](../layout/dynamic-font-scaling.mdx)を参照してください。
### (Angular のみ) `angular.json` CSS のインポート順 {/* #angular-only-angularjson-css-import-order */}
@@ -220,18 +220,18 @@ iOS >=15
### Checkbox {/* #checkbox */}
-1. Migrate any remaining instances of Checkbox to use the [modern form control syntax](https://ionic-docs-mt82qcyb0-ionic1.vercel.app/docs/v7/api/checkbox#migrating-from-legacy-checkbox-syntax). Additionally, remove any usages of the `legacy` property as the legacy form control syntax has been removed.
+1. 残っているすべての Checkbox のインスタンスを、[最新のフォームコントロール構文](https://ionic-docs-mt82qcyb0-ionic1.vercel.app/docs/v7/api/checkbox#migrating-from-legacy-checkbox-syntax)を使用するように移行してください。また、`legacy`プロパティの使用もすべて廃止してください。なぜなら、このレガシーなフォームコントロール構文はもう使用できないからです。
### Input {/* #input */}
-1. Remove any usages of the `size` property. CSS should be used to specify the visible width of the input instead.
-2. Remove any usages of the `accept` property.
-3. Migrate any remaining instances of Input to use the [modern form control syntax](https://ionic-docs-mt82qcyb0-ionic1.vercel.app/docs/v7/api/input#migrating-from-legacy-input-syntax). Additionally, remove any usages of the `legacy` property as the legacy form control syntax has been removed.
+1. `size`プロパティの使用をすべて排除してください。代わりに、CSS を使って入力要素の可視的な幅を指定するべきです。
+2. `accept`プロパティの使用をすべて排除してください。
+3. 残っているすべての Input インスタンスを、[最新のフォームコントロール構文](https://ionic-docs-mt82qcyb0-ionic1.vercel.app/docs/v7/api/input#migrating-from-legacy-input-syntax)を使用して移行してください。また、`legacy`プロパティの使用もすべて排除してください。なぜなら、そのレガシーなフォームコントロール構文はもう使用できないからです。
### Item {/* #item */}
1. `counter` または `counterFormatter` プロパティの使用をすべて削除します。代わりに `ion-input` と `ion-textarea` の同名プロパティを使用してください。
-2. `helper` または `error` スロットの使用をすべて削除します。代わりに `ion-input` と `ion-textarea` の `helperText` と `errorText` プロパティを使用してください。
+2. `helper` または `error` slot の使用をすべて削除します。代わりに `ion-input` と `ion-textarea` の `helperText` と `errorText` プロパティを使用してください。
3. `fill` または `shape` プロパティの使用をすべて削除します。代わりに `ion-input`、`ion-textarea`、`ion-select` の同名プロパティを使用してください。
### Nav {/* #nav */}
@@ -244,25 +244,25 @@ iOS >=15
### Toast {/* #toast */}
-1. `ToastButton` から `cssClass` プロパティの使用をすべて削除してください。代わりに `button` CSS シャドウパーツを使用してください。
+1. `ToastButton` から `cssClass` プロパティの使用をすべて削除してください。代わりに `button` CSS Shadow Parts を使用してください。
### Radio {/* #radio */}
-1. Migrate any remaining instances of Radio to use the [modern form control syntax](https://ionic-docs-mt82qcyb0-ionic1.vercel.app/docs/v7/api/radio#migrating-from-legacy-radio-syntax). Additionally, remove any usages of the `legacy` property as the legacy form control syntax has been removed.
+1. 残っているすべての Radio のインスタンスを、[最新のフォームコントロール構文](https://ionic-docs-mt82qcyb0-ionic1.vercel.app/docs/v7/api/radio#migrating-from-legacy-radio-syntax)に移行してください。また、`legacy`プロパティの使用もすべて削除してください。なぜなら、このレガシーなフォームコントロール構文はもう使用できないからです。
### Select {/* #select */}
-1. Migrate any remaining instances of Select to use the [modern form control syntax](https://ionic-docs-mt82qcyb0-ionic1.vercel.app/docs/v7/api/select#migrating-from-legacy-select-syntax). Additionally, remove any usages of the `legacy` property as the legacy form control syntax has been removed.
+1. 残っているすべての Select インスタンスを、[最新のフォームコントロール構文](https://ionic-docs-mt82qcyb0-ionic1.vercel.app/docs/v7/api/select#migrating-from-legacy-select-syntax)を使用するように移行してください。また、`legacy`プロパティの使用もすべて削除してください。なぜなら、そのレガシーなフォームコントロール構文はもう使用できないからです。
### Textarea {/* #textarea */}
-1. Migrate any remaining instances of Textarea to use the [modern form control syntax](https://ionic-docs-mt82qcyb0-ionic1.vercel.app/docs/v7/api/textarea#migrating-from-legacy-textarea-syntax). Additionally, remove any usages of the `legacy` property as the legacy form control syntax has been removed.
+1. 残っている Textarea のインスタンスをすべて、[最新のフォームコントロールの構文形式](https://ionic-docs-mt82qcyb0-ionic1.vercel.app/docs/v7/api/textarea#migrating-from-legacy-textarea-syntax)に移行してください。また、`legacy`プロパティの使用もすべてやめてください。なぜなら、その古いフォームコントロールの構文形式はもう使用できないからです。
### Toggle {/* #toggle */}
-1. Migrate any remaining instances of Toggle to use the [modern form control syntax](https://ionic-docs-mt82qcyb0-ionic1.vercel.app/docs/v7/api/toggle#migrating-from-legacy-toggle-syntax). Additionally, remove any usages of the `legacy` property as the legacy form control syntax has been removed.
+1. 残っている Toggle のインスタンスは、[Modern Form Control Syntax](https://ionic-docs-mt82qcyb0-ionic1.vercel.app/docs/v7/api/toggle#migrating-from-legacy-toggle-syntax)を使用して移行してください。また、`legacy`プロパティの使用もすべて削除してください。なぜなら、Legacy Form Control Syntax はもう使用できないからです。
-## アップグレードに関してヘルプが必要ですか? {/* #need-help-upgrading */}
+## アップグレードでお困りの場合 {/* #need-help-upgrading */}
必ず[Ionic 8 Breaking Changes Guide](https://github.com/ionic-team/ionic-framework/blob/main/BREAKING.md#version-8x)を確認してください。デフォルトのプロパティや CSS 変数の値にいくつか変更があり、開発者は注意が必要な場合があります。このページには、ユーザーによる対応が必要な破壊的変更のみが記載されています。
diff --git a/docs/updating/9-0.mdx b/docs/updating/9-0.mdx
index 7f6d8c3bcdb..030032bfce7 100644
--- a/docs/updating/9-0.mdx
+++ b/docs/updating/9-0.mdx
@@ -1,6 +1,6 @@
---
-description: 'Update an Ionic 8 app to Ionic 9, with the automated migration, the package updates for each framework, and the breaking changes to review.'
title: Updating to v9
+description: 'Ionic 8 から Ionic 9 への自動移行、フレームワークごとのパッケージ更新、確認すべき破壊的変更を説明します。'
---
# Ionic 8 から 9 へのアップデート
@@ -66,7 +66,7 @@ npm install @ionic/angular@latest @ionic/angular-server@latest @ionic/angular-to
#### Zoneless 変更検出 {/* #zoneless-change-detection */}
-Ionic 9 は zoneless 変更検出をサポートします。Angular 21 では zoneless がデフォルトになったため、Angular 21 以降の新しい Ionic 9 アプリは最初から Zone.js なしで動作し、変更検出用のプロバイダーは不要です。
+Ionic 9 は zoneless 変更検出をサポートします。Angular 21 では zoneless がデフォルトになったため、Angular 21 以降の新しい Ionic 9 アプリは最初から Zone.js なしで動作し、変更検出用の provider は不要です。
Zone.js がない場合、非同期コールバック(オーバーレイ結果の await、`setTimeout`、RxJS の購読、`Platform` イベント)からコンポーネントの状態を更新しても、Angular は自動では再描画しません。そのような場合は、signal または `ChangeDetectorRef.markForCheck()` で Angular に通知する必要があります。Ionic アプリで使うパターンについては、[Zoneless 変更検出](../angular/zoneless.mdx)を参照してください。
@@ -80,7 +80,7 @@ Angular 18 から 20 では、Zone.js が引き続き Angular のデフォルト
Angular 21 以降でも Zone.js を使い続けたい場合は、`provideZoneChangeDetection()` でオプトインしてください。
-スタンドアロンアプリケーションでは、プロバイダーを `bootstrapApplication` に追加します:
+standalone アプリケーションでは、provider を `bootstrapApplication` に追加します:
```diff
import { bootstrapApplication } from '@angular/platform-browser';
@@ -124,9 +124,9 @@ import 'zone.js';
#### Angular 22 での OnPush 変更検出 {/* #onpush-change-detection-on-angular-22 */}
-Angular 22 では、変更検出戦略を宣言していないコンポーネントのデフォルトが `OnPush` に変わります。上記の zoneless デフォルトと組み合わさると、Ionic ライフサイクルフック(`ionViewWillEnter` など)からプレーンなフィールドとして変更したコンポーネント状態は、それだけでは再描画されなくなります。
+Angular 22 では、変更検出戦略を宣言していないコンポーネントのデフォルトが `OnPush` に変わります。上記の zoneless デフォルトと組み合わさると、Ionic lifecycle hook(`ionViewWillEnter` など)からプレーンなフィールドとして変更したコンポーネント状態は、それだけでは再描画されなくなります。
-Angular 22 へアップグレードするときは `ng update` を実行してください。既存コンポーネントを eager 変更検出へ移行し、以前の動作を維持します。代わりに `OnPush` 向けのコンポーネントを書くには、フック内で signal 経由で状態を設定するか、`ChangeDetectorRef.markForCheck()` を呼び出してください:
+Angular 22 へアップグレードするときは `ng update` を実行してください。既存コンポーネントを eager 変更検出へ移行し、以前の動作を維持します。代わりに `OnPush` 向けのコンポーネントを書くには、hook 内で signal 経由で状態を設定するか、`ChangeDetectorRef.markForCheck()` を呼び出してください:
```diff
+ import { signal } from '@angular/core';
@@ -159,11 +159,11 @@ Angular 22 は Node.js の最小バージョンを `^22.22.3 || ^24.15.0 || ^26.
#### コンポーネントのインポート {/* #component-imports */}
-Ionic 9 では、スタンドアロンコンポーネントがデフォルトのインポートパスになります。遅延読み込みコンポーネントのインポートを `@ionic/angular` から `@ionic/angular/lazy` へ変更してください。スタンドアロンコンポーネントのインポートは `@ionic/angular/standalone` から `@ionic/angular` へ変更してください。
+Ionic 9 では、standalone コンポーネントがデフォルトのインポートパスになります。遅延読み込みコンポーネントのインポートを `@ionic/angular` から `@ionic/angular/lazy` へ変更してください。standalone コンポーネントのインポートは `@ionic/angular/standalone` から `@ionic/angular` へ変更してください。
#### IonicModule の非推奨化 {/* #ionicmodule-deprecation */}
-`IonicModule` は Ionic 9 で非推奨となり、将来のメジャーバージョンで削除されます。引き続き完全に機能するため、直ちに対応する必要はありません。準備ができたら、スタンドアロンと NgModule ベースの両方のアプリで使える `provideIonicAngular()` へ移行してください。[Modules から Standalone への移行](../angular/build-options.mdx#migrating-from-modules-to-standalone)を参照してください。
+`IonicModule` は Ionic 9 で非推奨となり、将来のメジャーバージョンで削除されます。引き続き完全に機能するため、直ちに対応する必要はありません。準備ができたら、standalone と NgModule ベースの両方のアプリで使える `provideIonicAngular()` へ移行してください。[Modules から Standalone への移行](../angular/build-options.mdx#migrating-from-modules-to-standalone)を参照してください。
#### CSS のインポート {/* #css-imports */}
@@ -196,9 +196,9 @@ npm install @ionic/react@latest @ionic/react-router@latest
`@ionic/react` パッケージは TypeScript 5.4 以降が必要です。型定義は TypeScript 5.4 で追加された `NoInfer` を使用します。
-#### 型付きオーバーレイフックの props {/* #typed-overlay-hook-props */}
+#### 型付きオーバーレイ hook の props {/* #typed-overlay-hook-props */}
-`useIonModal` と `useIonPopover` フックは、渡されたコンポーネントに対して `componentProps` を型付けするようになり、`any` を受け付けなくなりました。コンポーネントと一致しない props を渡すとコンパイルエラーになり、コンポーネントが必須 props を宣言している場合は `componentProps` が必須になります:
+`useIonModal` と `useIonPopover` hook は、渡されたコンポーネントに対して `componentProps` を型付けするようになり、`any` を受け付けなくなりました。コンポーネントと一致しない props を渡すとコンパイルエラーになり、コンポーネントが必須 props を宣言している場合は `componentProps` が必須になります:
```tsx
const Modal: React.FC<{ title: string }> = ({ title }) =>
{title}
;
@@ -285,7 +285,7 @@ Ionic React は React Router v6 を必須とし、v5 とは API が異なりま
#### ルートパラメータへのアクセス {/* #accessing-route-parameters */}
-ルートパラメータは props ではなく、`useParams` フック経由で取得します:
+ルートパラメータは props ではなく、`useParams` hook 経由で取得します:
```diff
- import { RouteComponentProps } from 'react-router-dom';
@@ -299,7 +299,7 @@ Ionic React は React Router v6 を必須とし、v5 とは API が異なりま
#### RouteComponentProps の削除 {/* #routecomponentprops-removed */}
-`RouteComponentProps` 型と、その `history`、`location`、`match` props は React Router v6 では利用できません。代わりに同等のフックを使用してください:
+`RouteComponentProps` 型と、その `history`、`location`、`match` props は React Router v6 では利用できません。代わりに同等の hook を使用してください:
- `history` -> `useNavigate`(後述)または `useIonRouter`
- `match.params` -> `useParams`(上記で説明)
@@ -326,7 +326,7 @@ Ionic React は React Router v6 を必須とし、v5 とは API が異なりま
+ console.log(location.pathname);
```
-#### exact Prop の削除 {/* #exact-prop-removed */}
+#### exact prop の削除 {/* #exact-prop-removed */}
`exact` prop は不要になりました。React Router v6 のルートはデフォルトで正確にマッチします。サブパスにマッチさせるには、パスに `/*` サフィックスを付けてください:
@@ -335,7 +335,7 @@ Ionic React は React Router v6 を必須とし、v5 とは API が異なりま
+
```
-#### render Prop の削除 {/* #render-prop-removed */}
+#### render prop の削除 {/* #render-prop-removed */}
`render` prop は `element` prop に置き換えられました:
@@ -346,7 +346,7 @@ Ionic React は React Router v6 を必須とし、v5 とは API が異なりま
#### プログラムによるナビゲーション {/* #programmatic-navigation */}
-`useHistory` フックは `useNavigate` に置き換えられました:
+`useHistory` hook は `useNavigate` に置き換えられました:
```diff
- import { useHistory } from 'react-router-dom';
@@ -367,7 +367,7 @@ Ionic React は React Router v6 を必須とし、v5 とは API が異なりま
+ router.goBack();
```
-#### カスタム history Prop の削除 {/* #custom-history-prop-removed */}
+#### カスタム history prop の削除 {/* #custom-history-prop-removed */}
`history` prop は `IonReactRouter`、`IonReactHashRouter`、`IonReactMemoryRouter` から削除されました。React Router v6 のルーターはカスタム `history` オブジェクトを受け付けません。
@@ -444,9 +444,9 @@ npm install vue-router@5
`@ionic/vue-router` は Vue Router v5 を必須とします。Vue Router v4 はサポート対象外です。Vue Router v5 は Vue 本体に対する peer 要件も引き上げるため、サポートされる最小の Vue バージョンは `3.5.0` になります。
-Vue Router v5 は移行用リリースであり、Vue Router v4 利用者向けのランタイム破壊的変更はないため、ルート、ナビゲーションガード、`IonRouterOutlet` についてアプリコードの変更は不要です。
+Vue Router v5 は移行用リリースであり、Vue Router v4 利用者向けのランタイム破壊的変更はないため、ルート、navigation guard、`IonRouterOutlet` についてアプリコードの変更は不要です。
-#### ナビゲーションガード内の `next()` に対する非推奨警告 {/* #deprecation-warning-for-next-in-navigation-guards */}
+#### navigation guard 内の `next()` に対する非推奨警告 {/* #deprecation-warning-for-next-in-navigation-guards */}
Vue Router v5 は、`beforeRouteLeave`、`beforeRouteEnter`、`beforeRouteUpdate`、または `router.beforeEach` 内で `next()` を呼び出すと非推奨警告を出力します。コールバック形式は引き続き動作しますが、Vue Router v6 で削除されます。戻り値パターンへ移行してください:
@@ -485,16 +485,16 @@ npm install @ionic/core@latest
`@ionic/core` の `package.json` は `exports` フィールドを宣言するようになりました。これにより、Node ESM で `@ionic/core/components` や `@ionic/core/loader` のようなサブパスが `ERR_UNSUPPORTED_DIR_IMPORT` で失敗する問題が修正されます。厳密な ESM リゾルバは、パッケージが以前依存していたネストした `package.json` ファイルを読み取らず、`exports` フィールドがそれらを置き換えます。これは Angular 21 のデフォルト Vitest ビルダーや生の Node などのツールチェーンに影響します。
-`exports` フィールドはサポートされる公開エントリポイントを定義し、カバーしていないパスのインポートは失敗します。アプリが Node ESM、webpack 5、または TypeScript の `moduleResolution: "bundler"`、`"node16"`、`"nodenext"` を使い、未サポートのパスからインポートしている場合は、以下のいずれかのサブパスへ切り替えてください:
+`exports` フィールドはサポートされる公開 entry point を定義し、カバーしていないパスのインポートは失敗します。アプリが Node ESM、webpack 5、または TypeScript の `moduleResolution: "bundler"`、`"node16"`、`"nodenext"` を使い、未サポートのパスからインポートしている場合は、以下のいずれかのサブパスへ切り替えてください:
-| サブパス | 用途 |
-| --------------------------------- | ---------------------------------------------------- |
-| `@ionic/core` | ルートエントリ、コントローラ、アニメーションビルダー |
-| `@ionic/core/components` | カスタム要素のコンストラクタと共有ユーティリティ |
-| `@ionic/core/components/ion-*.js` | 単一コンポーネントのカスタム要素コンストラクタ |
-| `@ionic/core/loader` | `defineCustomElements` 遅延ローダー |
-| `@ionic/core/hydrate` | SSR ハイドレーションエントリ |
-| `@ionic/core/css/*.css` | グローバルスタイルシートとパレット |
+| サブパス | 用途 |
+| --------------------------------- | -------------------------------------------------- |
+| `@ionic/core` | ルートエントリ、controller、アニメーションビルダー |
+| `@ionic/core/components` | Custom Element の constructor と共有ユーティリティ |
+| `@ionic/core/components/ion-*.js` | 単一コンポーネントの Custom Element constructor |
+| `@ionic/core/loader` | `defineCustomElements` 遅延ローダー |
+| `@ionic/core/hydrate` | SSR hydration エントリ |
+| `@ionic/core/css/*.css` | グローバルスタイルシートとパレット |
`moduleResolution: "node"`(クラシック)および webpack 4 のアプリは、引き続きレガシーフィールド経由で解決されるため、変更は不要です。
@@ -538,7 +538,7 @@ Ionic 9 は Capacitor 7 以降を公式にサポートします。ネイティ
| `ion-img` event | ネイティブ `
![]()
` の代替 |
| --- | --- |
-| `ionImgWillLoad` | ネイティブの同等機能はありません。画像がビューにスクロールインし、遅延読み込みが始まったときに発火していました。ネイティブの `loading="lazy"` ではブラウザが内部で処理します。画像がビューポートに入ろうとするタイミングを知るには、[`IntersectionObserver`](https://developer.mozilla.org/en-US/docs/Web/API/IntersectionObserver) を使用してください。 |
+| `ionImgWillLoad` | ネイティブの同等機能はありません。画像がビューにスクロールインし、遅延読み込みが始まったときに発火していました。ネイティブの `loading="lazy"` ではブラウザが内部で処理します。画像が viewport に入ろうとするタイミングを知るには、[`IntersectionObserver`](https://developer.mozilla.org/en-US/docs/Web/API/IntersectionObserver) を使用してください。 |
| `ionImgDidLoad` | [`load`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/load_event)¹ |
| `ionError` | [`error`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/error_event)¹ |
@@ -568,11 +568,11 @@ Ionic 9 は Capacitor 7 以降を公式にサポートします。ネイティ
#### フローティングラベルの動作 {/* #input-floating-label-behavior */}
-フローティングラベルは、入力にスロット付きコンテンツが含まれていても自動ではフロートしなくなりました。ラベルは、入力にフォーカスがあるとき、または値があるときにのみフロートします。
+フローティングラベルは、入力に slot に配置した コンテンツが含まれていても自動ではフロートしなくなりました。ラベルは、入力にフォーカスがあるとき、または値があるときにのみフロートします。
#### 内部 DOM 構造の変更 {/* #input-internal-dom-structure-changes */}
-内部 DOM 構造は、スロット付きコンテンツ付きのフローティングラベルをサポートするために再編成されました。
+内部 DOM 構造は、slot にコンテンツを含む フローティングラベルをサポートするために再編成されました。
追加:
@@ -584,12 +584,12 @@ Ionic 9 は Capacitor 7 以降を公式にサポートします。ネイティ
- `.label-text-wrapper` は `.input-wrapper` から `.input-control` 内へ移動
- `.native-wrapper` は `.input-wrapper` から `.input-control` 内へ移動
-- Start スロットは `.native-wrapper` から `.input-start` 内へ移動
+- Start slot は `.native-wrapper` から `.input-start` 内へ移動
- Clear ボタンアイコンは `.native-wrapper` から `.input-end` 内へ移動
-- End スロットは `.native-wrapper` から `.input-end` 内へ移動
+- End slot は `.native-wrapper` から `.input-end` 内へ移動
- `.input-control` はラベルテキストとネイティブ `input` を含み、start/end コンテンツは専用ラッパーへ分離
-これらの構造変更を考慮してセレクタを更新してください:
+これらの構造変更を考慮して selector を更新してください:
```diff
-ion-input .input-wrapper .native-wrapper { }
@@ -610,14 +610,14 @@ Ionic 9 は Capacitor 7 以降を公式にサポートします。ネイティ
`ion-picker-legacy` と `ion-picker-legacy-column` コンポーネントは削除されました。
- `ion-picker-legacy` を `ion-picker` に、`ion-picker-legacy-column` を `ion-picker-column` に置き換えてください。`ion-picker` はオーバーレイではなくインラインで描画するため、以前の体験を維持するには `ion-modal` 内で提示してください。詳細は [Picker in Modal のドキュメント](../api/picker.mdx#picker-in-modal)を確認してください。
-- `pickerController` の使用をすべて削除してください。React を使用している場合は、`useIonPicker` フックの使用も削除してください。これらのコントローラベース API は削除されました。代わりに [Picker](../api/picker.mdx) コンポーネントを使用してください。
+- `pickerController` の使用をすべて削除してください。React を使用している場合は、`useIonPicker` hook の使用も削除してください。これらの controller ベース API は削除されました。代わりに [Picker](../api/picker.mdx) コンポーネントを使用してください。
- `PickerOptions`、`PickerButton`、`PickerColumn`、`PickerColumnOption` 型エクスポートの使用をすべて削除してください。これらの型はレガシーピッカーに関連しており、削除されました。
### Modal {/* #modal */}
#### `handleBehavior` のデフォルト変更 {/* #handlebehavior-default-changed */}
-`ion-modal` の `handleBehavior` プロパティのデフォルトは、`"none"` ではなく `"cycle"` になりました。ハンドルを表示するシートモーダルでは、ハンドルがフォーカス可能になり、アクティブ化(クリック、キーボード、またはスクリーンリーダー)するとシートが利用可能なブレークポイントを循環します。これはネイティブ iOS のシート動作と一致し、支援技術ユーザー向けにシートモーダルをデフォルトで操作可能に保ちます。
+`ion-modal` の `handleBehavior` プロパティのデフォルトは、`"none"` ではなく `"cycle"` になりました。ハンドルを表示するシートモーダルでは、ハンドルがフォーカス可能になり、アクティブ化(クリック、キーボード、またはスクリーンリーダー)するとシートが利用可能な breakpoint を循環します。これはネイティブ iOS のシート動作と一致し、支援技術ユーザー向けにシートモーダルをデフォルトで操作可能に保ちます。
ハンドルが inert であることに依存していたシートモーダルは、以前の動作を復元するために `handleBehavior="none"` を設定してください:
@@ -629,17 +629,17 @@ Ionic 9 は Capacitor 7 以降を公式にサポートします。ネイティ
#### ルーター統合の削除 {/* #router-integration-removed */}
-`ion-nav` は `ion-router` と統合しなくなりました。現在はスタンドアロンの命令型スタックナビゲーションコンポーネントであり、自身の API(`root`、`push`、`pop`、`setRoot` など)と `ion-nav-link` のみで駆動されます。
+`ion-nav` は `ion-router` と統合しなくなりました。現在は standalone の命令型スタックナビゲーションコンポーネントであり、自身の API(`root`、`push`、`pop`、`setRoot` など)と `ion-nav-link` のみで駆動されます。
これは、`ion-router` 内に `ion-nav` を置き(バニラ JavaScript プロジェクト)、ルーターによる駆動に依存していたアプリにのみ影響します。ページ内のローカルなスタックナビゲーションのために単独で `ion-nav` を使っている場合、変更は不要です。
次の動作は削除されました:
-- ルーターは `ion-nav` を発見・駆動しなくなりました。`ion-router` 内に `ion-nav` を置いても、ルーティングされたアウトレットにはなりません。
-- `ion-nav` のナビゲート(`push`、`pop`、`ion-nav-link`、またはスワイプで戻るジェスチャ経由)は URL を更新しなくなり、ルーターのナビゲーションガードも `ion-nav` の遷移では実行されません。
+- ルーターは `ion-nav` を発見・駆動しなくなりました。`ion-router` 内に `ion-nav` を置いても、ルーティングされた outlet にはなりません。
+- `ion-nav` のナビゲート(`push`、`pop`、`ion-nav-link`、またはスワイプで戻るジェスチャ経由)は URL を更新しなくなり、ルーターの navigation guard も `ion-nav` の遷移では実行されません。
- `setRouteId()` と `getRouteId()` メソッド、および `updateURL` nav オプションは削除されました。これらはルーター統合のためだけに存在していました。
-`ion-nav` に URL 更新を依存していた場合は、代わりに URL ベースのルーティングに `ion-router-outlet` を使用してください。`ion-route` 定義はそのままにし、アウトレット要素を入れ替えてください:
+`ion-nav` に URL 更新を依存していた場合は、代わりに URL ベースのルーティングに `ion-router-outlet` を使用してください。`ion-route` 定義はそのままにし、outlet 要素を入れ替えてください:
```diff
@@ -655,11 +655,11 @@ Ionic 9 は Capacitor 7 以降を公式にサポートします。ネイティ
### Router Outlet {/* #router-outlet */}
-`ion-router-outlet` は、アウトレットごとにスワイプで戻るジェスチャを制御する `swipeGesture` プロパティを公開するようになりました。このプロパティのデフォルトは `"ios"` モードで `true`、`"md"` モードで `false` です。
+`ion-router-outlet` は、outlet ごとにスワイプで戻るジェスチャを制御する `swipeGesture` プロパティを公開するようになりました。このプロパティのデフォルトは `"ios"` モードで `true`、`"md"` モードで `false` です。
#### `swipeBackEnabled` 設定の動作変更 {/* #swipebackenabled-config-behavior-change */}
-React と Vue では、`swipeBackEnabled` 設定オプションはアウトレットのマウント時に一度だけ読み取られるようになりました。実行時にこの設定値を動的に切り替えるアプリは、代わりに `swipeGesture` プロパティへ移行してください。
+React と Vue では、`swipeBackEnabled` 設定オプションは outlet のマウント時に一度だけ読み取られるようになりました。実行時にこの設定値を動的に切り替えるアプリは、代わりに `swipeGesture` プロパティへ移行してください。
**React:**
@@ -677,7 +677,7 @@ React と Vue では、`swipeBackEnabled` 設定オプションはアウトレ
#### スワイプで戻るの無効化 {/* #disabling-swipe-to-go-back */}
-特定のアウトレットでジェスチャを無効にするには、`swipeGesture` を `false` に設定してください:
+特定の outlet でジェスチャを無効にするには、`swipeGesture` を `false` に設定してください:
```tsx
@@ -710,11 +710,11 @@ React と Vue では、`swipeBackEnabled` 設定オプションはアウトレ
#### フローティングラベルの動作 {/* #select-floating-label-behavior */}
-フローティングラベルは、セレクトにスロット付きコンテンツが含まれていても自動ではフロートしなくなりました。ラベルは、セレクトにフォーカスがあるとき、または値があるときにのみフロートします。さらに、フローティングラベル使用時は、セレクトにフォーカスがあるときだけプレースホルダーが表示されます。
+フローティングラベルは、セレクトに slot に配置した コンテンツが含まれていても自動ではフロートしなくなりました。ラベルは、セレクトにフォーカスがあるとき、または値があるときにのみフロートします。さらに、フローティングラベル使用時は、セレクトにフォーカスがあるときだけプレースホルダーが表示されます。
#### 内部 DOM 構造の変更 {/* #select-internal-dom-structure-changes */}
-内部 DOM 構造は、スロット付きコンテンツ付きのフローティングラベルをサポートするために再編成されました。これにより、公開されているいくつかの shadow part の構造と位置が変わります。
+内部 DOM 構造は、slot にコンテンツを含む フローティングラベルをサポートするために再編成されました。これにより、公開されているいくつかの shadow part の構造と位置が変わります。
追加:
@@ -730,17 +730,17 @@ React と Vue では、`swipeBackEnabled` 設定オプションはアウトレ
- `.label-text-wrapper` は `part="label"` のままで、`.select-wrapper` から `.select-control` 内へ移動
- `.native-wrapper` は `part="container"` のままで、`.select-wrapper-inner` から `.select-control` 内へ移動
-- Start スロットは `.select-wrapper-inner` から `.select-start`(`part="start"`)内へ移動
-- End スロットは `.select-wrapper-inner` から `.select-end`(`part="end"`)内へ移動
+- Start slot は `.select-wrapper-inner` から `.select-start`(`part="start"`)内へ移動
+- End slot は `.select-wrapper-inner` から `.select-end`(`part="end"`)内へ移動
- `.select-icon` は `part="icon"` のままで、位置はラベル状態に依存します:
- start/end ラベルの場合、アイコンは `.native-wrapper` 内
- floating/stacked ラベルの場合、アイコンは `.select-end` 内
-公開された shadow part を対象とするセレクタを、新しい構造に合わせて更新してください:
+公開された shadow part を対象とする selector を、新しい構造に合わせて更新してください:
現在 `part="inner"` を対象にしている場合、その part は削除されました。それらのスタイルを、必要に応じて新しい part を対象にするよう更新してください。
-`part="label"`、`part="container"`、または `part="icon"` を対象にしている場合、part 名は変わりませんが、shadow DOM 内の位置が変わりました。これらの part の関係やレイアウトに依存するスタイルに影響する可能性があります。
+`part="label"`、`part="container"`、または `part="icon"` を対象にしている場合、part 名は変わりませんが、Shadow DOM 内の位置が変わりました。これらの part の関係やレイアウトに依存するスタイルに影響する可能性があります。
新しい構造ラッパーを対象にするには、新しい `part="start"`、`part="control"`、`part="end"` を使用してください。
@@ -748,11 +748,11 @@ React と Vue では、`swipeBackEnabled` 設定オプションはアウトレ
#### フローティングラベルの動作 {/* #textarea-floating-label-behavior */}
-フローティングラベルは、テキストエリアにスロット付きコンテンツが含まれていても自動ではフロートしなくなりました。ラベルは、テキストエリアにフォーカスがあるとき、または値があるときにのみフロートします。
+フローティングラベルは、テキストエリアに slot に配置した コンテンツが含まれていても自動ではフロートしなくなりました。ラベルは、テキストエリアにフォーカスがあるとき、または値があるときにのみフロートします。
#### 内部 DOM 構造の変更 {/* #textarea-internal-dom-structure-changes */}
-内部 DOM 構造は、スロット付きコンテンツ付きのフローティングラベルをサポートするために再編成されました。
+内部 DOM 構造は、slot にコンテンツを含む フローティングラベルをサポートするために再編成されました。
削除: `.textarea-wrapper-inner`
@@ -770,7 +770,7 @@ React と Vue では、`swipeBackEnabled` 設定オプションはアウトレ
- `.start-slot-wrapper` は `.textarea-wrapper-inner` から `.textarea-wrapper` へ移動し、`.textarea-start` に名称変更
- `.end-slot-wrapper` は `.textarea-wrapper-inner` から `.textarea-wrapper` へ移動し、`.textarea-end` に名称変更
-これらの構造変更を考慮してセレクタを更新してください:
+これらの構造変更を考慮して selector を更新してください:
```diff
-ion-textarea .textarea-wrapper-inner .native-wrapper { }
@@ -793,11 +793,11 @@ Material Design(`md` モード)のテキストエリアの最小高さは、
| default | `floating`, `stacked` | `56px` |
| `solid`, `outline` | any | `56px` |
-これらは最小値であり、テキストエリアが実際に描画されていた高さではありません。`start` または `end` スロットにコンテンツがあるテキストエリアは、すでに最小値より高かったため、変更の影響は異なります。たとえば、スロット付きアイコンとボタンがある `fill="solid"` のテキストエリアは、以前は `start` ラベルで `72px`、`floating` ラベルで `81px` で描画されていました。どちらも現在は `72px` なので、floating ラベルのケースは高くなるのではなく、以前より `9px` 短くなります。
+これらは最小値であり、テキストエリアが実際に描画されていた高さではありません。`start` または `end` slot にコンテンツがあるテキストエリアは、すでに最小値より高かったため、変更の影響は異なります。たとえば、slot に配置した アイコンとボタンがある `fill="solid"` のテキストエリアは、以前は `start` ラベルで `72px`、`floating` ラベルで `81px` で描画されていました。どちらも現在は `72px` なので、floating ラベルのケースは高くなるのではなく、以前より `9px` 短くなります。
`72px` はテキスト 2 行分より高いため、`md` モードでは `3` 未満の `rows` 値はテキストエリアの高さを変えなくなります。`rows="1"` と `rows="2"` はどちらも `72px` で描画されます。
-以前の高さに依存していた場合、または高さを `rows` で制御する必要がある場合は、最小高さを元に戻すよう上書きしてください。上書きはコンポーネント自身のスタイルより詳細度を高くする必要があるため、素の `ion-textarea` セレクタでは適用されません。詳細度を上げるために、テキストエリアにカスタムクラスを追加してください:
+以前の高さに依存していた場合、または高さを `rows` で制御する必要がある場合は、最小高さを元に戻すよう上書きしてください。上書きはコンポーネント自身のスタイルより詳細度を高くする必要があるため、素の `ion-textarea` selector では適用されません。詳細度を上げるために、テキストエリアにカスタムクラスを追加してください:
```css
/* Add a custom class to the textarea */
@@ -806,7 +806,7 @@ ion-textarea.custom {
}
```
-## アップグレードのヘルプが必要ですか? {/* #need-help-upgrading */}
+## アップグレードでお困りの場合 {/* #need-help-upgrading */}
破壊的変更の完全なリストについては、必ず [Ionic 9 破壊的変更ガイド](https://github.com/ionic-team/ionic-framework/blob/main/BREAKING.md#version-9x)を確認してください。このアップグレードガイドは、開発者による対応が必要な変更のみを扱います。
diff --git a/docs/utilities/animations.mdx b/docs/utilities/animations.mdx
index 2089f8ca093..de6bda7edff 100644
--- a/docs/utilities/animations.mdx
+++ b/docs/utilities/animations.mdx
@@ -36,7 +36,7 @@ Ionic Animations は、特定のフレームワークや Ionic アプリを必
}>
-Ionic CoreとJavaScriptを使用する開発者は、最新バージョンの`@ionic/core`をインストールする必要があります。
+Developers using Ionic Core and JavaScript should install the latest version of `@ionic/core`.
```javascript
import { createAnimation } from 'https://cdn.jsdelivr.net/npm/@ionic/core@latest/dist/esm/index.mjs';
@@ -53,7 +53,7 @@ const animation = createAnimation()
-Ionic CoreとTypeScriptを使用する開発者は、最新バージョンの`@ionic/core`をインストールする必要があります。
+Developers using Ionic Core and TypeScript should install the latest version of `@ionic/core`.
```tsx
import { createAnimation, Animation } from '@ionic/core';
@@ -69,7 +69,7 @@ const animation: Animation = createAnimation('')
-Angularを使用する開発者は、最新バージョンの`@ionic/angular`をインストールする必要があります。アニメーションは`AnimationController`の依存性注入を介して作成できます。
+Developers using Angular should install the latest version of `@ionic/angular`. Animations can be created via the `AnimationController` dependency injection.
```tsx
@@ -88,7 +88,7 @@ constructor(private animationCtrl: AnimationController) {
-Angularを使用する開発者は、最新バージョンの`@ionic/angular`をインストールする必要があります。アニメーションは`AnimationController`の依存性注入を介して作成できます。
+Developers using Angular should install the latest version of `@ionic/angular`. Animations can be created via the `AnimationController` dependency injection.
```tsx
@@ -107,7 +107,7 @@ constructor(private animationCtrl: AnimationController) {
-Reactを使用する開発者は、最新バージョンの`@ionic/react`をインストールする必要があります。Reactラッパーはベータ版です。問題があればGitHubで報告してください!
+Developers using React should install the latest version of `@ionic/react`. React wrappers are in beta. Please report any issues on GitHub!
```tsx
@@ -130,7 +130,7 @@ import { CreateAnimation, Animation } from '@ionic/react';
-Ionic Vueを使用する開発者は、最新バージョンの`@ionic/vue`をインストールする必要があります。
+Developers using Ionic Vue should install the latest version of `@ionic/vue`.
```javascript
import { createAnimation } from '@ionic/vue';
@@ -163,11 +163,11 @@ import Basic from '@site/static/usage/v9/animations/basic/index.mdx';
-## キーフレームアニメーション {/* #keyframe-animations */}
+## keyframe アニメーション {/* #keyframe-animations */}
-Ionic Animations では、キーフレームを使用してアニメーションの中間ステップを制御できます。ここでは任意の有効な CSS プロパティを使用でき、値として CSS 変数も使用できます。
+Ionic Animations では、keyframe を使用してアニメーションの中間ステップを制御できます。ここでは任意の有効な CSS プロパティを使用でき、値として CSS 変数も使用できます。
-キーフレームを記述する際、ハイフン付きの CSS プロパティはキャメルケースで記述する必要があります。たとえば、`border-radius`は`borderRadius`として記述する必要があります。これは`fromTo()`、`from()`、`to()`メソッドにも適用されます。
+keyframe では、ハイフンを含む CSS プロパティを camelCase で記述します。たとえば `border-radius` は `borderRadius` と書きます。これは `fromTo()`、`from()`、`to()` メソッドにも当てはまります。
import Keyframes from '@site/static/usage/v9/animations/keyframes/index.mdx';
@@ -175,7 +175,7 @@ import Keyframes from '@site/static/usage/v9/animations/keyframes/index.mdx';
上記の例では、カード要素は初期幅から`--width`変数で定義された幅に遷移し、その後最終的な幅に遷移します。
-各キーフレームオブジェクトには`offset`プロパティが含まれています。`offset`は、キーフレームステップを定義する 0 から 1 の間の値です。オフセット値は昇順でなければならず、繰り返すことはできません。
+各 keyframe オブジェクトには`offset`プロパティが含まれています。`offset`は、keyframe ステップを定義する 0 から 1 の間の値です。オフセット値は昇順でなければならず、繰り返すことはできません。
## グループ化されたアニメーション {/* #grouped-animations */}
@@ -187,13 +187,13 @@ import Group from '@site/static/usage/v9/animations/group/index.mdx';
-## Before/After フック {/* #before-and-after-hooks */}
+## Before/After hook {/* #before-and-after-hooks */}
-Ionic Animations は、アニメーションが実行される前とアニメーションが完了した後に要素を変更できるフックを提供します。これらのフックは、DOM の読み取りと書き込み、クラスやインラインスタイルの追加や削除に使用できます。
+Ionic Animations は、アニメーションが実行される前とアニメーションが完了した後に要素を変更できる hook を提供します。これらの hook は、DOM の読み取りと書き込み、クラスやインラインスタイルの追加や削除に使用できます。
-この例では、アニメーション開始前にカードの背景色を`75%`反転させるインラインフィルターを設定しています。アニメーションが終了すると、要素のボックスシャドウが`rgba(255, 0, 50, 0.4) 0px 4px 16px 6px`(赤いグロー)に設定され、インラインフィルターがクリアされます。ボックスシャドウを削除してフィルターを再度適用するには、アニメーションを停止する必要があります。
+この例では、アニメーション開始前にカードの背景色を`75%`反転させるインラインフィルターを設定しています。アニメーションが終了すると、要素の box-shadow が`rgba(255, 0, 50, 0.4) 0px 4px 16px 6px`(赤いグロー)に設定され、インラインフィルターがクリアされます。box-shadow を削除してフィルターを再度適用するには、アニメーションを停止する必要があります。
-フックの完全なリストについては、[Methods](#methods)を参照してください。
+hook の完全なリストについては、[Methods](#methods)を参照してください。
import BeforeAndAfterHooks from '@site/static/usage/v9/animations/before-and-after-hooks/index.mdx';
@@ -209,7 +209,7 @@ import Chain from '@site/static/usage/v9/animations/chain/index.mdx';
## ジェスチャーアニメーション {/* #gesture-animations */}
-Ionic Animations は、[Ionic Gestures](gestures.mdx)とシームレスに統合することで、強力なジェスチャーベースのアニメーションを作成する機能を開発者に提供します。
+Ionic Animations は、[Ionic Gestures](./gestures.mdx)とシームレスに統合することで、強力なジェスチャーベースのアニメーションを作成する機能を開発者に提供します。
以下の例では、カード要素をドラッグできるトラックを作成しています。`animation`オブジェクトはカード要素を左右に移動する処理を行い、`gesture`オブジェクトは`animation`オブジェクトに移動方向を指示します。
@@ -221,9 +221,9 @@ import Gesture from '@site/static/usage/v9/animations/gesture/index.mdx';
開発者は、CSS 変数を使用して、`prefers-reduced-motion`や`prefers-color-scheme`などのユーザー設定に合わせてアニメーションを調整することもできます。
-この方法は、初めてアニメーションを作成する際に、サポートされているすべてのブラウザで機能します。ほとんどのブラウザは、CSS 変数が変更されるとキーフレームアニメーションを動的に更新することもできます。
+この方法は、初めてアニメーションを作成する際に、サポートされているすべてのブラウザで機能します。ほとんどのブラウザは、CSS 変数が変更されると keyframe アニメーションを動的に更新することもできます。
-Safari は現在、キーフレームアニメーションの動的更新をサポートしていません。Safari でこのようなサポートが必要な開発者は、[MediaQueryList.addListener()](https://developer.mozilla.org/en-US/docs/Web/API/MediaQueryList/addListener)を使用できます。
+Safari は現在、keyframe アニメーションの動的更新をサポートしていません。Safari でこのようなサポートが必要な開発者は、[MediaQueryList.addListener()](https://developer.mozilla.org/en-US/docs/Web/API/MediaQueryList/addListener)を使用できます。
import PreferenceBased from '@site/static/usage/v9/animations/preference-based/index.mdx';
@@ -290,7 +290,7 @@ type AnimationBuilder = (baseEl: any, opts?: any) => Animation;
:::note
-`opts`は、カスタムアニメーションに固有の追加オプションです。たとえば、シートモーダルのエンターアニメーションには、現在のブレークポイントの情報が含まれます。
+`opts`は、カスタムアニメーションに固有の追加オプションです。たとえば、シートモーダルのエンターアニメーションには、現在の breakpoint の情報が含まれます。
:::
@@ -346,14 +346,14 @@ interface AnimationPlayOptions {
| `beforeStyles(styles: { [property: string]: any }): Animation` | アニメーション開始前に、アニメーション内のすべての要素に適用するスタイルのオブジェクトを追加します。 |
| `direction(direction?: AnimationDirection): Animation` | アニメーションの再生方向を設定します。 |
| `delay(delay?: number): Animation` | アニメーション開始の遅延をミリ秒で設定します。 |
-| `destroy(clearStyleSheets?: boolean): Animation` | アニメーションを破棄し、すべての要素、子アニメーション、キーフレームをクリアします。 |
+| `destroy(clearStyleSheets?: boolean): Animation` | アニメーションを破棄し、すべての要素、子アニメーション、keyframe をクリアします。 |
| `duration(duration?: number): Animation` | アニメーションの継続時間をミリ秒で設定します。 |
| `easing(easing?: string): Animation` | アニメーションのイージングを設定します。受け入れられるイージング値のリストについては、[Easing Effects](https://developer.mozilla.org/en-US/docs/Web/API/EffectTiming/easing#Value)を参照してください。 |
| `from(property: string, value: any): Animation` | アニメーションの開始スタイルを設定します。 |
| `fromTo(property: string, fromValue: any, toValue: any): Animation` | アニメーションの開始スタイルと終了スタイルを設定します。 |
| `fill(fill?: AnimationFill): Animation` | アニメーションの実行前後で、アニメーションが要素にスタイルを適用する方法を設定します。 |
| `iterations(iterations: number): Animation` | アニメーションサイクルが停止する前に再生される回数を設定します。 |
-| `keyframes(keyframes: any[]): Animation` | アニメーションのキーフレームを設定します。 |
+| `keyframes(keyframes: any[]): Animation` | アニメーションの keyframe を設定します。 |
| `onFinish(callback: (didComplete: boolean, animation: Animation): void, opts?: AnimationCallbackOptions): Animation` | アニメーション終了時に実行されるコールバックを追加します。 |
| `pause(): Animation` | アニメーションを一時停止します。 |
| `play(opts?: AnimationPlayOptions): Promise` | アニメーションを再生します。 |
diff --git a/docs/utilities/gestures.mdx b/docs/utilities/gestures.mdx
index 6ddc766b032..5fd8741e995 100644
--- a/docs/utilities/gestures.mdx
+++ b/docs/utilities/gestures.mdx
@@ -33,7 +33,7 @@ Ionic Gestures は、開発者がプラットフォームに依存しない方
}>
-Ionic CoreとJavaScriptを使用する開発者は、最新バージョンの`@ionic/core`をインストールする必要があります。
+Developers using Ionic Core and JavaScript should install the latest version of `@ionic/core`.
```javascript
import { createGesture } from 'https://cdn.jsdelivr.net/npm/@ionic/core@latest/dist/esm/index.mjs';
@@ -51,7 +51,7 @@ const gesture = createGesture({
-Ionic CoreとTypeScriptを使用する開発者は、最新バージョンの`@ionic/core`をインストールする必要があります。
+Developers using Ionic Core and TypeScript should install the latest version of `@ionic/core`.
```tsx
import { createGesture, Gesture } from '@ionic/core';
@@ -68,10 +68,10 @@ const gesture: Gesture = createGesture({
-Angularを使用する開発者は、最新バージョンの`@ionic/angular`をインストールする必要があります。ジェスチャーは`GestureController`の依存性注入を介して作成できます。
+Developers using Angular should install the latest version of `@ionic/angular`. Gestures can be created via the `GestureController` dependency injection.
-デフォルトでは、ジェスチャーのコールバックはNgZone内で実行されません。
-開発者は、ジェスチャーを作成する際に`runInsideAngularZone`パラメータを`true`に設定するか、コールバックを`NgZone.run()`呼び出しでラップできます。
+By default, gesture callbacks do not run inside of NgZone. Developers can either set the `runInsideAngularZone` parameter to `true` when creating a gesture,
+or they can wrap their callbacks in an `NgZone.run()` call.
```tsx
import { Gesture, GestureController } from '@ionic/angular/lazy';
@@ -92,10 +92,10 @@ constructor(private gestureCtrl: GestureController) {
-Angularを使用する開発者は、最新バージョンの`@ionic/angular`をインストールする必要があります。ジェスチャーは`GestureController`の依存性注入を介して作成できます。
+Developers using Angular should install the latest version of `@ionic/angular`. Gestures can be created via the `GestureController` dependency injection.
-デフォルトでは、ジェスチャーのコールバックはNgZone内で実行されません。
-開発者は、ジェスチャーを作成する際に`runInsideAngularZone`パラメータを`true`に設定するか、コールバックを`NgZone.run()`呼び出しでラップできます。
+By default, gesture callbacks do not run inside of NgZone. Developers can either set the `runInsideAngularZone` parameter to `true` when creating a gesture,
+or they can wrap their callbacks in an `NgZone.run()` call.
```tsx
import { Gesture, GestureController } from '@ionic/angular';
@@ -116,7 +116,7 @@ constructor(private gestureCtrl: GestureController) {
-React を使用する開発者は、最新バージョンの `@ionic/react` をインストールする必要があります。
+Developers using React should install the latest version of `@ionic/react`.
```tsx
import { createGesture, Gesture } from '@ionic/react';
@@ -133,7 +133,7 @@ const gesture: Gesture = createGesture({
-Ionic Vueを使用する開発者は、最新バージョンの`@ionic/vue`をインストールする必要があります。
+Developers using Ionic Vue should install the latest version of `@ionic/vue`.
```javascript
import { createGesture } from '@ionic/vue';
@@ -161,7 +161,7 @@ const gesture = createGesture({
import Basic from '@site/static/usage/v9/gestures/basic/index.mdx';
-この例では、アプリは`ion-content`要素でジェスチャーをリッスンします。ジェスチャーの移動が開始されると、`onStart`関数が呼び出され、`ion-card`にクラスが追加されて色付きのボックスシャドウが追加されます。ジェスチャーの移動が検出されると、`onMove`関数が呼び出され、アプリは`ion-card`内に現在のジェスチャー情報を出力します。最後に、ジェスチャーの移動が終了すると、`onEnd`関数が呼び出され、カスタムクラスが`ion-card`から削除されます。
+この例では、アプリは`ion-content`要素でジェスチャーをリッスンします。ジェスチャーの移動が開始されると、`onStart`関数が呼び出され、`ion-card`にクラスが追加されて色付きの box-shadow が追加されます。ジェスチャーの移動が検出されると、`onMove`関数が呼び出され、アプリは`ion-card`内に現在のジェスチャー情報を出力します。最後に、ジェスチャーの移動が終了すると、`onEnd`関数が呼び出され、カスタムクラスが`ion-card`から削除されます。
@@ -175,7 +175,7 @@ import DoubleClick from '@site/static/usage/v9/gestures/double-click/index.mdx';
## ジェスチャーアニメーション {/* #gesture-animations */}
-ジェスチャーアニメーションの実装ガイドについては、[Ionic Animations を使用したジェスチャーアニメーション](animations.mdx#gesture-animations)を参照してください。
+ジェスチャーアニメーションの実装ガイドについては、[Ionic Animations を使用したジェスチャーアニメーション](./animations.mdx#gesture-animations)を参照してください。
## 型 {/* #types */}
diff --git a/docs/vue/add-to-existing.mdx b/docs/vue/add-to-existing.mdx
index d61318e4ae5..5433b3aa89c 100644
--- a/docs/vue/add-to-existing.mdx
+++ b/docs/vue/add-to-existing.mdx
@@ -1,6 +1,6 @@
---
title: Add to Existing Vue Project
-description: 'Learn how to add Ionic Vue to your existing Vue project. Step-by-step guide for integrating Ionic components and features into an existing Vue application.'
+description: '既存の Vue プロジェクトに Ionic Vue を追加し、Ionic のコンポーネントと機能を組み込む手順を説明します。'
sidebar_label: Add to Existing
---
@@ -11,11 +11,11 @@ import DocsCards from '@components/global/DocsCards';
Add Ionic Vue to Existing Project: Integration Guide
-This guide covers how to add Ionic Vue to an existing Vue project. If you're looking to start a new project from scratch, check out the [Ionic Vue Quickstart](./quickstart.mdx) guide. For an overview of how Ionic Vue works with Vue, including version support and tooling, check out the [Ionic Vue Overview](./overview.mdx).
+このガイドでは、既存の Vue プロジェクトに Ionic Vue を追加する方法について説明しています。もし、ゼロから新しいプロジェクトを始めたい場合は、[Ionic Vue クイックスタートガイド](./quickstart.mdx)をご覧ください。Ionic Vue が Vue とどのように連携しているか、バージョンサポートやツールについては、[Ionic Vue の概要](./overview.mdx)をご覧ください。
:::tip
-This guide uses JavaScript examples. If you're using TypeScript, the setup process is the same, but you'll use `.ts` file extensions instead of `.js`.
+このガイドでは、JavaScript の例が使用されています。TypeScript を使用している場合でも、設定手順は同じですが、ファイル拡張子は`.js`ではなく`.ts`になります。
:::
@@ -23,11 +23,11 @@ This guide uses JavaScript examples. If you're using TypeScript, the setup proce
:::info
-This guide follows the structure of a Vue app created with `create-vue` (which uses Vite). If you started your Vue app using a different tool (such as Vue CLI), your file structure and setup may differ.
+このガイドでは `create-vue`(Vite を使用)で作成した Vue アプリの構成に従います。Vue CLI など別のツールで作成したアプリでは、ファイル構成や設定が異なる場合があります。
:::
-Follow these steps to add Ionic Vue to your existing Vue project:
+以下の手順に従って、Ionic Vue を既存の Vue プロジェクトに追加してください。
#### 1. Install the Packages {/* #1-install-the-packages */}
@@ -37,7 +37,7 @@ npm install @ionic/vue @ionic/vue-router vue-router
#### 2. Configure Ionic Vue {/* #2-configure-ionic-vue */}
-Update `src/main.js` to include `IonicVue` and import the required Ionic Framework stylesheets:
+`src/main.js`を更新し、`IonicVue`を追加し、必要な Ionic Framework のスタイルシートをインポートしてください。
```javascript title="src/main.js"
import { createApp } from 'vue';
@@ -58,15 +58,15 @@ createApp(App).use(IonicVue).mount('#app');
:::info
-While `core.css` is required, `normalize.css`, `structure.css`, and `typography.css` are recommended but not required. They normalize cross-browser differences, ensure proper scrolling behavior, and provide consistent typography and form styling. Without them, you may need to handle these concerns yourself. For more details, refer to [Global Stylesheets](../layout/global-stylesheets.mdx).
+`core.css` は必須です。`normalize.css`、`structure.css`、`typography.css` は任意ですが、利用を推奨します。ブラウザーごとの表示の違いを整え、スクロール動作を保ち、文字やフォームのスタイルを統一します。これらを読み込まない場合は、自分で対応が必要になることがあります。詳細は [Global Stylesheets](../layout/global-stylesheets.mdx) を参照してください。
:::
## Using Individual Components {/* #using-individual-components */}
-After completing the setup above, you can start using Ionic components in your existing Vue app. Here's an example of how to use them:
+上記の設定を完了した後、既存の Vue アプリで Ionic コンポーネントを使用し始めることができます。以下は、Ionic コンポーネントを使用する方法の例です。
-Update `src/App.vue` to the following:
+`src/App.vue`を以下のように更新してください。
```vue title="src/App.vue"
@@ -79,15 +79,15 @@ import { IonButton, IonDatetime } from '@ionic/vue';
```
-Visit the [components](../components.mdx) page for all of the available Ionic components.
+利用可能なすべての Ionic コンポーネントについては、[コンポーネント](../components.mdx)ページをご覧ください。
## Using Ionic Pages {/* #using-ionic-pages */}
-If you want to use Ionic pages with full navigation and page transitions, follow these additional setup steps.
+もし、Ionic ページを使い、完全なナビゲーション機能やページ間の遷移機能を利用したい場合は、以下の手順に従って設定を行ってください。
#### 1. Add Additional Ionic Framework Stylesheets {/* #1-add-additional-ionic-framework-stylesheets */}
-Update the imported stylesheets in `src/main.js`:
+`src/main.js`内のインポートされたスタイルシートを更新してください。
```javascript title="src/main.js"
/* Core CSS required for Ionic components to work properly */
@@ -107,18 +107,18 @@ import '@ionic/vue/css/flex-utils.css';
import '@ionic/vue/css/display.css';
```
-These stylesheets set up the overall page structure and provide [CSS utilities](../layout/css-utilities.mdx) for faster development. Some stylesheets are optional. For details on which stylesheets are required, check out [Global Stylesheets](../layout/global-stylesheets.mdx).
+これらのスタイルシートは、ページの構造を定義し、より迅速な開発を可能にするための[CSS ユーティリティ](../layout/css-utilities.mdx)を提供しています。一部のスタイルシートはオプションです。どのスタイルシートが必要かについては、[グローバルスタイルシート](../layout/global-stylesheets.mdx)をご覧ください。
#### 2. Set up Theming {/* #2-set-up-theming */}
-Create a `src/theme/variables.css` file with the following content:
+`src/theme/variables.css`というファイルを以下の内容で作成してください:
```css title="src/theme/variables.css"
/* For information on how to create your own theme, please refer to:
https://ionicframework.com/docs/theming/ */
```
-Then, import the file and the dark palette stylesheet in `src/main.js`:
+次に、ファイルと、暗い色調のパレットスタイルシートを `src/main.js` にインポートします。
```javascript title="src/main.js"
import { createApp } from 'vue';
@@ -159,11 +159,11 @@ import './theme/variables.css';
createApp(App).use(IonicVue).mount('#app');
```
-The `variables.css` file can be used to create custom Ionic Framework themes. The `dark.system.css` import enables [dark mode support](../theming/dark-mode.mdx) for your Ionic app when the system is set to prefer a dark appearance. You can customize the theming behavior by uncommenting different dark palette imports or adding custom CSS variables to `theme/variables.css`.
+`variables.css` ファイルでは、Ionic Framework のカスタムテーマを作成できます。`dark.system.css` をインポートすると、システムが暗い外観を優先する設定のときに Ionic アプリが[ダークモード](../theming/dark-mode.mdx) になります。別のダークパレットのインポートをコメント解除したり、`theme/variables.css` にカスタム CSS 変数を追加したりしてテーマを調整できます。
#### 3. Update the App Component {/* #3-update-the-app-component */}
-Update `src/App.vue` to the following:
+`src/App.vue`を以下のように更新してください。
```vue title="src/App.vue"
@@ -179,7 +179,7 @@ import { IonApp, IonRouterOutlet } from '@ionic/vue';
#### 4. Create a Home Page {/* #4-create-a-home-page */}
-Create a new file at `src/views/HomePage.vue` with the following:
+`src/views/HomePage.vue`というファイルを新しく作成し、以下の内容を記述してください。
```vue title="src/views/HomePage.vue"
@@ -247,7 +247,7 @@ import { IonContent, IonHeader, IonPage, IonTitle, IonToolbar } from '@ionic/vue
#### 5. Set up Routing {/* #5-set-up-routing */}
-Add a file at `src/router/index.js` defining the routes:
+`src/router/index.js`というファイルに、ルートを定義するコードを追加してください。
```javascript title="src/router/index.js"
import { createRouter, createWebHistory } from '@ionic/vue-router';
@@ -273,7 +273,7 @@ const router = createRouter({
export default router;
```
-Update `src/main.js` to include the router:
+`src/main.js`を更新し、ルーターを追加してください。
```javascript title="src/main.js"
import { createApp } from 'vue';
@@ -319,16 +319,16 @@ router.isReady().then(() => {
});
```
-You're all set! Your Ionic Vue app is now configured with full Ionic page support. Run `npm run dev` to start your development server and view your app.
+すべての準備が整いました!これで、Ionic Vue アプリは、完全な Ionic ページ機能をサポートするように設定されました。開発サーバーを起動するには、`npm run dev`を実行してください。そうすると、アプリを確認できます。
## Next Steps {/* #next-steps */}
-Now that you have Ionic Vue integrated into your project, check out:
+もう、Ionic Vue を自分のプロジェクトに統合したわけですから、以下の点を確認してみてください:
- Discover how to handle routing and navigation in Ionic Vue apps using the Vue Router.
+ Vue Router を使った Ionic Vue アプリのルーティングとナビゲーションを学びます。
@@ -336,11 +336,11 @@ Now that you have Ionic Vue integrated into your project, check out:
- Learn how to customize the look and feel of your app with Ionic's powerful theming system.
+ Ionic のテーマ設定を使ってアプリの外観や操作感をカスタマイズする方法を学びます。
- Explore how to access native device features and deploy your app to iOS, Android, and the web with Capacitor.
+ Capacitor で端末機能を使い、iOS、Android、Web にデプロイする方法を学びます。
diff --git a/docs/vue/build-options.mdx b/docs/vue/build-options.mdx
index f55c6397cb4..89a97ac3e57 100644
--- a/docs/vue/build-options.mdx
+++ b/docs/vue/build-options.mdx
@@ -1,6 +1,6 @@
---
title: Vue Build Options
-description: 'Learn about Vue build configuration options including component registration strategies, prefetching, and build optimization for Ionic Vue apps.'
+description: 'Ionic Vue アプリのコンポーネント登録、prefetch、ビルドの最適化に関する設定を説明します。'
sidebar_label: Build Options
---
@@ -11,17 +11,17 @@ sidebar_label: Build Options
import DocsCard from '@components/global/DocsCard';
import DocsCards from '@components/global/DocsCards';
-Vue gives you several tools to fine tune your application. This guide covers the build options that are most relevant to Ionic Framework.
+Vue には、アプリケーションを微調整するためのいくつかのツールがあります。このガイドでは、Ionic Framework に最も関連するビルドオプションについて説明します。
## Component Registration Strategies {/* #component-registration-strategies */}
### Local Component Registration (Recommended) {/* #local-component-registration-recommended */}
-By default, Ionic Framework components are registered locally. With local registration, these components are imported and provided to each Vue component you want to use them in. This is the recommended approach as it allows lazy loading and treeshaking to work properly with Ionic Framework components.
+デフォルトでは、Ionic Framework コンポーネントはローカル登録されます。使用する Vue コンポーネントごとに、必要な Ionic Framework コンポーネントをインポートして登録します。遅延読み込みと tree shaking が正しく機能するため、この方法を推奨します。
-The one downside to this approach is that it may be tedious to re-import your Ionic Framework components multiple times. However, we feel that the performance benefits you receive in exchange are worth it.
+この方法の欠点は、Ionic Framework のコンポーネントを何度も再インポートする必要がある点です。しかし、その代わりに得られる性能の向上は、その手間を価値があるものにしてくれます。
-Also note that locally registered components are not available in subcomponents. You will need to re-import the Ionic Framework components you would like to use in your subcomponent.
+また、ローカルで登録されているコンポーネントは、サブコンポーネントでは利用できません。そのため、サブコンポーネントで使用したい Ionic Framework のコンポーネントを再度インポートする必要があります。
ローカルコンポーネント登録の仕組みについて見ていきましょう:
@@ -40,17 +40,17 @@ import SubComponent from '@/components/SubComponent.vue';
```
-In the example above, we are using the `IonPage` and `IonContent` components. To use them, we import them from `@ionic/vue`. From there, we can use the components in our template.
+上の例では、`IonPage`と`IonContent`コンポーネントを使用しています。これらを使用するには、`@ionic/vue`からそれらをインポートする必要があります。そうすれば、テンプレート内でこれらのコンポーネントを利用することができます。
-Note that since we are registering these components locally, neither `IonPage` nor `IonContent` will be available in `SubComponent` unless we register them there as well.
+ここでの登録はローカル登録なので、`SubComponent` でも `IonPage` と `IonContent` を使用するには、そちらでも登録する必要があります。
詳しくは、[ローカル登録 Vue ドキュメント](https://v3.vuejs.org/guide/component-registration.html#local-registration)を参照してください。
### Global Component Registration {/* #global-component-registration */}
-The other option for registering components is to use global registration. Global registration involves importing the components you want to use in `main.ts` and calling the `component` method on your Vue app instance.
+コンポーネントを登録する別の方法として、グローバル登録を利用することがあります。グローバル登録とは、`main.ts`に使用したいコンポーネントをインポートし、Vue アプリケーションのインスタンス上で`component`メソッドを呼び出すという方法です。
-While this makes it easier to add Ionic Framework components to your Vue app, global registration often is not ideal. To quote the Vue documentation: "If you're using a build system like Webpack, globally registering all components means that even if you stop using a component, it could still be included in your final build. This unnecessarily increases the amount of JavaScript your users have to download".
+グローバル登録を使うと Vue アプリに Ionic Framework コンポーネントを追加しやすくなりますが、欠点もあります。Vue のドキュメントでは「Webpack などのビルドシステムで全コンポーネントをグローバル登録すると、使わなくなったコンポーネントが最終ビルドに含まれる場合があります。その結果、ユーザーがダウンロードする JavaScript が不必要に増えます」と説明しています。
グローバルコンポーネント登録の仕組みについて見ていきましょう:
@@ -81,7 +81,7 @@ import SubComponent from '@/components/SubComponent.vue';
```
-In the example above, we are using the `IonPage` and `IonContent` components. To use them, we first import them from `@ionic/vue` in `main.ts`. From there, we call the `component` method on our app instance and pass it the tag name as well as the component definition. After we do that, we can use the components in the rest of our application without having to import them into each Vue component.
+上の例では、`IonPage`と`IonContent`コンポーネントを使用しています。これらを使用するには、まず`main.ts`ファイルから`@ionic/vue`モジュールからこれらのコンポーネントをインポートします。その後、アプリケーションインスタンス上で`component`メソッドを呼び出し、コンポーネントの名前と定義を渡します。そうすると、その後は、各 Vue コンポーネントにインポートする必要なく、コンポーネントをアプリケーション内で利用できます。
詳しくは、[グローバル登録 Vue ドキュメント](https://v3.vuejs.org/guide/component-registration.html#global-registration)を参照してください。
@@ -89,9 +89,9 @@ In the example above, we are using the `IonPage` and `IonContent` components. To
### Prefetching Application JavaScript {/* #prefetching-application-javascript */}
-By default, the Vue CLI will automatically generate prefetch hints for the JavaScript in your application. Prefetching utilizes the browser idle time to download documents that the user might visit in the near future. When the user visits a page that requires the prefetched document, it can be served quickly from the browser's cache.
+デフォルトでは、Vue CLI がアプリの JavaScript 用の prefetch ヒントを自動生成します。prefetch はブラウザーのアイドル時間を利用して、ユーザーが近いうちに開く可能性のあるドキュメントをダウンロードします。そのドキュメントが必要なページに移動すると、ブラウザーのキャッシュからすばやく表示できます。
-Prefetching consumes bandwidth, so if you have a large app, you may want to disable it. You can do this by modifying or creating your `vue.config.js` file:
+prefetch は帯域幅を消費するため、アプリのサイズが大きい場合は無効にすることも検討してください。無効にするには、`vue.config.js` を編集するか、新規作成して次の設定を追加します。
**vue.config.js**
@@ -103,4 +103,4 @@ module.exports = {
};
```
-The configuration above will prevent all files from being prefetched and, instead, will be loaded when they are needed. You can also select certain chunks to prefetch. Check out the [Vue CLI Docs on Prefetching](https://cli.vuejs.org/guide/html-and-static-assets.html#prefetch) for more examples.
+この設定では、すべてのファイルを事前に読み込む代わりに、必要になった時点で読み込みます。特定のチャンクだけを prefetch することもできます。他の例は [Vue CLI ドキュメントの Prefetching](https://cli.vuejs.org/guide/html-and-static-assets.html#prefetch) を参照してください。
diff --git a/docs/vue/lifecycle.mdx b/docs/vue/lifecycle.mdx
index 6c26ad7291c..514314a151e 100644
--- a/docs/vue/lifecycle.mdx
+++ b/docs/vue/lifecycle.mdx
@@ -1,15 +1,15 @@
---
-description: 'Use the Ionic Framework lifecycle events, such as ionViewWillEnter and ionViewDidLeave, in an Ionic Vue app with the Composition API.'
-sidebar_label: ライフサイクル
+sidebar_label: Lifecycle
+description: 'Ionic Vue アプリの Composition API で、ionViewWillEnter や ionViewDidLeave など Ionic の lifecycle event を使う方法を説明します。'
---
-# Vue のライフサイクル
+# Vue の lifecycle
-このガイドでは、Ionic Framework のライフサイクルイベントを Ionic Vue アプリケーションで使用する方法について説明します。
+このガイドでは、Ionic Framework の lifecycle event を Ionic Vue アプリケーションで使用する方法について説明します。
-## Ionic Framework のライフサイクルメソッド {/* #ionic-framework-lifecycle-methods */}
+## Ionic Framework の lifecycle method {/* #ionic-framework-lifecycle-methods */}
-Ionic Framework はアプリで使えるいくつかのライフサイクルメソッドを提供します:
+Ionic Framework はアプリで使えるいくつかの lifecycle method を提供します:
| イベント名 | 説明 |
| ------------------ | ------------------------------------------------------------------------ |
@@ -18,9 +18,9 @@ Ionic Framework はアプリで使えるいくつかのライフサイクルメ
| `ionViewWillLeave` | コンポーネントを離脱するアニメーションが **はじまる時に** 発火します。 |
| `ionViewDidLeave` | コンポーネントを離脱するアニメーションが **終了した時に** 発火します。 |
-これらのライフサイクルは、ルーターによって直接マッピングされたコンポーネントに対してのみ呼び出されます。つまり、`/pageOne`が`PageOneComponent`にマッピングされた場合、Ionic ライフサイクルは`PageOneComponent`で呼び出されますが、`PageOneComponent`がレンダリングする子コンポーネントでは呼び出されません。
+これらの lifecycle は、ルーターによって直接マッピングされたコンポーネントに対してのみ呼び出されます。つまり、`/pageOne`が`PageOneComponent`にマッピングされた場合、Ionic lifecycle は`PageOneComponent`で呼び出されますが、`PageOneComponent`がレンダリングする子コンポーネントでは呼び出されません。
-ライフサイクルは、Vue のライフサイクルメソッドと同じように、Vue コンポーネントのルートで関数として定義されます:
+lifecycle は、Vue の lifecycle method と同じように、Vue コンポーネントのルートで関数として定義されます:
```vue
```
-以前に Ionic Framework を使ったことがある人なら、このことをよく知っているはずです。`ion-tabs` コンポーネントを作成し、 `ion-tab-bar` を提供します。`ion-tab-bar` は `ion-tab-button` コンポーネントを提供し、それぞれにルータの設定の対応するタブに関連付けられた `tab` プロパティがあります。
+Ionic Framework でアプリを作ったことがあれば、おなじみの構成です。`ion-tabs` コンポーネントを作成し、`ion-tab-bar` を配置します。`ion-tab-bar` 内の各 `ion-tab-button` は、`tab` プロパティでルーター設定の対応するタブに関連付けられます。また、`ion-router-outlet` を配置して、`ion-tabs` が各タブのビューを描画する outlet として使います。
-### タブ内の子ルート {/* #how-tabs-in-ionic-work */}
+### Ionic のタブの仕組み {/* #how-tabs-in-ionic-work */}
-Each tab in Ionic is treated as an individual navigation stack. This means if you have three tabs in your application, each tab has its own navigation stack. Within each stack you can navigate forwards (push a view) and backwards (pop a view).
+Ionic では、各タブは独立したナビゲーションスタックとして扱われます。つまり、アプリケーション内に 3 つのタブがある場合、各タブにはそれぞれ独自のナビゲーションスタックがあります。各スタック内では、前に進む(ビューをプッシュする)ことも、後ろに戻ることもできます。
-This behavior is important to note as it is different than most tab implementations that are found in other web based UI libraries. Other libraries typically manage tabs as one single history stack.
+他の Web UI ライブラリに多いタブの実装とは動作が異なる点に注意してください。一般に、他のライブラリではすべてのタブを 1 つの履歴スタックで管理します。
Ionic は開発者がモバイルアプリを作るのを助けることに重点を置いているため、Ionic のタブはネイティブのモバイルタブにできるだけ近づくよう設計されています。その結果、Ionic のタブには他の UI ライブラリのタブ実装とは異なる挙動がある場合があります。これらの違いについて詳しく知りたい場合は続きをお読みください。
### Child Routes within Tabs {/* #child-routes-within-tabs */}
-When adding additional routes to tabs you should write them as sibling routes with the parent tab as the path prefix. The example below defines the `/tabs/tab1/view` route as a sibling of the `/tabs/tab1` route. Since this new route has the `tab1` prefix, it will be rendered inside of the `Tabs` component, and Tab 1 will still be selected in the `ion-tab-bar`.
+タブにルートを追加するときは、親タブのパスをプレフィックスとする兄弟ルートとして定義します。次の例では、`/tabs/tab1/view` を `/tabs/tab1` の兄弟ルートとして定義しています。新しいルートには `tab1` プレフィックスがあるため、`Tabs` コンポーネント内に描画され、`ion-tab-bar` では Tab 1 が選択されたままになります。
```tsx
const routes: RouteRecordRaw[] = [
@@ -446,19 +446,19 @@ const routes: RouteRecordRaw[] = [
### Switching Between Tabs {/* #switching-between-tabs */}
-Since each tab is its own navigation stack, it is important to note that these navigation stacks should never interact. This means that there should never be a button in Tab 1 that routes a user to Tab 2. In other words, tabs should only be changed by the user tapping a tab button in the tab bar.
+各タブは、それ自体が独立したナビゲーションスタックです。したがって、これらのナビゲーションスタックが互いに干渉してはいけない点に注意が必要です。つまり、タブ 1 内に、ユーザーをタブ 2 に移動させるボタンは存在してはいけません。言い換えれば、タブの切り替えは、タブバー内のタブボタンをタップすることによってのみ行われるべきです。
-A good example of this in practice is the iOS App Store and Google Play Store mobile applications. These apps both provide tabbed interfaces, but neither one ever routes the user across tabs. For example, the "Games" tab in the iOS App Store app never directs users to the "Search" tab and vice versa.
+実例として、iOS の App Store と Google Play ストアのモバイルアプリがあります。どちらもタブを使いますが、ユーザーを別のタブに移動させることはありません。たとえば iOS の App Store では「Games」タブから「Search」タブに遷移することはなく、その逆もありません。
タブでよくあるいくつかの間違いについて説明しましょう。
-**A Settings Tab That Multiple Tabs Reference**
+**複数のタブから参照する Settings タブ**
-A common practice is to create a Settings view as its own tab. This is great if developers need to present several nested settings menus. However, other tabs should never try to route to the Settings tab. As we mentioned above, the only way that the Settings tab should be activated is by a user tapping the appropriate tab button.
+Settings ビューを独立したタブにすると、設定メニューに複数の階層があるときに便利です。ただし、他のタブから Settings タブにルーティングしないでください。前述のとおり、Settings タブを開くのはユーザーがそのタブボタンをタップしたときだけです。
-If you find that your tabs need to reference the Settings tab, we recommend making the Settings view a modal by using `ion-modal`. This is a practice found in the iOS App Store app. With this approach, any tab can present the modal without breaking the mobile tabs pattern of each tab being its own stack.
+複数のタブから「Settings」タブを開く必要がある場合は、`ion-modal` で「Settings」ビューをモーダルとして表示することを推奨します。iOS の App Store アプリでも採用されている方法です。各タブが独立したスタックを保ったまま、どのタブからでもモーダルを開けます。
-The example below shows how the iOS App Store app handles presenting an "Account" view from multiple tabs. By presenting the "Account" view in a modal, the app can work within the mobile tabs best practices to show the same view across multiple tabs.
+次の例は、iOS の App Store アプリが複数のタブから「Account」ビューを表示する方法を示しています。「Account」をモーダルで開くことで、モバイルのタブのベストプラクティスに沿って、どのタブからも同じビューを表示できます。