refactor(compiler): move test helper to test file (#32937)
The `processI18nMeta()` function is only called from a single test, so let's move it there to keep the main source simpler. PR Close #32937
This commit is contained in:

committed by
atscott

parent
0f21ae9a74
commit
447fa2fccd
@ -128,16 +128,6 @@ export class I18nMetaVisitor implements html.Visitor {
|
||||
visitExpansionCase(expansionCase: html.ExpansionCase, context: any): any { return expansionCase; }
|
||||
}
|
||||
|
||||
export function processI18nMeta(
|
||||
htmlAstWithErrors: ParseTreeResult,
|
||||
interpolationConfig: InterpolationConfig = DEFAULT_INTERPOLATION_CONFIG): ParseTreeResult {
|
||||
return new ParseTreeResult(
|
||||
html.visitAll(
|
||||
new I18nMetaVisitor(interpolationConfig, /* keepI18nAttrs */ false),
|
||||
htmlAstWithErrors.rootNodes),
|
||||
htmlAstWithErrors.errors);
|
||||
}
|
||||
|
||||
export function metaFromI18nMessage(message: i18n.Message, id: string | null = null): I18nMeta {
|
||||
return {
|
||||
id: typeof id === 'string' ? id : message.id || '',
|
||||
|
Reference in New Issue
Block a user