Improvements in tools to help merge crowdin PRs (#18409)
- add `script/test-render-translation.js` to render all translated content to catch malformed liquid that would cause render errors - improve test output for `script/fix-translation-errors.js` and `tests/content/lint-files.js` - make it so `script/reset-translated-file.js` can handle files that have been renamed
This commit is contained in:
@@ -71,13 +71,14 @@ changedFilesRelPaths.forEach(async (relPath) => {
|
||||
if (!engResult) return
|
||||
const { data: engData } = engResult
|
||||
|
||||
console.log(chalk.red('fixing errors in ') + chalk.bold(relPath))
|
||||
console.log(chalk.bold(relPath))
|
||||
|
||||
const newData = data
|
||||
|
||||
fixableErrors.forEach(({ property }) => {
|
||||
fixableErrors.forEach(({ property, message }) => {
|
||||
const correctValue = get(engData, property)
|
||||
console.log(` [${property}]: ${get(data, property)} -> ${correctValue}`)
|
||||
console.log(chalk.red(` error message: [${property}] ${message}`))
|
||||
console.log(` fix property [${property}]: ${get(data, property)} -> ${correctValue}`)
|
||||
set(newData, property, correctValue)
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user