1
0
mirror of synced 2025-12-21 10:57:10 -05:00

Crowdin remediation process tweaks (#19252)

This commit is contained in:
James M. Greene
2021-05-13 15:38:43 -05:00
committed by GitHub
parent 9de98d0fb9
commit a68d285228
5 changed files with 176 additions and 120 deletions

View File

@@ -13,12 +13,23 @@ const parsingErrorsLog = '~/docs-translation-parsing-error.txt'
const renderErrorsLog = '~/docs-translation-rendering-error.txt'
// 1. Check for parsing errors and output to file. Note this one must be run FIRST.
execSync(`TEST_TRANSLATION=true npx jest content/lint-files > ${parsingErrorsLog}`)
console.log('Checking for parsing errors...')
try {
execSync(`TEST_TRANSLATION=true npx jest linting/lint-files > ${parsingErrorsLog}`)
} catch (error) {
console.log('There were new parsing errors!')
}
// 2. Check for rendering errors and output to file. Note this one must be run SECOND.
execSync(`script/test-render-translation.js > ${renderErrorsLog}`)
console.log('Checking for rendering errors...')
try {
execSync(`script/test-render-translation.js > ${renderErrorsLog}`)
} catch (error) {
console.log('There were new rendering errors!')
}
// Reset the broken files.
console.log('Resetting broken files...')
execSync(`cat ${parsingErrorsLog} ${renderErrorsLog} | egrep "^translations/.*/(.+.md|.+.yml)$" | uniq | xargs -L1 script/reset-translated-file.js --prefer-main`)
// Print a message with next steps.