Skip to content

Some strings are missing in gitlab.pot generation

Summary

In various .vue and .js files there are some strings wrapped with s__() and __() according to the docs, but when I run bin/rake gettext:find they are not found in the locale/gitlab.pot

Steps to reproduce

  1. Checkout a new branch at commit 50fda506
  2. rm locale/gitlab.pot && bin/rake gettext:find
  3. Search for the text "GCP has billing" and see that it is used in this file, but it does not show in the gitlab.pot

Why is this happening?

It looks like this is happening because gettext doesn't match s__() patterns that are broken up into multiple lines.

// gettext won't find this :(
console.log(__s(
  'LoremIpsum|Some very long string that looks better on a new line'
));

// gettext will find this :|
console.log(__s('LoremIpsum|Some very long string that looks better on a new line'));
Edited by Paul Slaughter