Skip to content

Commit 20b1014

Browse files
committed
fix: migrate untranslated files
1 parent 1ae68ee commit 20b1014

File tree

21 files changed

+298
-294
lines changed

21 files changed

+298
-294
lines changed

adev-ja/src/content/ecosystem/service-workers/config.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -368,13 +368,12 @@ If the field is omitted, it defaults to:
368368

369369
This optional property enables you to configure how the service worker handles navigation requests:
370370

371-
<docs-code language="json">
371+
```json
372372

373373
{
374-
"navigationRequestStrategy": "freshness"
374+
"navigationRequestStrategy": "freshness"
375375
}
376-
377-
</docs-code>
376+
```
378377

379378
| Possible values | Details |
380379
| :-------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |

adev-ja/src/content/guide/di/creating-injectable-service.md

Lines changed: 31 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -67,35 +67,35 @@ ng generate service heroes/hero
6767

6868
This command creates the following default `HeroService`:
6969

70-
<docs-code header="heroes/hero.service.ts (CLI-generated)" language="typescript">
71-
import { Injectable } from '@angular/core';
70+
```ts {header: 'heroes/hero.service.ts (CLI-generated)'}
71+
import {Injectable} from '@angular/core';
7272

7373
@Injectable({
74-
providedIn: 'root',
74+
providedIn: 'root',
7575
})
7676
export class HeroService {}
77-
</docs-code>
77+
```
7878

7979
The `@Injectable()` decorator specifies that Angular can use this class in the DI system.
8080
The metadata, `providedIn: 'root'`, means that the `HeroService` is provided throughout the application.
8181

8282
Add a `getHeroes()` method that returns the heroes from `mock.heroes.ts` to get the hero mock data:
8383

84-
<docs-code header="heroes/hero.service.ts" language="typescript">
85-
import { Injectable } from '@angular/core';
86-
import { HEROES } from './mock-heroes';
84+
```ts {header: 'hero.service.ts'}
85+
import {Injectable} from '@angular/core';
86+
import {HEROES} from './mock-heroes';
8787

8888
@Injectable({
89-
// declares that this service should be created
90-
// by the root application injector.
91-
providedIn: 'root',
89+
// declares that this service should be created
90+
// by the root application injector.
91+
providedIn: 'root',
9292
})
9393
export class HeroService {
94-
getHeroes() {
95-
return HEROES;
96-
}
94+
getHeroes() {
95+
return HEROES;
96+
}
9797
}
98-
</docs-code>
98+
```
9999

100100
For clarity and maintainability, it is recommended that you define components and services in separate files.
101101

@@ -106,19 +106,19 @@ To inject a service as a dependency into a component, you can declare a class fi
106106
The following example specifies the `HeroService` in the `HeroListComponent`.
107107
The type of `heroService` is `HeroService`.
108108

109-
<docs-code header="heroes/hero-list.component.ts" language="typescript">
110-
import { inject } from "@angular/core";
109+
```ts
110+
import {inject} from '@angular/core';
111111

112112
export class HeroListComponent {
113-
private heroService = inject(HeroService);
113+
private heroService = inject(HeroService);
114114
}
115-
</docs-code>
115+
```
116116

117117
It is also possible to inject a service into a component using the component's constructor:
118118

119-
<docs-code header="heroes/hero-list.component.ts (constructor signature)" language="typescript">
119+
```ts {header: 'hero-list.component.ts (constructor signature)'}
120120
constructor(private heroService: HeroService)
121-
</docs-code>
121+
```
122122

123123
The `inject` method can be used in both classes and functions, while the constructor method can naturally only be used in a class constructor. However, in either case a dependency may only be injected in a valid [injection context](guide/di/dependency-injection-context), usually in the construction or initialization of a component.
124124

@@ -127,24 +127,23 @@ The `inject` method can be used in both classes and functions, while the constru
127127
When a service depends on another service, follow the same pattern as injecting into a component.
128128
In the following example, `HeroService` depends on a `Logger` service to report its activities:
129129

130-
<docs-code header="heroes/hero.service.ts" language="typescript"
131-
highlight="[3,9,12]">
132-
import { inject, Injectable } from '@angular/core';
133-
import { HEROES } from './mock-heroes';
134-
import { Logger } from '../logger.service';
130+
```ts {header: 'hero.service.ts, highlight: [[3],[9],[12]]}
131+
import {inject, Injectable} from '@angular/core';
132+
import {HEROES} from './mock-heroes';
133+
import {Logger} from '../logger.service';
135134

136135
@Injectable({
137-
providedIn: 'root',
136+
providedIn: 'root',
138137
})
139138
export class HeroService {
140-
private logger = inject(Logger);
139+
private logger = inject(Logger);
141140

142-
getHeroes() {
143-
this.logger.log('Getting heroes.');
144-
return HEROES;
141+
getHeroes() {
142+
this.logger.log('Getting heroes.');
143+
return HEROES;
144+
}
145145
}
146-
}
147-
</docs-code>
146+
```
148147

149148
In this example, the `getHeroes()` method uses the `Logger` service by logging a message when fetching heroes.
150149

adev-ja/src/content/reference/extended-diagnostics/NG8101.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ In this case:
3434

3535
This diagnostic can be disabled by editing the project's `tsconfig.json` file:
3636

37-
<docs-code language="json">
37+
```json
38+
3839
{
3940
"angularCompilerOptions": {
4041
"extendedDiagnostics": {
@@ -44,6 +45,6 @@ This diagnostic can be disabled by editing the project's `tsconfig.json` file:
4445
}
4546
}
4647
}
47-
</docs-code>
48+
```
4849

4950
See [extended diagnostic configuration](extended-diagnostics#configuration) for more info.

adev-ja/src/content/reference/extended-diagnostics/NG8102.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,8 @@ username: string = 'Angelino';
7373

7474
This diagnostic can be disabled by editing the project's `tsconfig.json` file:
7575

76-
<docs-code language="json">
76+
```json
77+
7778
{
7879
"angularCompilerOptions": {
7980
"extendedDiagnostics": {

adev-ja/src/content/reference/extended-diagnostics/NG8103.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,8 @@ class MyComponent {}
5858

5959
This diagnostic can be disabled by editing the project's `tsconfig.json` file:
6060

61-
<docs-code language="json">
61+
```json
62+
6263
{
6364
"angularCompilerOptions": {
6465
"extendedDiagnostics": {
@@ -68,6 +69,6 @@ This diagnostic can be disabled by editing the project's `tsconfig.json` file:
6869
}
6970
}
7071
}
71-
</docs-code>
72+
```
7273

7374
See [extended diagnostic configuration](extended-diagnostics#configuration) for more info.

adev-ja/src/content/reference/extended-diagnostics/NG8104.md

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -36,18 +36,17 @@ When binding to `attr.`, `class.`, or `style.`, ensure you use the Angular templ
3636

3737
This diagnostic can be disabled by editing the project's `tsconfig.json` file:
3838

39-
<docs-code language="json">
39+
```json
4040

4141
{
42-
"angularCompilerOptions": {
43-
"extendedDiagnostics": {
44-
"checks": {
45-
"textAttributeNotBinding": "suppress"
42+
"angularCompilerOptions": {
43+
"extendedDiagnostics": {
44+
"checks": {
45+
"textAttributeNotBinding": "suppress"
46+
}
47+
}
48+
}
4649
}
47-
}
48-
}
49-
}
50-
51-
</docs-code>
50+
```
5251

5352
See [extended diagnostic configuration](extended-diagnostics#configuration) for more info.

adev-ja/src/content/reference/extended-diagnostics/NG8105.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@ class MyComponent {
4444

4545
This diagnostic can be disabled by editing the project's `tsconfig.json` file:
4646

47-
<docs-code language="json">
47+
```json
48+
4849
{
4950
"angularCompilerOptions": {
5051
"extendedDiagnostics": {
@@ -54,6 +55,6 @@ This diagnostic can be disabled by editing the project's `tsconfig.json` file:
5455
}
5556
}
5657
}
57-
</docs-code>
58+
```
5859

5960
See [extended diagnostic configuration](extended-diagnostics#configuration) for more info.

adev-ja/src/content/reference/extended-diagnostics/NG8106.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ move this to the value assignment of the binding.
3333

3434
This diagnostic can be disabled by editing the project's `tsconfig.json` file:
3535

36-
<docs-code language="json">
36+
```json
37+
3738
{
3839
"angularCompilerOptions": {
3940
"extendedDiagnostics": {
@@ -43,6 +44,6 @@ This diagnostic can be disabled by editing the project's `tsconfig.json` file:
4344
}
4445
}
4546
}
46-
</docs-code>
47+
```
4748

4849
See [extended diagnostic configuration](extended-diagnostics#configuration) for more info.

adev-ja/src/content/reference/extended-diagnostics/NG8107.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,8 @@ class MyComponent {
6565

6666
This diagnostic can be disabled by editing the project's `tsconfig.json` file:
6767

68-
<docs-code language="json">
68+
```json
69+
6970
{
7071
"angularCompilerOptions": {
7172
"extendedDiagnostics": {
@@ -75,6 +76,6 @@ This diagnostic can be disabled by editing the project's `tsconfig.json` file:
7576
}
7677
}
7778
}
78-
</docs-code>
79+
```
7980

8081
See [extended diagnostic configuration](extended-diagnostics#configuration) for more info.

adev-ja/src/content/reference/extended-diagnostics/NG8108.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,8 @@ class MyComponent {}
6666

6767
This diagnostic can be disabled by editing the project's `tsconfig.json` file:
6868

69-
<docs-code language="json">
69+
```json
70+
7071
{
7172
"angularCompilerOptions": {
7273
"extendedDiagnostics": {
@@ -76,6 +77,6 @@ This diagnostic can be disabled by editing the project's `tsconfig.json` file:
7677
}
7778
}
7879
}
79-
</docs-code>
80+
```
8081

8182
See [extended diagnostic configuration](extended-diagnostics#configuration) for more info.

0 commit comments

Comments
 (0)