Revert "feat(ivy): use i18n locale data to determine the plural form of ICU expressions (#29249)" (#29918)
This reverts commit 6a8cca7975
.
PR Close #29918
This commit is contained in:
@ -6,8 +6,7 @@
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
import {Expression, ExternalExpr, InvokeFunctionExpr, LiteralArrayExpr, LiteralExpr, R3Identifiers, R3InjectorMetadata, R3NgModuleMetadata, R3Reference, Statement, WrappedNodeExpr, compileInjector, compileNgModule} from '@angular/compiler';
|
||||
import {STRING_TYPE} from '@angular/compiler/src/output/output_ast';
|
||||
import {Expression, ExternalExpr, InvokeFunctionExpr, LiteralArrayExpr, R3Identifiers, R3InjectorMetadata, R3NgModuleMetadata, R3Reference, Statement, WrappedNodeExpr, compileInjector, compileNgModule} from '@angular/compiler';
|
||||
import * as ts from 'typescript';
|
||||
|
||||
import {ErrorCode, FatalDiagnosticError} from '../../diagnostics';
|
||||
@ -18,6 +17,7 @@ import {NgModuleRouteAnalyzer} from '../../routing';
|
||||
import {LocalModuleScopeRegistry, ScopeData} from '../../scope';
|
||||
import {AnalysisOutput, CompileResult, DecoratorHandler, DetectResult, HandlerPrecedence, ResolveResult} from '../../transform';
|
||||
import {getSourceFile} from '../../util/src/typescript';
|
||||
|
||||
import {generateSetClassMetadataCall} from './metadata';
|
||||
import {ReferencesRegistry} from './references_registry';
|
||||
import {combineResolvers, findAngularDecorator, forwardRefResolver, getValidConstructorDependencies, isExpressionForwardReference, toR3Reference, unwrapExpression} from './util';
|
||||
@ -41,7 +41,7 @@ export class NgModuleDecoratorHandler implements DecoratorHandler<NgModuleAnalys
|
||||
private scopeRegistry: LocalModuleScopeRegistry,
|
||||
private referencesRegistry: ReferencesRegistry, private isCore: boolean,
|
||||
private routeAnalyzer: NgModuleRouteAnalyzer|null, private refEmitter: ReferenceEmitter,
|
||||
private defaultImportRecorder: DefaultImportRecorder, private localeId?: string) {}
|
||||
private defaultImportRecorder: DefaultImportRecorder) {}
|
||||
|
||||
readonly precedence = HandlerPrecedence.PRIMARY;
|
||||
|
||||
@ -247,7 +247,7 @@ export class NgModuleDecoratorHandler implements DecoratorHandler<NgModuleAnalys
|
||||
ngModuleStatements.push(callExpr.toStmt());
|
||||
}
|
||||
}
|
||||
const res: CompileResult[] = [
|
||||
return [
|
||||
{
|
||||
name: 'ngModuleDef',
|
||||
initializer: ngModuleDef.expression,
|
||||
@ -259,19 +259,8 @@ export class NgModuleDecoratorHandler implements DecoratorHandler<NgModuleAnalys
|
||||
initializer: ngInjectorDef.expression,
|
||||
statements: ngInjectorDef.statements,
|
||||
type: ngInjectorDef.type,
|
||||
}
|
||||
},
|
||||
];
|
||||
|
||||
if (this.localeId) {
|
||||
res.push({
|
||||
name: 'ngLocaleIdDef',
|
||||
initializer: new LiteralExpr(this.localeId),
|
||||
statements: [],
|
||||
type: STRING_TYPE
|
||||
});
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
private _toR3Reference(
|
||||
|
@ -447,8 +447,7 @@ export class NgtscProgram implements api.Program {
|
||||
this.options.strictInjectionParameters || false),
|
||||
new NgModuleDecoratorHandler(
|
||||
this.reflector, evaluator, scopeRegistry, referencesRegistry, this.isCore,
|
||||
this.routeAnalyzer, this.refEmitter, this.defaultImportTracker,
|
||||
this.options.i18nInLocale),
|
||||
this.routeAnalyzer, this.refEmitter, this.defaultImportTracker),
|
||||
new PipeDecoratorHandler(
|
||||
this.reflector, evaluator, scopeRegistry, this.defaultImportTracker, this.isCore),
|
||||
];
|
||||
|
Reference in New Issue
Block a user