File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
packages/cli/src/services Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -43,12 +43,19 @@ const getTargetLocales = (config: LinguiConfigNormalized) => {
4343 )
4444}
4545
46+ const validCatalogFormat = ( config : LinguiConfigNormalized ) : boolean => {
47+ if ( typeof config . format === "string" ) {
48+ return config . format === "po"
49+ }
50+ return config . format . catalogExtension === ".po"
51+ }
52+
4653// Main sync method, call "Init" or "Sync" depending on the project context
4754export default async function syncProcess (
4855 config : LinguiConfigNormalized ,
4956 options : CliExtractOptions
5057) {
51- if ( config . format != "po" ) {
58+ if ( ! validCatalogFormat ( config ) ) {
5259 console . error (
5360 `\n----------\nTranslation.io service is only compatible with the "po" format. Please update your Lingui configuration accordingly.\n----------`
5461 )
You can’t perform that action at this time.
0 commit comments