Update lefthook error message for gettext
What does this MR do and why?
Add clarifying output suggesting how dev can solve gettext error when running lefthook run pre-push
with outdated PO files.
Related to Clarify documentation on updating PO files (!137179 - merged)
How to set up and validate locally
- Check out this branch locally
- Create a new branch from this branch (name it whatever you like, it will be discarded after)
- Make an edit to any externalized string in a vue file -- any string that is wrapped in
s__(...)
will do. - Commit your change (a change like this needs to be in an un-pushed local commit to test the functionality changed in this MR)
- run
lefthook run pre-push
on the command line- You should get an error, because lefthook's
gettext
check will fail. Beneath the failinggettext
check output, you should see a line that saysPO files need to be updated. Try running bin/rake gettext:regenerate
- You should get an error, because lefthook's
- Check this branch out again and delete your branch from step 2
Here's an example of the sort of output you should see:
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Chad Lavimoniere