Skip to content

Silence gettext_extractor only if '--silent' is passed

Peter Leitzen requested to merge pl-gettext-extractor-silent into master

What does this MR do and why?

Before this commit this script was always silent.

Reason:

p 'x' in ['x']

This always returns x because it's Ruby's pattern matching syntax and not Array#include? or x in list in Python.

Follow-up of !124843 (comment 1827257758).

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

How to set up and validate locally

$ tooling/bin/gettext_extractor
Please provide a target file name as the first argument, e.g.
  tooling/bin/gettext_extractor locale/gitlab.pot

$ tooling/bin/gettext_extractor --silent
Please provide a target file name as the first argument, e.g.
  tooling/bin/gettext_extractor locale/gitlab.pot

$ tooling/bin/gettext_extractor locale/gitlab.pot
Extracting translatable strings from source files...
All done. Please commit the changes to `locale/gitlab.pot`.

$ tooling/bin/gettext_extractor locale/gitlab.pot --silent

$ tooling/bin/gettext_extractor --silent locale/gitlab.pot
Edited by Peter Leitzen

Merge request reports