Skip to content

Commit eaac302

Browse files
authored
chore: update origin to 71cde39ff04 (#1130)
* chore: update origin to 71cde39ff04 * fix: migrate new and untranslated files * docs(guide/forms): migrate .en.md changes to Japanese translations - Apply structural changes from English sources to Japanese files - Update code formatting to match upstream style (spaces around operators) - Add new sections: "Managing form control state" and "Controlling event emission" to reactive-forms.md - Add "Integration with schema validation libraries" section to validation.md - Update navigation links in overview.md to include new guides - Maintain line-by-line correspondence between .en.md and .md files for easier diffing * docs(ai): migrate .en.md changes * docs(best-practices): migrate .en.md changes * docs(guide/animations): migrate .en.md changes * docs(guide/aria): migrate .en.md changes * docs(guide/components): migrate .en.md changes * docs(guide/di): migrate .en.md changes * docs(guide/directives): migrate .en.md changes * docs(guide): migrate .en.md changes for root files * docs(guide/http): migrate .en.md changes * docs(guide/routing): migrate common-router-tasks .en.md changes * docs(guide/routing): migrate customizing-route-behavior .en.md changes * docs(guide/routing): migrate data-resolvers .en.md changes * docs(guide/routing): migrate define-routes .en.md changes * docs(guide/routing): migrate lifecycle-and-events .en.md changes * docs(guide/routing): migrate navigate, read-route-state, redirecting .en.md changes * docs(guide/routing): migrate route-guards, animations, reference .en.md changes * docs(guide/routing): migrate remaining routing .en.md changes * docs(guide/signals): migrate .en.md changes * docs(guide/templates): migrate .en.md changes * docs(guide/testing): migrate paired .en.md changes * docs(guide/testing): migrate using-component-harnesses and utility-apis .en.md changes * docs(introduction/essentials): migrate .en.md changes * docs(reference): migrate .en.md changes * docs(tools/cli): migrate serve .en.md changes * docs(tutorials): migrate .en.md changes * chore: migrate source code file changes - Sync update.component.html formatting (spacing in interpolation, conditions) - Update sub-navigation-data.ts with new migration entry and reorder zone-js-testing - Sync index.html formatting changes * docs(testing): translate components-scenarios.md to Japanese Translate the component testing scenarios guide from English to Japanese. This file was newly added in the upstream update. * fix(docs): fix textlint errors in define-routes and services Auto-fixed issues: - プロミス → Promise in define-routes.md - Remove spaces between half/full-width characters in services.md * fix(docs): fix remaining textlint errors Fix redundant expressions and consecutive kanji issues in: - hydration.md - reactive-forms.md - customizing-route-behavior.md - signals/overview.md - components-basics.md
1 parent e5e19c3 commit eaac302

File tree

283 files changed

+7021
-4627
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

283 files changed

+7021
-4627
lines changed

adev-ja/src/app/features/update/update.component.en.html

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ <h3>Angular versions</h3>
1919
<ul class="adev-template-dropdown" cdkMenu>
2020
@for (version of versions; track $index) {
2121
<li>
22-
<button cdkMenuItem type="button" (click)="from=version; showUpdatePath()">
22+
<button cdkMenuItem type="button" (click)="from = version; showUpdatePath()">
2323
<span>{{ version.name }}</span>
2424
</button>
2525
</li>
@@ -40,7 +40,7 @@ <h3>Angular versions</h3>
4040
<ul class="adev-template-dropdown" cdkMenu>
4141
@for (version of versions; track $index) {
4242
<li>
43-
<button cdkMenuItem type="button" (click)="to=version; showUpdatePath()">
43+
<button cdkMenuItem type="button" (click)="to = version; showUpdatePath()">
4444
<span>{{ version.name }}</span>
4545
</button>
4646
</li>
@@ -70,7 +70,7 @@ <h3>Angular versions</h3>
7070
</div>
7171
}
7272

73-
@if ((to.number - from.number > 150) && from.number > 240) {
73+
@if (to.number - from.number > 150 && from.number > 240) {
7474
<div class="docs-alert docs-alert-critical">
7575
<p>
7676
<strong>Warning:</strong>
@@ -86,7 +86,7 @@ <h3>Application complexity</h3>
8686
<mat-button-toggle-group
8787
(change)="level = $event.value; showUpdatePath()"
8888
[value]="level"
89-
style="margin-bottom:16px;"
89+
style="margin-bottom: 16px"
9090
>
9191
<mat-button-toggle [value]="1">Basic</mat-button-toggle>
9292
<mat-button-toggle [value]="2">Medium</mat-button-toggle>
@@ -106,7 +106,7 @@ <h3>Other dependencies</h3>
106106
<mat-checkbox
107107
(change)="options[option.id] = $event.checked; showUpdatePath()"
108108
[checked]="options[option.id]"
109-
>I use {{option.name}} {{option.description}}</mat-checkbox
109+
>I use {{ option.name }} {{ option.description }}</mat-checkbox
110110
>
111111
</div>
112112
}
@@ -137,19 +137,21 @@ <h4>Package Manager</h4>
137137
<!-- RECOMMENDATIONS SECTION -->
138138

139139
@if (
140-
beforeRecommendations.length > 0 || duringRecommendations.length > 0 || afterRecommendations.length > 0
140+
beforeRecommendations.length > 0 ||
141+
duringRecommendations.length > 0 ||
142+
afterRecommendations.length > 0
141143
) {
142144
<div class="recommendations">
143-
<h2>{{title()}}</h2>
145+
<h2>{{ title() }}</h2>
144146

145147
<h3>Before you update</h3>
146-
@for (r of beforeRecommendations; track $index) {
148+
@for (r of beforeRecommendations; track $index) {
147149
<div class="adev-recommendation-item">
148150
<mat-checkbox />
149151
<div class="adev-recommendation-content">
150152
<div [innerHTML]="r.renderedStep"></div>
151153
<span class="adev-complexity-badge" [class]="'adev-complexity-' + r.level">
152-
{{getComplexityLevelName(r.level)}}
154+
{{ getComplexityLevelName(r.level) }}
153155
</span>
154156
</div>
155157
</div>
@@ -173,7 +175,7 @@ <h3>Update to the new version</h3>
173175
<div class="adev-recommendation-content">
174176
<div [innerHTML]="r.renderedStep"></div>
175177
<span class="adev-complexity-badge" [class]="'adev-complexity-' + r.level">
176-
{{getComplexityLevelName(r.level)}}
178+
{{ getComplexityLevelName(r.level) }}
177179
</span>
178180
</div>
179181
</div>
@@ -191,7 +193,7 @@ <h3>After you update</h3>
191193
<div class="adev-recommendation-content">
192194
<div [innerHTML]="r.renderedStep"></div>
193195
<span class="adev-complexity-badge" [class]="'adev-complexity-' + r.level">
194-
{{getComplexityLevelName(r.level)}}
196+
{{ getComplexityLevelName(r.level) }}
195197
</span>
196198
</div>
197199
</div>

adev-ja/src/app/features/update/update.component.html

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ <h3>Angularバージョン</h3>
1919
<ul class="adev-template-dropdown" cdkMenu>
2020
@for (version of versions; track $index) {
2121
<li>
22-
<button cdkMenuItem type="button" (click)="from=version; showUpdatePath()">
22+
<button cdkMenuItem type="button" (click)="from = version; showUpdatePath()">
2323
<span>{{ version.name }}</span>
2424
</button>
2525
</li>
@@ -40,7 +40,7 @@ <h3>Angularバージョン</h3>
4040
<ul class="adev-template-dropdown" cdkMenu>
4141
@for (version of versions; track $index) {
4242
<li>
43-
<button cdkMenuItem type="button" (click)="to=version; showUpdatePath()">
43+
<button cdkMenuItem type="button" (click)="to = version; showUpdatePath()">
4444
<span>{{ version.name }}</span>
4545
</button>
4646
</li>
@@ -70,7 +70,7 @@ <h3>Angularバージョン</h3>
7070
</div>
7171
}
7272

73-
@if ((to.number - from.number > 150) && from.number > 240) {
73+
@if (to.number - from.number > 150 && from.number > 240) {
7474
<div class="docs-alert docs-alert-critical">
7575
<p>
7676
<strong>警告:</strong>
@@ -86,7 +86,7 @@ <h3>アプリケーションの複雑さ</h3>
8686
<mat-button-toggle-group
8787
(change)="level = $event.value; showUpdatePath()"
8888
[value]="level"
89-
style="margin-bottom:16px;"
89+
style="margin-bottom: 16px"
9090
>
9191
<mat-button-toggle [value]="1">基本</mat-button-toggle>
9292
<mat-button-toggle [value]="2">中級</mat-button-toggle>
@@ -106,7 +106,7 @@ <h3>その他の依存関係</h3>
106106
<mat-checkbox
107107
(change)="options[option.id] = $event.checked; showUpdatePath()"
108108
[checked]="options[option.id]"
109-
>{{option.name}} {{option.description}}を使用しています</mat-checkbox
109+
>{{ option.name }} {{ option.description }}を使用しています</mat-checkbox
110110
>
111111
</div>
112112
}
@@ -137,19 +137,21 @@ <h4>パッケージマネージャー</h4>
137137
<!-- RECOMMENDATIONS SECTION -->
138138

139139
@if (
140-
beforeRecommendations.length > 0 || duringRecommendations.length > 0 || afterRecommendations.length > 0
140+
beforeRecommendations.length > 0 ||
141+
duringRecommendations.length > 0 ||
142+
afterRecommendations.length > 0
141143
) {
142144
<div class="recommendations">
143-
<h2>{{title()}}</h2>
145+
<h2>{{ title() }}</h2>
144146

145147
<h3>アップデート前</h3>
146-
@for (r of beforeRecommendations; track $index) {
148+
@for (r of beforeRecommendations; track $index) {
147149
<div class="adev-recommendation-item">
148150
<mat-checkbox />
149151
<div class="adev-recommendation-content">
150152
<div [innerHTML]="r.renderedStep"></div>
151153
<span class="adev-complexity-badge" [class]="'adev-complexity-' + r.level">
152-
{{getComplexityLevelName(r.level)}}
154+
{{ getComplexityLevelName(r.level) }}
153155
</span>
154156
</div>
155157
</div>
@@ -173,7 +175,7 @@ <h3>新しいバージョンにアップデートする</h3>
173175
<div class="adev-recommendation-content">
174176
<div [innerHTML]="r.renderedStep"></div>
175177
<span class="adev-complexity-badge" [class]="'adev-complexity-' + r.level">
176-
{{getComplexityLevelName(r.level)}}
178+
{{ getComplexityLevelName(r.level) }}
177179
</span>
178180
</div>
179181
</div>
@@ -191,7 +193,7 @@ <h3>アップデート後</h3>
191193
<div class="adev-recommendation-content">
192194
<div [innerHTML]="r.renderedStep"></div>
193195
<span class="adev-complexity-badge" [class]="'adev-complexity-' + r.level">
194-
{{getComplexityLevelName(r.level)}}
196+
{{ getComplexityLevelName(r.level) }}
195197
</span>
196198
</div>
197199
</div>

adev-ja/src/app/routing/sub-navigation-data.en.ts

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -475,6 +475,11 @@ const DOCS_SUB_NAVIGATION_DATA: NavigationItem[] = [
475475
path: 'guide/forms/signals/comparison',
476476
contentPath: 'guide/forms/signals/comparison',
477477
},
478+
{
479+
label: 'Migrating from Legacy Forms',
480+
path: 'guide/forms/signals/migration',
481+
contentPath: 'guide/forms/signals/migration',
482+
},
478483
],
479484
},
480485
{
@@ -618,11 +623,6 @@ const DOCS_SUB_NAVIGATION_DATA: NavigationItem[] = [
618623
path: 'guide/testing/utility-apis',
619624
contentPath: 'guide/testing/utility-apis',
620625
},
621-
{
622-
label: 'Zone.js Testing Utilities',
623-
path: 'guide/testing/zone-js-testing-utilities',
624-
contentPath: 'guide/testing/zone-js-testing-utilities',
625-
},
626626
{
627627
label: 'Component harnesses overview',
628628
path: 'guide/testing/component-harnesses-overview',
@@ -653,6 +653,11 @@ const DOCS_SUB_NAVIGATION_DATA: NavigationItem[] = [
653653
path: 'guide/testing/karma',
654654
contentPath: 'guide/testing/karma',
655655
},
656+
{
657+
label: 'Zone.js Testing Utilities',
658+
path: 'guide/testing/zone-js-testing-utilities',
659+
contentPath: 'guide/testing/zone-js-testing-utilities',
660+
},
656661
],
657662
},
658663
{

adev-ja/src/app/routing/sub-navigation-data.ts

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -475,6 +475,11 @@ const DOCS_SUB_NAVIGATION_DATA: NavigationItem[] = [
475475
path: 'guide/forms/signals/comparison',
476476
contentPath: 'guide/forms/signals/comparison',
477477
},
478+
{
479+
label: 'Migrating from Legacy Forms',
480+
path: 'guide/forms/signals/migration',
481+
contentPath: 'guide/forms/signals/migration',
482+
},
478483
],
479484
},
480485
{
@@ -618,11 +623,6 @@ const DOCS_SUB_NAVIGATION_DATA: NavigationItem[] = [
618623
path: 'guide/testing/utility-apis',
619624
contentPath: 'guide/testing/utility-apis',
620625
},
621-
{
622-
label: 'Zone.jsテストユーティリティ',
623-
path: 'guide/testing/zone-js-testing-utilities',
624-
contentPath: 'guide/testing/zone-js-testing-utilities',
625-
},
626626
{
627627
label: 'コンポーネントハーネスの概要',
628628
path: 'guide/testing/component-harnesses-overview',
@@ -653,6 +653,11 @@ const DOCS_SUB_NAVIGATION_DATA: NavigationItem[] = [
653653
path: 'guide/testing/karma',
654654
contentPath: 'guide/testing/karma',
655655
},
656+
{
657+
label: 'Zone.jsテストユーティリティ',
658+
path: 'guide/testing/zone-js-testing-utilities',
659+
contentPath: 'guide/testing/zone-js-testing-utilities',
660+
},
656661
],
657662
},
658663
{

adev-ja/src/content/ai/design-patterns.en.md

Lines changed: 37 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,14 @@ storyResource = resource({
2727
loader: ({params}): Promise<StoryData> => {
2828
// The params value is the current value of the storyInput signal
2929
const url = this.endpoint();
30-
return runFlow({ url, input: {
31-
userInput: params,
32-
sessionId: this.storyService.sessionId() // Read from another signal
33-
}});
34-
}
30+
return runFlow({
31+
url,
32+
input: {
33+
userInput: params,
34+
sessionId: this.storyService.sessionId(), // Read from another signal
35+
},
36+
});
37+
},
3538
});
3639
```
3740

@@ -56,7 +59,7 @@ storyParts = linkedSignal<string[], string[]>({
5659
const existingStoryParts = previous?.value || [];
5760
// Return a new array with the old and new parts
5861
return [...existingStoryParts, ...newStoryParts];
59-
}
62+
},
6063
});
6164
```
6265

@@ -101,23 +104,23 @@ characters = resource({
101104
// exposed by the Genkit client SDK
102105
const response = streamFlow({
103106
url: '/streamCharacters',
104-
input: 10
107+
input: 10,
105108
});
106109

107110
(async () => {
108111
for await (const chunk of response.stream) {
109112
data.update((prev) => {
110113
if ('value' in prev) {
111-
return { value: `${prev.value} ${chunk}` };
114+
return {value: `${prev.value} ${chunk}`};
112115
} else {
113-
return { error: chunk as unknown as Error };
116+
return {error: chunk as unknown as Error};
114117
}
115118
});
116119
}
117120
})();
118121

119122
return data;
120-
}
123+
},
121124
});
122125
```
123126

@@ -136,38 +139,39 @@ The `characters` member is updated asynchronously and can be displayed in the te
136139
On the server side, in `server.ts` for example, the defined endpoint sends the data to be streamed to the client. The following code uses Gemini with the Genkit framework but this technique is applicable to other APIs that support streaming responses from LLMs:
137140

138141
```ts
139-
import { startFlowServer } from '@genkit-ai/express';
140-
import { genkit } from "genkit/beta";
141-
import { googleAI, gemini20Flash } from "@genkit-ai/googleai";
142+
import {startFlowServer} from '@genkit-ai/express';
143+
import {genkit} from 'genkit/beta';
144+
import {googleAI, gemini20Flash} from '@genkit-ai/googleai';
142145

143-
const ai = genkit({ plugins: [googleAI()] });
146+
const ai = genkit({plugins: [googleAI()]});
144147

145-
export const streamCharacters = ai.defineFlow({
148+
export const streamCharacters = ai.defineFlow(
149+
{
146150
name: 'streamCharacters',
147151
inputSchema: z.number(),
148152
outputSchema: z.string(),
149153
streamSchema: z.string(),
150154
},
151-
async (count, { sendChunk }) => {
152-
const { response, stream } = ai.generateStream({
153-
model: gemini20Flash,
154-
config: {
155-
temperature: 1,
156-
},
157-
prompt: `Generate ${count} different RPG game characters.`,
158-
});
159-
160-
(async () => {
161-
for await (const chunk of stream) {
162-
sendChunk(chunk.content[0].text!);
163-
}
164-
})();
165-
166-
return (await response).text;
167-
});
155+
async (count, {sendChunk}) => {
156+
const {response, stream} = ai.generateStream({
157+
model: gemini20Flash,
158+
config: {
159+
temperature: 1,
160+
},
161+
prompt: `Generate ${count} different RPG game characters.`,
162+
});
163+
164+
(async () => {
165+
for await (const chunk of stream) {
166+
sendChunk(chunk.content[0].text!);
167+
}
168+
})();
169+
170+
return (await response).text;
171+
},
172+
);
168173

169174
startFlowServer({
170175
flows: [streamCharacters],
171176
});
172-
173177
```

0 commit comments

Comments
 (0)