Skip to content

Commit 45b79fb

Browse files
authored
Merge branch 'main' into 4169-remove-github-one
2 parents 6eef0aa + a59306d commit 45b79fb

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

script/prevent-translation-commits.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@ const filenames = execSync('git diff --cached --name-only').toString().trim().sp
2121
const localizedFilenames = filenames.filter(filename => filename.startsWith('translations/'))
2222

2323
if (localizedFilenames.length) {
24-
console.error('\n✋ Uh oh! Detected changes in the /translations directory.')
24+
console.error('\n✋ Uh oh! Detected changes to the following files in the `/translations` directory:')
25+
console.table(localizedFilenames.join('\n'))
2526
console.error('The content in this directory is managed by our Crowdin integration and should not be edited directly in the repo.')
2627
console.error('For more information on how the localization process works, see translations/README.md')
27-
console.error('\nPlease revert your changes to the following files:\n')
28-
console.table(localizedFilenames.join('\n'))
29-
console.error('\nTip #1: You can unstage these changes on the command line using `git restore --staged translations`\n')
30-
console.error('\nTip #2: You can bypass this hook by setting `ALLOW_TRANSLATION_COMMITS=true` in your .env file.`\n')
28+
console.error('\nIf you have accidentally edited these files, you can unstage these changes on the command line using `git restore --staged translations`\n')
29+
console.error('\nIf you are performing a merge from `main`, you should bypass this hook by using ` git commit --no-verify`\n')
30+
console.error('\nIf you need to edit translated files often, you can set `ALLOW_TRANSLATION_COMMITS=true` in your .env file.`\n')
3131
process.exit(1)
3232
}

0 commit comments

Comments
 (0)