File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -216,17 +216,15 @@ const processLocale = async (
216216 const filePath = join ( LOCALES_DIRECTORY , localeFile )
217217 const localeInfo = checkJsonName ( filePath )
218218
219- if ( fix ) {
220- // prevent updating wrong locale file:
221- // - language locale files at countries allowed: e.g. es.json
222- // - country locale file forbidden: e.g. es-ES.json
223- // - target locale file forbidden: e.g. es-419.json
224- if ( localeInfo . mergeLocale ) {
225- console . error (
226- `${ COLORS . red } Error: Locale "${ localeInfo . locale } " cannot be fixed, fix the ${ localeInfo . lang } locale instead!.${ COLORS . reset } ` ,
227- )
228- process . exit ( 1 )
229- }
219+ // prevent updating wrong locale file:
220+ // - language locale files at countries allowed: e.g. es.json
221+ // - country locale file forbidden: e.g. es-ES.json
222+ // - target locale file forbidden: e.g. es-419.json
223+ if ( fix && localeInfo . mergeLocale ) {
224+ console . error (
225+ `${ COLORS . red } Error: Locale "${ localeInfo . locale } " cannot be fixed, fix the ${ localeInfo . lang } locale instead!.${ COLORS . reset } ` ,
226+ )
227+ process . exit ( 1 )
230228 }
231229
232230 const targetContent = await loadJson ( localeInfo )
You can’t perform that action at this time.
0 commit comments