I did: > * po/Makefile: New file. > * po/Makevars: New file, based on the template from GNU gettext.
Oops, there were two mistakes here. Reported by Benno Schulenberg. Fixed like this: 2024-12-09 Bruno Haible <br...@clisp.org> Localizations: Fix omissions from the POT file. Reported by Benno Schulenberg. * po/Makefile ($(DOMAIN).pot): Remove the file pre-filtering; just pass all source files to xgettext. * po/Makevars (XGETTEXT_OPTIONS): Recognize gettext_noop as a keyword. diff --git a/po/Makefile b/po/Makefile index 7dfccb2db0..26b6ad5b8e 100644 --- a/po/Makefile +++ b/po/Makefile @@ -12,7 +12,7 @@ $(DOMAIN).pot: force --package-version='$(VERSION)' \ --msgid-bugs-address='$(MSGID_BUGS_ADDRESS)' \ $(XGETTEXT_OPTIONS) \ - `cd .. && LC_ALL=C grep -l '[^A-Za-z_]_(' \`find lib '(' -name '*.c' -o -name '*.h' -o -name '*.y' ')' | LC_ALL=C sort\`` + `cd .. && find lib '(' -name '*.c' -o -name '*.h' -o -name '*.y' ')' | LC_ALL=C sort` mv $(DOMAIN).po $(DOMAIN).pot force: diff --git a/po/Makevars b/po/Makevars index 6383129aa5..74f99cfa27 100644 --- a/po/Makevars +++ b/po/Makevars @@ -15,6 +15,7 @@ top_builddir = .. XGETTEXT_OPTIONS = \ --keyword=_ --flag=_:1:pass-c-format \ --keyword=N_ --flag=N_:1:pass-c-format \ + --keyword=gettext_noop --flag=gettext_noop:1:pass-c-format \ --flag=error:3:c-format --flag=error_at_line:5:c-format \ --flag=verror:3:c-format --flag=verror_at_line:5:c-format \ --flag=argp_error:2:c-format --flag=argp_failure:4:c-format \