Skip to content

Add gettext check to Lefthook

Dmitry Gruzd requested to merge add-gettext-check-to-lefthook into master

What does this MR do?

This MR introduces a gettext check for Lefthook to prevent engineers from waiting for the static-analysis job to fail when they forget to update the translations by running bin/rake gettext:regenerate

It will only be executed if any of changed lines include _(.

The bin/rake gettext:updated_check we use in this MR takes quite a long time, so it's disabled by default. Engineers can enable it in their lefthook-local.yml file if they want. Also, this MR includes a new documentation section to help enable such long-running checks.

Screenshots (strongly suggested)

Screenshot_2021-06-24_at_12.34.00

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

Does this MR contain changes to processing or storing of credentials or tokens, authorization and authentication methods or other items described in the security review guidelines? If not, then delete this Security section.

  • [-] Label as security and @ mention @gitlab-com/gl-security/appsec
  • [-] The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • [-] Security reports checked/validated by a reviewer from the AppSec team
Edited by Dmitry Gruzd

Merge request reports