i18n: New keywords for xgettext extraction from sh

Since we have additional shell wrappers (gettextln and eval_gettextln)
for gettext, we need to take into account these wrappers when running
'make pot' to extract messages from shell scripts.

Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
Reviewed-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
i18n: rebase: mark messages for translation

Mark messages in git-rebase.sh for translation.  While doing this
Jonathan noticed that the comma usage and sentence structure of the
resolvemsg was not quite right, so correct that and its cousins in
git-am.sh and t/t0201-gettext-fallbacks.sh at the same time.

Some tests would start to fail with GETTEXT_POISON turned on after
this update.  Use test_i18ncmp and test_i18ngrep where appropriate
to mark strings that should only be checked in the C locale output
to avoid such issues.

Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
Reviewed-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
i18n: leave \n out of translated diffstat

GETTEXT_POISON scrapes everything in translated strings, including \n.
t4205.12 however needs this \n in matching the end result. Keep this
\n out of translation to make t4205.12 happy.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
i18n: Rewrite gettext messages start with dash

Gettext message in a shell script should not start with '-', one
workaround is adding '--' between gettext and the message, like:

    gettext -- "--exec option ..."

But due to a bug in the xgettext extraction, xgettext can not
extract the actual message for this case. Rewriting the message
is a simpler and better solution.

Reported-by: Vincent van Ravesteijn <vfr@lyx.org>
Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Reviewed-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
rebase: remove obsolete and unused LONG_USAGE which breaks xgettext

Since there is a modern OPTIONS_SPEC variable in use in this script,
the obsolete USAGE and LONG_USAGE variables are no longer used.
Remove them.

In addition, the obsolete LONG_USAGE variable has the following
message in it:

    A'\''--B'\''--C'\''

And such complex LONG_USAGE message will break xgettext when
extracting l10n messages (but if single quotes are removed from the
message, xgettext works fine on 'git-rebase.sh').

Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
Reviewed-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
i18n: am: mark more strings for translation

Mark strings in 'git-am.sh' for translation. In the last chunk,
change '$1' to '-b/--binary', as it is not worth turning this
message to "The %s option has been..." and using printf on it.

Also reduce one indentation level for one gettextln clause introduced
in commit de88c1c.

Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
Reviewed-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Remove dead code which contains bad gettext block

Found this dead code when I examine gettext messages in shell scripts
start with dash ('-' or '--'). An error will be raised for this case,
like:

    $ gettext "-d option is no longer supported.  Do not use."
    gettext: missing arguments

Indead, this code has been left as dead for a long time, as Jonathan
points out:

    The git am -d/--dotest option has errored out with a message
    since e72c7406 (am: remove support for -d .dotest, 2008-03-04).
    The error message about lack of support was eliminated along
    with other cleanups (probably by mistake) a year later by
    removing the option from the option table in 98ef23b3 (git-am:
    minor cleanups, 2009-01-28).

    But the code to handle -d and --dotest stayed around even though
    ever since then it could not be tripped.  Remove this dead code.

Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
Reviewed-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
i18n: merge-recursive: mark strings for translation

Mark strings in merge-recursive for translation.

Some tests would start to fail with GETTEXT_POISON turned on after
this update.  Use test_i18ncmp and test_i18ngrep where appropriate
to mark strings that should only be checked in the C locale output
to avoid such issues.

Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
Reviewed-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
l10n: Update git.pot (4 new, 3 removed messages)

Generate po/git.pot from v1.7.12-rc0-54-g9e211, and there are 4 new,
3 removed l10n messages.

 * 4 new messages are added at lines:
   1254, 1264, 1459, 1523

 * 3 old messages are deleted from the previous version at lines:
   1254, 1273, 2854

Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
l10n: zh_CN.po: translate 4 new messages

Translate 4 new messages came from git.pot update in 0bbe5b4
(l10n: Update git.pot (4 new, 3 removed messages))

Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
l10n: vi.po: translate 4 new messages

Update Vietnamse translation to POT file in 0bbe5b4

Signed-off-by: Tran Ngoc Quan <vnwildman@gmail.com>
l10n: de.po: translate 4 new messages

Translate 4 new messages came from git.pot update in 0bbe5b4
(l10n: Update git.pot (4 new, 3 removed messages)).

Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
Merge branch 'jx/i18n-1.7.11'

Add i18n support for scripted Porcelains, and mark strings in
merge(-recursive), am, and rebase for i18n.

* jx/i18n-1.7.11:
  i18n: merge-recursive: mark strings for translation
  Remove dead code which contains bad gettext block
  i18n: am: mark more strings for translation
  rebase: remove obsolete and unused LONG_USAGE which breaks xgettext
  i18n: Rewrite gettext messages start with dash
  i18n: rebase: mark messages for translation
  i18n: New keywords for xgettext extraction from sh
Merge branch 'nd/maint-i18n-diffstat'

* nd/maint-i18n-diffstat:
  i18n: leave \n out of translated diffstat
git-rebase.sh: fix typo in an error message

Fix a typo in the error messages which is shown if it seems that a
rebase is already in progress.

Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Merge git://github.com/git-l10n/git-po

* git://github.com/git-l10n/git-po:
  l10n: de.po: translate 4 new messages
  l10n: vi.po: translate 4 new messages
  l10n: zh_CN.po: translate 4 new messages
  l10n: Update git.pot (4 new, 3 removed messages)
l10n: Update git.pot (76 new, 4 removed messages)

Generate po/git.pot from v1.7.12-rc1-16-g05a20, and there are 76 new,
4 removed l10n messages.

 * 76 new messages are added at lines:

   230, 337-580, 4972, 4984, 4998, 5017, 5280-5378, 5654

 * 4 old messages are deleted from the previous version at lines:

   230, 4729, 4764, 5295

Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
l10n: vi.po update to follow POT in 3b613

* Translated 76 new messages

Signed-off-by: Tran Ngoc Quan <vnwildman@gmail.com>
git-remote-mediawiki: replace TODO-list in comment by appropriate link

My account on Github is now used as wiki and issue tracking. This will be
more flexible than in-tree management of a TODO-list.

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
l10n: zh_CN.po: translate 76 new messages

Translate 76 new messages came from git.pot update in 3b6137f
(l10n: Update git.pot (76 new, 4 removed messages))

Thynson reviewed this update and also contributed other improvements:

 * blob -> 二进制对象（blob）
 * 共用 -> 同时使用

Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
Reviewed-by: Thynson <lanxingcan@gmail.com>