-
Notifications
You must be signed in to change notification settings - Fork 140
docs: guide/zoneless.md
の翻訳
#1015
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
Conversation
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
翻訳ありがとうございます!コメントした部分の修正をお願いします 🙇
|
||
The API for enabling Zoneless is currently experimental. Neither the shape, nor the underlying behavior is stable and can change | ||
in patch versions. There are known feature gaps, including the lack of an ergonomic API which prevents the application from serializing too early with Server Side Rendering. | ||
Zonelessを有効にするためのAPIは現在、実験的機能です。その仕様や根本的な挙動は安定しておらず、パッチバージョンで変更される可能性があります。サーバーサイドレンダリングでアプリケーションが早期にシリアライズされるのを防ぐための使いやすいAPIが存在しないことが挙げられます。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
改行数がズレていますので適当なところで改行を入れてください
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"There are known feature gaps, " が翻訳されていない?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
修正しました!
loaded via the `polyfills` option in `angular.json`, both in the `build` and `test` targets. Remove `zone.js` | ||
and `zone.js/testing` from both to remove it from the build. Projects which use an explicit `polyfills.ts` file | ||
should remove `import 'zone.js';` and `import 'zone.js/testing';` from the file. | ||
Zonelessアプリケーションは、バンドルサイズを削減するために、ビルドからZoneJSを完全に削除する必要があります。ZoneJSは通常、`angular.json`の`polyfills`オプションを介して、`build`と`test`の両方のターゲットでロードされます。ビルドから削除するには、両方から`zone.js`と`zone.js/testing`を削除します。明示的な`polyfills.ts`ファイルを使用するプロジェクトは、ファイルから`import 'zone.js';`と`import 'zone.js/testing';`を削除する必要があります。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
こちらも改行数を揃えてください。
|
||
After removing ZoneJS from the build, there is no longer a need for a `zone.js` dependency either and the | ||
package can be removed entirely: | ||
ビルドからZoneJSを削除すると、`zone.js`の依存関係も不要になり、パッケージを完全に削除できます。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
こちらも改行数を揃えてください
|
||
One way to ensure that a component is using the correct notification mechanisms from above is to | ||
use [ChangeDetectionStrategy.OnPush](/best-practices/skipping-subtrees#using-onpush). | ||
コンポーネントが上記の正しい通知メカニズムを使用していることを確認する1つの方法は、[ChangeDetectionStrategy.OnPush](/best-practices/skipping-subtrees#using-onpush)を使用することです。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
こちらも改行数を揃えてください
is "stable" and can be serialized. If there are asynchronous tasks that should prevent serialization, an application | ||
not using ZoneJS will need to make Angular aware of these with the `PendingTasks` service. Serialization | ||
will wait for the first moment that all pending tasks have been removed. | ||
AngularでSSRを使用している場合、アプリケーションが「安定」しており、シリアライズできるかどうかを判断するために、ZoneJSに依存していることをご存知かもしれません。シリアライズを妨げる非同期タスクがある場合、ZoneJSを使用していないアプリケーションは、`PendingTasks`サービスを使用してAngularにこれらを認識させる必要があります。シリアライズは、保留中のすべてのタスクが削除された最初の瞬間まで待機します。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
こちらも改行数を揃えてください
@@ -95,16 +78,13 @@ await doSomeWorkThatNeedsToBeRendered(); | |||
taskCleanup(); | |||
``` | |||
|
|||
The framework uses this service internally as well to prevent serialization until asynchronous tasks are complete. These include, but are not limited to, | |||
an ongoing Router navigation and an incomplete `HttpClient` request. | |||
フレームワークは、非同期タスクが完了するまでシリアライズを防ぐために、このサービスを内部的にも使用します。これには、進行中のルーターナビゲーションや未完了の`HttpClient`リクエストが含まれますが、これらに限定されません。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
こちらも改行数を揃えてください
without a notification. Angular will throw `ExpressionChangedAfterItHasBeenCheckedError` | ||
if there is an updated binding that would not have refreshed by the zoneless change | ||
detection. | ||
テストが本番コードと最も類似した動作をすることを確認するには、可能な限り`fixture.detectChanges()`の使用を避けてください。これにより、Angularが変更検知をスケジュールしていない場合に、変更検知が強制的に実行されます。テストでは、これらの通知が発生していることを確認し、テストで手動で強制的に発生させるのではなく、Angularが状態を同期するタイミングを処理できるようにする必要があります。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
こちらも改行数を揃えてください
|
||
### 更新が検出されることを確認するためのデバッグモードチェック | ||
|
||
Angularは、アプリケーションがZoneless互換の方法で状態を更新していることを確認するのに役立つ追加のツールも提供しています。`provideExperimentalCheckNoChangesForDebug`を使用すると、通知なしにバインディングが更新されていないことを定期的に確認できます。Zoneless変更検知によって更新されなかった更新されたバインディングがある場合、Angularは`ExpressionChangedAfterItHasBeenCheckedError`をスローします。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
こちらも改行数を揃えてください
Co-authored-by: Suguru Inatomi <[email protected]>
Co-authored-by: Suguru Inatomi <[email protected]>
refactor: 改行の追加
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
改行を合わせることが抜け落ちてました!すいません!🙇
修正したのでレビューお願いします。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
修正ありがとうございました!
翻訳・修正
関連Issue
#1014
備考
レビューお願いします!