diff options
author | Junio C Hamano <gitster@pobox.com> | 2017-07-20 11:57:01 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-07-20 12:21:18 -0700 |
commit | fc0fd5b23bc84c517eff409b7cbc78cc2473a071 (patch) | |
tree | 1039db64d8ec9550a3c65f24061784794ca1ce72 /prio-queue.c | |
parent | A few more topics before 2.14-rc1 (diff) | |
download | tgif-fc0fd5b23bc84c517eff409b7cbc78cc2473a071.tar.xz |
Makefile: help gettext tools to cope with our custom PRItime format
We started using our own timestamp_t type and PRItime format
specifier to go along with it, so that we can later change the
underlying type and output format more easily, but this does not
play well with gettext tools.
Because gettext tools need to keep the *.po file portable across
platforms, they have to special-case the format specifiers like
PRIuMAX that are known types in inttypes.h, instead of letting CPP
handle strings like
"%" PRIuMAX " seconds ago"
as an ordinary string concatenation. They fundamentally cannot do
the same for our own custom type/format.
Given that po/git.pot needs to be generated only once every release
and by only one person, i.e. the l10n coordinator, let's update the
Makefile rule to generate po/git.pot so that gettext tools are run
on a munged set of sources in which all mentions of PRItime are
replaced with PRIuMAX, which is what we happen to use right now.
This way, developers do not have to care that PRItime does not play
well with gettext, and translators do not have to care that we use
our own PRItime.
The credit for the idea to munge the source files goes to Dscho.
Possible bugs are mine.
Helped-by: Jiang Xin <worldhello.net@gmail.com>
Helped-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'prio-queue.c')
0 files changed, 0 insertions, 0 deletions