From 4db97420210b1393566e9d361ca8253f60aad3d0 Mon Sep 17 00:00:00 2001 From: Daiki Ueno Date: Mon, 17 Jun 2013 11:56:41 +0900 Subject: [PATCH] Enable python-brace-format detection by default. --- gettext-tools/src/ChangeLog | 5 +++++ gettext-tools/src/x-python.c | 12 ++++++++++++ gettext-tools/tests/ChangeLog | 5 +++++ gettext-tools/tests/format-python-brace-1 | 2 +- 4 files changed, 23 insertions(+), 1 deletion(-) diff --git a/gettext-tools/src/ChangeLog b/gettext-tools/src/ChangeLog index 45d639b3d..ce6b6c873 100644 --- a/gettext-tools/src/ChangeLog +++ b/gettext-tools/src/ChangeLog @@ -1,3 +1,8 @@ +2013-06-17 Daiki Ueno + + * x-python.c (init_flag_table_python): Enable python-brace-format + by default. + 2013-06-17 Daiki Ueno * x-glade.c (start_element_null): New function. diff --git a/gettext-tools/src/x-python.c b/gettext-tools/src/x-python.c index a3a106cfc..faafa503e 100644 --- a/gettext-tools/src/x-python.c +++ b/gettext-tools/src/x-python.c @@ -133,6 +133,18 @@ init_flag_table_python () xgettext_record_flag ("dngettext:3:pass-python-format"); xgettext_record_flag ("_:1:pass-python-format"); /* xgettext_record_flag ("%:1:python-format"); // % is an infix operator! */ + + xgettext_record_flag ("gettext:1:pass-python-brace-format"); + xgettext_record_flag ("ugettext:1:pass-python-brace-format"); + xgettext_record_flag ("dgettext:2:pass-python-brace-format"); + xgettext_record_flag ("ngettext:1:pass-python-brace-format"); + xgettext_record_flag ("ngettext:2:pass-python-brace-format"); + xgettext_record_flag ("ungettext:1:pass-python-brace-format"); + xgettext_record_flag ("ungettext:2:pass-python-brace-format"); + xgettext_record_flag ("dngettext:2:pass-python-brace-format"); + xgettext_record_flag ("dngettext:3:pass-python-brace-format"); + xgettext_record_flag ("_:1:pass-python-brace-format"); + /* xgettext_record_flag ("format:1:python-brace-format"); */ } diff --git a/gettext-tools/tests/ChangeLog b/gettext-tools/tests/ChangeLog index f9c4073a3..2ed5f275c 100644 --- a/gettext-tools/tests/ChangeLog +++ b/gettext-tools/tests/ChangeLog @@ -1,3 +1,8 @@ +2013-06-17 Daiki Ueno + + * format-python-brace-1: No need to pass + --flag=gettext:1:pass-python-brace-format to xgettext. + 2013-06-17 Daiki Ueno * Makefile.am: Rename xgettext-gtkbuilder-* to diff --git a/gettext-tools/tests/format-python-brace-1 b/gettext-tools/tests/format-python-brace-1 index 34462307a..1c4f46843 100755 --- a/gettext-tools/tests/format-python-brace-1 +++ b/gettext-tools/tests/format-python-brace-1 @@ -42,7 +42,7 @@ while read comment; do cat < f-pyb-1-$n.in gettext(${string}); EOF - ${XGETTEXT} -L Python --flag=gettext:1:pass-python-brace-format -o f-pyb-1-$n.po f-pyb-1-$n.in || exit 1 + ${XGETTEXT} -L Python -o f-pyb-1-$n.po f-pyb-1-$n.in || exit 1 test -f f-pyb-1-$n.po || exit 1 fail= if echo "$comment" | grep 'Valid:' > /dev/null; then -- 2.47.2