diff --git a/script/prevent-translation-commits.js b/script/prevent-translation-commits.js index 4580f2c97898..81bfc554bd77 100755 --- a/script/prevent-translation-commits.js +++ b/script/prevent-translation-commits.js @@ -21,12 +21,12 @@ const filenames = execSync('git diff --cached --name-only').toString().trim().sp const localizedFilenames = filenames.filter(filename => filename.startsWith('translations/')) if (localizedFilenames.length) { - console.error('\n✋ Uh oh! Detected changes in the /translations directory.') + console.error('\n✋ Uh oh! Detected changes to the following files in the `/translations` directory:') + console.table(localizedFilenames.join('\n')) console.error('The content in this directory is managed by our Crowdin integration and should not be edited directly in the repo.') console.error('For more information on how the localization process works, see translations/README.md') - console.error('\nPlease revert your changes to the following files:\n') - console.table(localizedFilenames.join('\n')) - console.error('\nTip #1: You can unstage these changes on the command line using `git restore --staged translations`\n') - console.error('\nTip #2: You can bypass this hook by setting `ALLOW_TRANSLATION_COMMITS=true` in your .env file.`\n') + console.error('\nIf you have accidentally edited these files, you can unstage these changes on the command line using `git restore --staged translations`\n') + console.error('\nIf you are performing a merge from `main`, you should bypass this hook by using ` git commit --no-verify`\n') + console.error('\nIf you need to edit translated files often, you can set `ALLOW_TRANSLATION_COMMITS=true` in your .env file.`\n') process.exit(1) }