Skip to content

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

  1. Check out this branch locally
  2. Create a new branch from this branch (name it whatever you like, it will be discarded after)
  3. Make an edit to any externalized string in a vue file -- any string that is wrapped in s__(...) will do.
  4. Commit your change (a change like this needs to be in an un-pushed local commit to test the functionality changed in this MR)
  5. run lefthook run pre-push on the command line
    • You should get an error, because lefthook's gettext check will fail. Beneath the failing gettext check output, you should see a line that says PO files need to be updated. Try running bin/rake gettext:regenerate
  6. Check this branch out again and delete your branch from step 2

Here's an example of the sort of output you should see:

image

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Chad Lavimoniere

Merge request reports