]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
Makefile: inject package name/version/bugreport into pot file
authorDarrick J. Wong <djwong@kernel.org>
Tue, 1 Apr 2025 14:44:12 +0000 (07:44 -0700)
committerAndrey Albershteyn <aalbersh@kernel.org>
Tue, 8 Apr 2025 09:20:10 +0000 (11:20 +0200)
Inject the package name and version ("xfsprogs") and the bug reporting
URL into the generated gettext .pot file.  This isn't strictly
necessary, it's more just polish.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Andrey Albershteyn <aalbersh@kernel.org>
Reviewed-by: Bill O'Donnell <bodonnel@redhat.com>
configure.ac
include/builddefs.in
include/buildrules

index f039bc9128fa4b11588ee9de9eded3c7904bec62..71596711685a8a9bfb473a41ef18757a0921c195 100644 (file)
@@ -4,6 +4,7 @@ AC_CONFIG_AUX_DIR([.])
 AC_CONFIG_MACRO_DIR([m4])
 AC_CONFIG_SRCDIR([include/libxfs.h])
 AC_PREFIX_DEFAULT(/usr)
+AC_SUBST(PACKAGE_BUGREPORT)
 
 # Default CFLAGS if nobody specifies anything else
 if test "${CFLAGS+set}" != "set"; then
index fe2a7824a8653fd480564ee775bdeeac2be2f679..04b4e0880a84b84caa5e311bf6207aee39c22c75 100644 (file)
@@ -42,6 +42,7 @@ PKG_GROUP     = @pkg_group@
 PKG_RELEASE    = @pkg_release@
 PKG_VERSION    = @pkg_version@
 PKG_DISTRIBUTION= @pkg_distribution@
+PKG_BUGREPORT  = @PACKAGE_BUGREPORT@
 
 prefix         = @prefix@
 exec_prefix    = @exec_prefix@
index 6b76abced9ed0c2939aa5d75b93532c8b029fe96..ae047ac41fe27ca22541873c0d76c92674736f47 100644 (file)
@@ -85,9 +85,17 @@ endif
 endif
 
 ifdef POTHEAD
+XGETTEXT_FLAGS=\
+       --language=C \
+       --keyword=_ \
+       --keyword=N_ \
+       --package-name=$(PKG_NAME) \
+       --package-version=$(PKG_VERSION) \
+       --msgid-bugs-address=$(PKG_BUGREPORT)
+
 $(POTHEAD): $(XGETTEXTFILES)
        @echo "    [GETTXT] $@"
-       $(Q)$(XGETTEXT) --language=C --keyword=_ --keyword=N_ -o $@ $(XGETTEXTFILES)
+       $(Q)$(XGETTEXT) $(XGETTEXT_FLAGS) -o $@ $(XGETTEXTFILES)
 
 # Update translations
 update-po: $(POTHEAD) $(wildcard $(TOPDIR)/po/*.po)