summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry V. Levin <ldv@altlinux.org>2021-03-21 08:00:00 +0000
committerDmitry V. Levin <ldv@altlinux.org>2021-04-26 20:00:00 +0000
commit883f3d0151f61f6eb93c397501570527cd19044a (patch)
tree80efaa7ad5a28006106b3728fe327fcb079b0064
parenta81366e011f686ca4a907673801fb4902a7e790c (diff)
downloadelfutils-883f3d0151f61f6eb93c397501570527cd19044a.tar.gz
po: update XGETTEXT_OPTIONS
Recognize sgettext as a macro which is used for translations. Flag _, N_, and sgettext with pass-c-format. The effect of this specification is that xgettext will propagate format string requirements for _, N_, and sgettext calls to their first arguments, and thus mark them as format strings. Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
-rw-r--r--po/ChangeLog4
-rw-r--r--po/Makevars11
2 files changed, 13 insertions, 2 deletions
diff --git a/po/ChangeLog b/po/ChangeLog
index 798db019..50439333 100644
--- a/po/ChangeLog
+++ b/po/ChangeLog
@@ -1,3 +1,7 @@
+2021-03-21 Dmitry V. Levin <ldv@altlinux.org>
+
+ * Makevars (XGETTEXT_OPTIONS): Update.
+
2021-02-21 Piotr Drąg <piotrdrag@gmail.com>
* pl.po: Updated.
diff --git a/po/Makevars b/po/Makevars
index 086de588..692394cc 100644
--- a/po/Makevars
+++ b/po/Makevars
@@ -8,8 +8,15 @@ subdir = po
top_builddir = ..
# These options get passed to xgettext.
-XGETTEXT_OPTIONS = --keyword=_ --keyword=N_ --flag=error:3:c-format \
- --flag=ERROR:1:c-format --flag=argp_error:2:c-format \
+XGETTEXT_OPTIONS = --keyword=_ \
+ --keyword=N_ \
+ --keyword=sgettext:1g \
+ --flag=_:1:pass-c-format \
+ --flag=N_:1:pass-c-format \
+ --flag=sgettext:1:pass-c-format \
+ --flag=error:3:c-format \
+ --flag=ERROR:1:c-format \
+ --flag=argp_error:2:c-format \
--add-comments
# This is the copyright holder that gets inserted into the header of the