From 0e0d5bedc5fbcd6ed1261d9dbbb43d70346a4812 Mon Sep 17 00:00:00 2001 From: Pino Toscano Date: Wed, 23 Mar 2022 14:54:30 +0100 Subject: [PATCH] po: ignore js/jsx/html files under src/lib Cockpit's PF/React/build library (pkg/lib from cockpit.git) is checked out as src/lib, so exclude it from the search of js/jsx, and html sources for the extraction of i18n messages. This avoids the cockpit messages in case the message extraction is performed in a source tree after build. --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index d661cbc..4bd7605 100644 --- a/Makefile +++ b/Makefile @@ -33,10 +33,10 @@ po/$(PACKAGE_NAME).js.pot: --keyword=gettext:1,1t --keyword=gettext:1c,2,2t \ --keyword=ngettext:1,2,3t --keyword=ngettext:1c,2,3,4t \ --keyword=gettextCatalog.getString:1,3c --keyword=gettextCatalog.getPlural:2,3,4c \ - --from-code=UTF-8 $$(find src/ -name '*.js' -o -name '*.jsx') + --from-code=UTF-8 $$(find src/ \( -name '*.js' -o -name '*.jsx' \) \! -path 'src/lib/*') po/$(PACKAGE_NAME).html.pot: $(NODE_MODULES_TEST) - po/html2po -o $@ $$(find src -name '*.html') + po/html2po -o $@ $$(find src -name '*.html' \! -path 'src/lib/*') po/$(PACKAGE_NAME).manifest.pot: $(NODE_MODULES_TEST) po/manifest2po src/manifest.json -o $@