Skip to content

Commit 85a0950

Browse files
committed
chore: .
1 parent a140185 commit 85a0950

1 file changed

Lines changed: 9 additions & 11 deletions

File tree

scripts/compare-translations.ts

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff 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)

0 commit comments

Comments
 (0)