@code{NSLocalizedStaticString}, @code{__}.
@item
-For Shell scripts: @code{gettext}, @code{ngettext:1,2}, @code{eval_gettext},
-@code{eval_ngettext:1,2}, @code{eval_pgettext:1c,2},
-@code{eval_npgettext:1c,2,3}.
+For Shell scripts:
+@code{gettext}, @code{ngettext:1,2},
+@code{printf_gettext}, @code{printf_ngettext:1,2},
+@code{eval_gettext}, @code{eval_ngettext:1,2},
+@code{eval_pgettext:1c,2}, @code{eval_npgettext:1c,2,3}.
@item
For Python: @code{gettext}, @code{ugettext}, @code{dgettext:2},
xgettext.texi! */
x_sh_keyword ("gettext");
x_sh_keyword ("ngettext:1,2");
+ x_sh_keyword ("printf_gettext");
+ x_sh_keyword ("printf_ngettext:1,2");
/* Note: There is also special handling for 'gettext' and 'ngettext'
in read_command, below. */
x_sh_keyword ("eval_gettext");
xgettext_record_flag ("eval_npgettext:2:sh-format");
xgettext_record_flag ("eval_npgettext:3:sh-format");
xgettext_record_flag ("printf:1:sh-printf-format");
+ xgettext_record_flag ("printf_gettext:1:sh-printf-format");
+ xgettext_record_flag ("printf_ngettext:1:sh-printf-format");
+ xgettext_record_flag ("printf_ngettext:2:sh-printf-format");
}
((argparser->keyword_len == 7
&& memcmp (argparser->keyword, "gettext", 7) == 0)
|| (argparser->keyword_len == 8
- && memcmp (argparser->keyword, "ngettext", 8) == 0));
+ && memcmp (argparser->keyword, "ngettext", 8) == 0)
+ || (argparser->keyword_len == 14
+ && memcmp (argparser->keyword, "printf_gettext", 14) == 0)
+ || (argparser->keyword_len == 15
+ && memcmp (argparser->keyword, "printf_ngettext", 15) == 0));
bool accepts_expand =
((argparser->keyword_len == 7
&& memcmp (argparser->keyword, "gettext", 7) == 0)
printf "`gettext 'User name: %s\nUser ID: %u'`"'\n' "$USER" `id -u`
+printf_gettext 'User name: %s\nUser id: %u\n' "$USER" `id -u`
+
+printf_ngettext 'Delete the file?' 'Delete %u files?' $n $n
+
# Test string concatenation.
gettext "concat_0_""part2"
msgid "User name: %s\\nUser ID: %u"
msgstr ""
+#, sh-printf-format
+msgid "User name: %s\\nUser id: %u\\n"
+msgstr ""
+
+#, sh-printf-format
+msgid "Delete the file?"
+msgid_plural "Delete %u files?"
+msgstr[0] ""
+msgstr[1] ""
+
msgid "concat_0_part2"
msgstr ""