Skip to content

「オプション API」の訳 #589

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 27, 2021

Conversation

naokie
Copy link
Member

@naokie naokie commented Nov 26, 2021

Description of Problem

#557 (comment)
こちらのレビューでもあったように、
Options API と Composition API を対比して書かれるケースが今後も増えてくるはずで、
現状「オプション API」となっている箇所を一貫して「Options API」に修正します。

Proposed Solution

以下のように抽出した対象を置換します。

~/s/g/n/ja.vuejs.org (lang-ja)> rg 'オプション api' -i
src/api/composition-api.md
14:  オプション API を使うときの `this.$props` と同様に、`props` オブジェクトには明示的に宣言されたプロパティのみが含まれます。また、すべての宣言されたプロパティのキーは、親コンポーネントから渡されたかどうかに関わらず `props` オブジェクトに存在します。宣言されていない省略可能なプロパティは `undefined` という値になります。
152:- **オプション API のライフサイクルオプションと Composition API のマッピング**

src/api/options-api.md
1:# オプション API
3:オプション API には、次のようなセクションがあります:

src/guide/composition-api-introduction.md
60:![Vue オプション API: オプションの種類によってグループ分けされたコード](/images/options-api.png)
245:オプション API に比べて Composition API の機能を完全にするには、ライフサイクルフックを `setup` の中に登録する必要があります。これは Vue から提供されるいくつかの新しい関数のおかげで可能になりました。 Composition API におけるライフサイクルフックはオプション API と同様の名称ですが、`on` というプレフィックスが付いています。例: `mounted` は `onMounted` のようになっています。
295:**以下はオプション API と同様です:**

src/guide/typescript-support.md
117:## オプション API とともに使用する

src/guide/migration/array-refs.md
17:オプション API を使う場合

src/guide/composition-api-setup.md
197:**`setup()` 内では、`this` は現在のアクティブなインスタンスへの参照にはなりません。** `setup()` は他のコンポーネントオプションが解決される前に呼び出されるので、`setup()` 内の `this` は他のオプション内の `this` とは全く異なる振る舞いをします。 これは、`setup()` を他のオプション API と一緒に使った場合に混乱を引き起こす可能性があります。

src/guide/composition-api-lifecycle-hooks.md
14:| オプション API      | `setup` 内のフック   |

Additional Information

@naokie naokie requested a review from kazupon November 26, 2021 10:23
@netlify
Copy link

netlify bot commented Nov 26, 2021

✔️ Deploy Preview for vuejs-v3-ja-doc-preview ready!

🔨 Explore the source changes: 61acdc5

🔍 Inspect the deploy log: https://app.netlify.com/sites/vuejs-v3-ja-doc-preview/deploys/61a0b5aff629f800089a338c

😎 Browse the preview: https://deploy-preview-589--vuejs-v3-ja-doc-preview.netlify.app

@naokie naokie merged commit 79dbe09 into vuejs-jp:lang-ja Nov 27, 2021
@naokie naokie deleted the hotfix/usage-options-api branch November 27, 2021 05:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant