1
0
mirror of https://github.com/git/git.git synced 2025-04-08 20:25:51 +00:00
git/builtin
Jiang Xin 47fbfded53 i18n: only extract comments marked with "TRANSLATORS:"
When extract l10n messages, we use "--add-comments" option to keep
comments right above the l10n messages for references.  But sometimes
irrelevant comments are also extracted.  For example in the following
code block, the comment in line 2 will be extracted as comment for the
l10n message in line 3, but obviously it's wrong.

        { OPTION_CALLBACK, 0, "ignore-removal", &addremove_explicit,
          NULL /* takes no arguments */,
          N_("ignore paths removed in the working tree (same as
          --no-all)"),
          PARSE_OPT_NOARG, ignore_removal_cb },

Since almost all comments for l10n translators are marked with the same
prefix (tag): "TRANSLATORS:", it's safe to only extract comments with
this special tag.  I.E. it's better to call xgettext as:

        xgettext --add-comments=TRANSLATORS: ...

Also tweaks the multi-line comment in "init-db.c", to make it start with
the proper tag, not "* TRANSLATORS:" (which has a star before the tag).

Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-04-17 11:09:56 -07:00
..
2014-04-08 12:00:28 -07:00
2014-04-08 12:00:28 -07:00
2014-04-08 12:00:28 -07:00
2014-04-08 12:00:28 -07:00
2014-03-14 14:25:31 -07:00
2014-01-17 12:21:20 -08:00
2014-02-27 14:01:30 -08:00
2014-04-03 12:38:47 -07:00
2014-03-31 15:29:27 -07:00
2014-03-25 11:02:02 -07:00
2014-04-08 12:00:33 -07:00
2013-12-17 12:02:44 -08:00
2013-07-15 10:56:07 -07:00
2014-03-14 14:25:03 -07:00
2014-02-27 14:01:48 -08:00
2014-01-17 12:21:20 -08:00