File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ import * as plurals from "make-plural"
77
88import { getConfig , LinguiConfig } from "@lingui/conf"
99
10- import { getCatalogs } from "./api/catalog"
10+ import { getCatalogForMerge , getCatalogs } from "./api/catalog"
1111import { createCompiledCatalog } from "./api/compile"
1212import { helpRun } from "./api/help"
1313import { getFormat } from "./api"
@@ -113,6 +113,23 @@ function command(config: LinguiConfig, options) {
113113 console . error ( chalk . green ( `${ locale } ⇒ ${ compiledPath } ` ) )
114114 }
115115 } )
116+
117+ if ( doMerge ) {
118+ const compileCatalog = getCatalogForMerge ( config )
119+ const namespace = options . namespace || config . compileNamespace
120+ const compiledCatalog = createCompiledCatalog ( locale , mergedCatalogs , {
121+ strict : false ,
122+ namespace : namespace ,
123+ pseudoLocale : config . pseudoLocale ,
124+ compilerBabelOptions : config . compilerBabelOptions
125+ } )
126+ const compiledPath = compileCatalog . writeCompiled (
127+ locale ,
128+ compiledCatalog ,
129+ namespace
130+ )
131+ options . verbose && console . log ( chalk . green ( `${ locale } ⇒ ${ compiledPath } ` ) )
132+ }
116133 } )
117134 return true
118135}
You can’t perform that action at this time.
0 commit comments