Skip to content

Commit c263d91

Browse files
committed
Update: Translate comments of core for auto-generated API references
1 parent b840644 commit c263d91

File tree

319 files changed

+12467
-13921
lines changed

Some content is hidden

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

319 files changed

+12467
-13921
lines changed

.github/workflows/firebase-hosting-merge.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ jobs:
1111
runs-on: ubuntu-latest
1212
steps:
1313
- uses: actions/checkout@v3
14+
- run: yarn && echo '-----Install Done 👌-----' && yarn docs:build && echo '-----Build Done 👌-----'
1415
- uses: FirebaseExtended/action-hosting-deploy@v0
1516
with:
1617
repoToken: '${{ secrets.GITHUB_TOKEN }}'

.github/workflows/firebase-hosting-pull-request.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ jobs:
99
runs-on: ubuntu-latest
1010
steps:
1111
- uses: actions/checkout@v3
12+
- run: yarn && echo '-----Install Done 👌-----' && yarn docs:build && echo '-----Build Done 👌-----'
1213
- uses: FirebaseExtended/action-hosting-deploy@v0
1314
with:
1415
repoToken: '${{ secrets.GITHUB_TOKEN }}'

packages/core/src/application/application_config.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,22 +9,22 @@
99
import {EnvironmentProviders, Provider} from '../di';
1010

1111
/**
12-
* Set of config options available during the application bootstrap operation.
12+
* 애플리케이션 부트스트랩 작업 중 사용 가능한 구성 옵션 세트입니다.
1313
*
1414
* @publicApi
1515
*/
1616
export interface ApplicationConfig {
1717
/**
18-
* List of providers that should be available to the root component and all its children.
18+
* 루트 구성 요소와 그 모든 자식 구성 요소에서 사용할 수 있어야 하는 제공자의 목록입니다.
1919
*/
2020
providers: Array<Provider | EnvironmentProviders>;
2121
}
2222

2323
/**
24-
* Merge multiple application configurations from left to right.
24+
* 여러 애플리케이션 구성을 왼쪽에서 오른쪽으로 병합합니다.
2525
*
26-
* @param configs Two or more configurations to be merged.
27-
* @returns A merged [ApplicationConfig](api/core/ApplicationConfig).
26+
* @param configs 병합할 두 개 이상의 구성입니다.
27+
* @returns 병합된 [ApplicationConfig](api/core/ApplicationConfig)입니다.
2828
*
2929
* @publicApi
3030
*/

packages/core/src/application/application_init.ts

Lines changed: 37 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -21,30 +21,28 @@ import {RuntimeError, RuntimeErrorCode} from '../errors';
2121
import {isPromise, isSubscribable} from '../util/lang';
2222

2323
/**
24-
* A DI token that you can use to provide
25-
* one or more initialization functions.
24+
* 하나 이상의 초기화 함수를 제공하는 데 사용할 수 있는 DI 토큰입니다.
2625
*
27-
* The provided functions are injected at application startup and executed during
28-
* app initialization. If any of these functions returns a Promise or an Observable, initialization
29-
* does not complete until the Promise is resolved or the Observable is completed.
26+
* 제공된 함수들은 애플리케이션 시작 시 주입되어
27+
* 앱 초기화 과정에서 실행됩니다. 이러한 함수 중 하나라도 Promise나 Observable을 반환하면,
28+
* 초기화는 Promise가 해결되거나 Observable이 완료될 때까지 완료되지 않습니다.
3029
*
31-
* You can, for example, create a factory function that loads language data
32-
* or an external configuration, and provide that function to the `APP_INITIALIZER` token.
33-
* The function is executed during the application bootstrap process,
34-
* and the needed data is available on startup.
30+
* 예를 들어 언어 데이터 또는 외부 구성을 로드하는 팩토리 함수를 생성하고
31+
* 해당 함수를 `APP_INITIALIZER` 토큰에 제공할 수 있습니다.
32+
* 이 함수는 애플리케이션 부팅 과정에서 실행되며,
33+
* 필요한 데이터가 시작 시 이용 가능하게 됩니다.
3534
*
36-
* Note that the provided initializer is run in the injection context.
35+
* 제공된 초기화 함수는 주입 컨텍스트에서 실행된다는 점에 유의하세요.
3736
*
38-
* @deprecated from v19.0.0, use provideAppInitializer instead
37+
* @deprecated v19.0.0부터 사용 중단, 대신 provideAppInitializer 사용
3938
*
4039
* @see {@link ApplicationInitStatus}
4140
* @see {@link provideAppInitializer}
4241
*
4342
* @usageNotes
4443
*
45-
* The following example illustrates how to configure a multi-provider using `APP_INITIALIZER` token
46-
* and a function returning a promise.
47-
* ### Example with NgModule-based application
44+
* 다음 예시는 `APP_INITIALIZER` 토큰을 사용하여 Promise를 반환하는 함수로 다중 제공자를 구성하는 방법을 보여줍니다.
45+
* ### NgModule 기반 애플리케이션 예시
4846
* ```ts
4947
* function initializeApp(): Promise<any> {
5048
* const http = inject(HttpClient);
@@ -68,7 +66,7 @@ import {isPromise, isSubscribable} from '../util/lang';
6866
* export class AppModule {}
6967
* ```
7068
*
71-
* ### Example with standalone application
69+
* ### 독립형 애플리케이션 예시
7270
* ```ts
7371
* function initializeApp() {
7472
* const http = inject(HttpClient);
@@ -89,16 +87,13 @@ import {isPromise, isSubscribable} from '../util/lang';
8987
* },
9088
* ],
9189
* });
92-
9390
* ```
9491
*
92+
* `APP_INITIALIZER` 토큰과 Observable을 반환하는 함수를 사용하여 다중 제공자를 구성하는 것도 가능합니다.
93+
* 아래 예시를 참조하세요. 이 예제에서 `HttpClient`는
94+
* 다른 제공자와 함께 팩토리 함수가 어떻게 작동하는지를 보여주기 위한 데모 용도로 사용됩니다.
9595
*
96-
* It's also possible to configure a multi-provider using `APP_INITIALIZER` token and a function
97-
* returning an observable, see an example below. Note: the `HttpClient` in this example is used for
98-
* demo purposes to illustrate how the factory function can work with other providers available
99-
* through DI.
100-
*
101-
* ### Example with NgModule-based application
96+
* ### NgModule 기반 애플리케이션 예시
10297
* ```ts
10398
* function initializeApp() {
10499
* const http = inject(HttpClient);
@@ -122,7 +117,7 @@ import {isPromise, isSubscribable} from '../util/lang';
122117
* export class AppModule {}
123118
* ```
124119
*
125-
* ### Example with standalone application
120+
* ### 독립형 애플리케이션 예시
126121
* ```ts
127122
* function initializeApp() {
128123
* const http = inject(HttpClient);
@@ -149,28 +144,28 @@ import {isPromise, isSubscribable} from '../util/lang';
149144
*/
150145
export const APP_INITIALIZER = new InjectionToken<
151146
ReadonlyArray<() => Observable<unknown> | Promise<unknown> | void>
152-
>(ngDevMode ? 'Application Initializer' : '');
147+
>(ngDevMode ? '애플리케이션 초기화기' : '');
153148

154149
/**
155150
* @description
156-
* The provided function is injected at application startup and executed during
157-
* app initialization. If the function returns a Promise or an Observable, initialization
158-
* does not complete until the Promise is resolved or the Observable is completed.
151+
* 제공된 함수는 애플리케이션 시작 시 주입되어
152+
* 앱 초기화 과정에서 실행됩니다. 만약 함수가 Promise나 Observable을 반환하면,
153+
* 초기화는 Promise가 해결되거나 Observable이 완료될 때까지 완료되지 않습니다.
159154
*
160-
* You can, for example, create a function that loads language data
161-
* or an external configuration, and provide that function using `provideAppInitializer()`.
162-
* The function is executed during the application bootstrap process,
163-
* and the needed data is available on startup.
155+
* 예를 들어 언어 데이터 또는 외부 구성을 로드하는 함수를 생성하고,
156+
* `provideAppInitializer()`를 사용하여 해당 함수를 제공할 수 있습니다.
157+
* 이 함수는 애플리케이션 부팅 과정에서 실행되며,
158+
* 필요한 데이터가 시작 시 이용 가능하게 됩니다.
164159
*
165-
* Note that the provided initializer is run in the injection context.
160+
* 제공된 초기화 함수는 주입 컨텍스트에서 실행된다는 점에 유의하세요.
166161
*
167-
* Previously, this was achieved using the `APP_INITIALIZER` token which is now deprecated.
162+
* 이전에는 `APP_INITIALIZER` 토큰을 사용하여 이러한 작업을 수행했습니다.
163+
* 지금은 이것이 더 이상 사용되지 않습니다.
168164
*
169165
* @see {@link APP_INITIALIZER}
170166
*
171167
* @usageNotes
172-
* The following example illustrates how to configure an initialization function using
173-
* `provideAppInitializer()`
168+
* 다음 예시는 `provideAppInitializer()`를 사용하여 초기화 함수를 구성하는 방법을 보여줍니다.
174169
* ```ts
175170
* bootstrapApplication(App, {
176171
* providers: [
@@ -202,14 +197,14 @@ export function provideAppInitializer(
202197
}
203198

204199
/**
205-
* A class that reflects the state of running {@link APP_INITIALIZER} functions.
200+
* {@link APP_INITIALIZER} 함수의 실행 상태를 반영하는 클래스입니다.
206201
*
207202
* @publicApi
208203
*/
209204
@Injectable({providedIn: 'root'})
210205
export class ApplicationInitStatus {
211-
// Using non null assertion, these fields are defined below
212-
// within the `new Promise` callback (synchronously).
206+
// non null assertion을 사용하여, 이러한 필드는 아래에 정의됩니다.
207+
// `new Promise` 콜백 내에서(동기적으로).
213208
private resolve!: (...args: any[]) => void;
214209
private reject!: (...args: any[]) => void;
215210

@@ -227,10 +222,9 @@ export class ApplicationInitStatus {
227222
if ((typeof ngDevMode === 'undefined' || ngDevMode) && !Array.isArray(this.appInits)) {
228223
throw new RuntimeError(
229224
RuntimeErrorCode.INVALID_MULTI_PROVIDER,
230-
'Unexpected type of the `APP_INITIALIZER` token value ' +
231-
`(expected an array, but got ${typeof this.appInits}). ` +
232-
'Please check that the `APP_INITIALIZER` token is configured as a ' +
233-
'`multi: true` provider.',
225+
'`APP_INITIALIZER` 토큰 값의 예상치 못한 유형 ' +
226+
`(배열이어야 하며, 그러나 ${typeof this.appInits}가 나왔습니다). ` +
227+
'`APP_INITIALIZER` 토큰이 `multi: true` 제공자로 구성되었는지 확인하세요.',
234228
);
235229
}
236230
}
@@ -255,7 +249,7 @@ export class ApplicationInitStatus {
255249
}
256250

257251
const complete = () => {
258-
// @ts-expect-error overwriting a readonly
252+
// @ts-expect-error readonly를 덮어쓰기
259253
this.done = true;
260254
this.resolve();
261255
};

packages/core/src/application/application_module.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,13 @@ import {NgModule} from '../metadata';
1111
import {ApplicationRef} from './application_ref';
1212

1313
/**
14-
* Re-exported by `BrowserModule`, which is included automatically in the root
15-
* `AppModule` when you create a new app with the CLI `new` command. Eagerly injects
16-
* `ApplicationRef` to instantiate it.
14+
* `BrowserModule`에 의해 재수출되며, 이는 CLI `new` 명령어로 새 앱을 생성할 때 루트
15+
* `AppModule`에 자동으로 포함됩니다. `ApplicationRef`를 즉시 주입하여 인스턴스화합니다.
1716
*
1817
* @publicApi
1918
*/
2019
@NgModule()
2120
export class ApplicationModule {
22-
// Inject ApplicationRef to make it eager...
21+
// 즉시 사용하기 위해 ApplicationRef를 주입합니다...
2322
constructor(appRef: ApplicationRef) {}
2423
}

packages/core/src/application/application_ngmodule_factory_compiler.ts

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -28,16 +28,16 @@ export function compileNgModuleFactory<M>(
2828

2929
const moduleFactory = new R3NgModuleFactory(moduleType);
3030

31-
// All of the logic below is irrelevant for AOT-compiled code.
31+
// 아래의 모든 로직은 AOT-컴파일된 코드와 관련이 없습니다.
3232
if (typeof ngJitMode !== 'undefined' && !ngJitMode) {
3333
return Promise.resolve(moduleFactory);
3434
}
3535

3636
const compilerOptions = injector.get(COMPILER_OPTIONS, []).concat(options);
3737

38-
// Configure the compiler to use the provided options. This call may fail when multiple modules
39-
// are bootstrapped with incompatible options, as a component can only be compiled according to
40-
// a single set of options.
38+
// 제공된 옵션을 사용하도록 컴파일러를 구성합니다. 이 호출은 여러 모듈을
39+
// 호환되지 않는 옵션으로 부트스트랩하는 경우 실패할 수 있습니다. 컴포넌트는 오직
40+
// 단일 옵션 세트에 따라 컴파일될 수 있습니다.
4141
setJitOptions({
4242
defaultEncapsulation: _lastDefined(compilerOptions.map((opts) => opts.defaultEncapsulation)),
4343
preserveWhitespaces: _lastDefined(compilerOptions.map((opts) => opts.preserveWhitespaces)),
@@ -49,10 +49,10 @@ export function compileNgModuleFactory<M>(
4949

5050
const compilerProviders = compilerOptions.flatMap((option) => option.providers ?? []);
5151

52-
// In case there are no compiler providers, we just return the module factory as
53-
// there won't be any resource loader. This can happen with Ivy, because AOT compiled
54-
// modules can be still passed through "bootstrapModule". In that case we shouldn't
55-
// unnecessarily require the JIT compiler.
52+
// 컴파일러 제공자가 없으면 모듈 팩토리를 반환합니다.
53+
// 리소스 로더가 없기 때문입니다. Ivy의 경우 AOT 컴파일된
54+
// 모듈이 여전히 "bootstrapModule"을 통해 전달될 수 있습니다. 이 경우
55+
// 불필요하게 JIT 컴파일러를 요구하지 말아야 합니다.
5656
if (compilerProviders.length === 0) {
5757
return Promise.resolve(moduleFactory);
5858
}
@@ -64,8 +64,8 @@ export function compileNgModuleFactory<M>(
6464
});
6565
const compilerInjector = Injector.create({providers: compilerProviders});
6666
const resourceLoader = compilerInjector.get(compiler.ResourceLoader);
67-
// The resource loader can also return a string while the "resolveComponentResources"
68-
// always expects a promise. Therefore we need to wrap the returned value in a promise.
67+
// 리소스 로더는 문자열을 반환할 수 있고 "resolveComponentResources"
68+
//는 항상 프로미스를 기대합니다. 따라서 반환된 값을 프로미스로 감싸야 합니다.
6969
return resolveComponentResources((url) => Promise.resolve(resourceLoader.get(url))).then(
7070
() => moduleFactory,
7171
);

0 commit comments

Comments
 (0)