diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-03-24 00:13:49 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-03-24 00:13:49 +0300 |
commit | 00ab3a60fed93cb3c6c9148d9c9c68fb11d325ee (patch) | |
tree | bef28d84085f23cfbd30a3a1ed74a601eaa2eef5 /scripts | |
parent | 68caf5fd883a7fd5a3395c2e5ae2a5c511445613 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/frontend/extract_gettext_all.js | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/scripts/frontend/extract_gettext_all.js b/scripts/frontend/extract_gettext_all.js index 922aa85241f..0cd6ab99a3a 100644 --- a/scripts/frontend/extract_gettext_all.js +++ b/scripts/frontend/extract_gettext_all.js @@ -19,7 +19,7 @@ extractor.addMessageTransformFunction(ensureSingleLine); const jsParser = extractor.createJsParser([ // Place all the possible expressions to extract here: - JsExtractors.callExpression('__', { + JsExtractors.callExpression(['__', 's__'], { arguments: { text: 0, }, @@ -30,15 +30,13 @@ const jsParser = extractor.createJsParser([ textPlural: 1, }, }), - JsExtractors.callExpression('s__', { - arguments: { - text: 0, - }, - }), ]); const vueParser = decorateJSParserWithVueSupport(jsParser, { vue2TemplateCompiler, + // All of our expressions contain `__`. + // So we can safely ignore parsing files _not_ containing it. + guard: '__', }); function printJson() { |