@@ -21,30 +21,28 @@ import {RuntimeError, RuntimeErrorCode} from '../errors';
2121import { 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 */
150145export 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' } )
210205export 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 } ;
0 commit comments