Code

git.git
14 years agogettextize: git-bisect gettext + echo message
Ævar Arnfjörð Bjarmason [Tue, 14 Sep 2010 12:12:51 +0000 (12:12 +0000)]
gettextize: git-bisect gettext + echo message

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
14 years agogettextize: git-bisect add git-sh-i18n
Ævar Arnfjörð Bjarmason [Tue, 14 Sep 2010 12:09:49 +0000 (12:09 +0000)]
gettextize: git-bisect add git-sh-i18n

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
14 years agogettextize: git-stash drop_stash say/die messages
Ævar Arnfjörð Bjarmason [Tue, 14 Sep 2010 11:52:47 +0000 (11:52 +0000)]
gettextize: git-stash drop_stash say/die messages

Gettextize the say/die eval_gettext messages in the drop_stash
function. Since making these translatable would result in a long line
I've wrapped this into two lines.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
14 years agogettextize: git-stash "unknown option" message
Ævar Arnfjörð Bjarmason [Tue, 14 Sep 2010 11:42:21 +0000 (11:42 +0000)]
gettextize: git-stash "unknown option" message

Gettextize the "unknown option for 'stash save'" message that's shown
on:

    $ git stash save --blah-blah
    error: unknown option for 'stash save': --blah-blah
           To provide a message, use git stash save -- '--blah-blah'
    Usage: git stash list [<options>]

In a translation the second line should be aligned with the first
one. I've added a TRANSLATORS comment to indicate this.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
14 years agogettextize: git-stash die + eval_gettext $1 messages
Ævar Arnfjörð Bjarmason [Tue, 14 Sep 2010 11:40:25 +0000 (11:40 +0000)]
gettextize: git-stash die + eval_gettext $1 messages

Gettextize a messages that used the $1 variable. Since it's subroutine
local we have to provide an alias for it for eval_gettext.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
14 years agogettextize: git-stash die + eval_gettext $* messages
Ævar Arnfjörð Bjarmason [Tue, 14 Sep 2010 11:39:41 +0000 (11:39 +0000)]
gettextize: git-stash die + eval_gettext $* messages

Gettextize messages that used the $* variable. Since it's subroutine
local we have to provide an alias for it for eval_gettext.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
14 years agogettextize: git-stash die + eval_gettext messages
Ævar Arnfjörð Bjarmason [Tue, 14 Sep 2010 11:43:29 +0000 (11:43 +0000)]
gettextize: git-stash die + eval_gettext messages

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
14 years agogettextize: git-stash die + gettext messages
Ævar Arnfjörð Bjarmason [Tue, 14 Sep 2010 11:19:41 +0000 (11:19 +0000)]
gettextize: git-stash die + gettext messages

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
14 years agogettextize: git-stash say + gettext messages
Ævar Arnfjörð Bjarmason [Tue, 14 Sep 2010 11:42:53 +0000 (11:42 +0000)]
gettextize: git-stash say + gettext messages

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
14 years agogettextize: git-stash echo + gettext message
Ævar Arnfjörð Bjarmason [Tue, 14 Sep 2010 11:43:41 +0000 (11:43 +0000)]
gettextize: git-stash echo + gettext message

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
14 years agogettextize: git-stash add git-sh-i18n
Ævar Arnfjörð Bjarmason [Tue, 14 Sep 2010 11:17:26 +0000 (11:17 +0000)]
gettextize: git-stash add git-sh-i18n

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
14 years agogettextize: git-submodule "blob" and "submodule" messages
Ævar Arnfjörð Bjarmason [Mon, 13 Sep 2010 20:36:51 +0000 (20:36 +0000)]
gettextize: git-submodule "blob" and "submodule" messages

Gettextize the words "blob" and "submodule", which will be
interpolated in a message emitted by git-submodule. This is
explicitly tested for so we need to skip some tests with
NO_GETTEXT_POISON.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
14 years agogettextize: git-submodule "path not initialized" message
Ævar Arnfjörð Bjarmason [Mon, 13 Sep 2010 20:25:45 +0000 (20:25 +0000)]
gettextize: git-submodule "path not initialized" message

Gettextize the "Submodule path '$path' not initialized" message. This
is explicitly tested for so we need to skip some tests with
NO_GETTEXT_POISON.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
14 years agogettextize: git-submodule "[...] path is ignored" message
Ævar Arnfjörð Bjarmason [Mon, 13 Sep 2010 20:14:24 +0000 (20:14 +0000)]
gettextize: git-submodule "[...] path is ignored" message

Gettextize the "The following path is ignored" message. This is
explicitly tested for so we need to skip some tests with
NO_GETTEXT_POISON.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
14 years agogettextize: git-submodule "Entering [...]" message
Ævar Arnfjörð Bjarmason [Mon, 13 Sep 2010 20:25:45 +0000 (20:25 +0000)]
gettextize: git-submodule "Entering [...]" message

Gettextize the "Entering [...]" message. This is explicitly tested for
so we need to skip some tests with NO_GETTEXT_POISON.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
14 years agogettextize: git-submodule $errmsg messages
Ævar Arnfjörð Bjarmason [Mon, 13 Sep 2010 20:34:08 +0000 (20:34 +0000)]
gettextize: git-submodule $errmsg messages

Gettextize warning messages stored in the $errmsg variable using
eval_gettext interpolation. This is explicitly tested for so we need
to skip some tests with NO_GETTEXT_POISON.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
14 years agogettextize: git-submodule "Submodule change[...]" messages
Ævar Arnfjörð Bjarmason [Mon, 13 Sep 2010 20:25:16 +0000 (20:25 +0000)]
gettextize: git-submodule "Submodule change[...]" messages

Gettextize the "Submodules changed but not updated" and "Submodule
changes to be committed" messages. This is explicitly tested for so we
need to skip some tests with NO_GETTEXT_POISON.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
14 years agogettextize: git-submodule "cached cannot be used" message
Ævar Arnfjörð Bjarmason [Mon, 13 Sep 2010 20:07:45 +0000 (20:07 +0000)]
gettextize: git-submodule "cached cannot be used" message

Gettextize the "--cached cannot be used with --files" message. Since
this message starts with "--" we have to pass "--" as the first
argument. This works with both GNU gettext 0.18.1 (as expected), and
the gettext(1) on Solaris 10.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
14 years agogettextize: git-submodule $update_module say + die messages
Ævar Arnfjörð Bjarmason [Mon, 13 Sep 2010 20:30:45 +0000 (20:30 +0000)]
gettextize: git-submodule $update_module say + die messages

Gettextize $update_module say and die messages. These messages needed
to be split up to make them translatable.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
14 years agogettextize: git-submodule die + eval_gettext messages
Ævar Arnfjörð Bjarmason [Mon, 13 Sep 2010 20:06:09 +0000 (20:06 +0000)]
gettextize: git-submodule die + eval_gettext messages

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
14 years agogettextize: git-submodule say + eval_gettext messages
Ævar Arnfjörð Bjarmason [Mon, 13 Sep 2010 20:25:45 +0000 (20:25 +0000)]
gettextize: git-submodule say + eval_gettext messages

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
14 years agogettextize: git-submodule echo + eval_gettext messages
Ævar Arnfjörð Bjarmason [Mon, 13 Sep 2010 20:26:03 +0000 (20:26 +0000)]
gettextize: git-submodule echo + eval_gettext messages

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
14 years agogettextize: git-submodule add git-sh-i18n
Ævar Arnfjörð Bjarmason [Mon, 13 Sep 2010 20:43:25 +0000 (20:43 +0000)]
gettextize: git-submodule add git-sh-i18n

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
14 years agogettextize: git-pull "rebase against" / "merge with" messages
Ævar Arnfjörð Bjarmason [Mon, 13 Sep 2010 19:22:37 +0000 (19:22 +0000)]
gettextize: git-pull "rebase against" / "merge with" messages

Gettextize the two messages that used "rebase against" and "merge
with". Split them into two depending on whether we are rebasing or not.

This results in some duplication, but makes it much easier for
translators to translate these messages.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
14 years agogettextize: git-pull "[...] not currently on a branch" message
Ævar Arnfjörð Bjarmason [Mon, 13 Sep 2010 19:03:26 +0000 (19:03 +0000)]
gettextize: git-pull "[...] not currently on a branch" message

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
14 years agogettextize: git-pull "You asked to pull" message
Ævar Arnfjörð Bjarmason [Mon, 13 Sep 2010 19:02:23 +0000 (19:02 +0000)]
gettextize: git-pull "You asked to pull" message

Gettextize the "You asked to pull" error message. This message
interpolated $1 which won't work with eval_gettext for obvious
reasons, so I needed to provide an alias for it.

This also made the message easier to translate, and I added a
TRANSLATORS comment to make it even easier.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
14 years agogettextize: git-pull split up "no candidate" message
Ævar Arnfjörð Bjarmason [Mon, 13 Sep 2010 18:53:21 +0000 (18:53 +0000)]
gettextize: git-pull split up "no candidate" message

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
14 years agogettextize: git-pull eval_gettext + warning message
Ævar Arnfjörð Bjarmason [Mon, 13 Sep 2010 18:49:29 +0000 (18:49 +0000)]
gettextize: git-pull eval_gettext + warning message

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
14 years agogettextize: git-pull eval_gettext + die message
Ævar Arnfjörð Bjarmason [Mon, 13 Sep 2010 18:47:44 +0000 (18:47 +0000)]
gettextize: git-pull eval_gettext + die message

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
14 years agogettextize: git-pull die messages
Ævar Arnfjörð Bjarmason [Mon, 13 Sep 2010 18:13:50 +0000 (18:13 +0000)]
gettextize: git-pull die messages

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
14 years agogettextize: git-pull add git-sh-i18n
Ævar Arnfjörð Bjarmason [Mon, 13 Sep 2010 18:09:43 +0000 (18:09 +0000)]
gettextize: git-pull add git-sh-i18n

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
14 years agogettext docs: add "Testing marked strings" section to po/README
Ævar Arnfjörð Bjarmason [Fri, 10 Sep 2010 23:40:08 +0000 (23:40 +0000)]
gettext docs: add "Testing marked strings" section to po/README

Add a "Testing marked strings" section to po/README which documents
the GETTEXT_POISON=YesPlease debug switch and the NO_GETTEXT_POISON
test prerequisite.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
14 years agogettext docs: the Git::I18N Perl interface
Ævar Arnfjörð Bjarmason [Fri, 10 Sep 2010 19:10:36 +0000 (19:10 +0000)]
gettext docs: the Git::I18N Perl interface

Change po/README's "Marking strings for translation" section so that
it covers the Git::I18N Perl interface.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
14 years agogettext docs: the git-sh-i18n.sh Shell interface
Ævar Arnfjörð Bjarmason [Fri, 10 Sep 2010 18:57:20 +0000 (18:57 +0000)]
gettext docs: the git-sh-i18n.sh Shell interface

Change po/README's "Marking strings for translation" section so that
it covers the git-sh-i18n.sh Shell interface.

The existing documentation in git-sh-i18n.sh has been moved to the
README file, to avoid them drifting in apart..

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
14 years agogettext docs: the gettext.h C interface
Ævar Arnfjörð Bjarmason [Fri, 10 Sep 2010 19:21:47 +0000 (19:21 +0000)]
gettext docs: the gettext.h C interface

Change po/README's "Marking strings for translation" section so that
it covers the gettext.h C interface.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
14 years agogettext docs: add "Marking strings for translation" section in po/README
Ævar Arnfjörð Bjarmason [Fri, 10 Sep 2010 18:46:20 +0000 (18:46 +0000)]
gettext docs: add "Marking strings for translation" section in po/README

Add a "Marking strings for translation" section to po/README and
mention it in Documentation/CodingGuidelines.

This section documents how the maintainers of Git's source code should
go about properly marking strings for translation.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
14 years agogettext docs: add a "Testing your changes" section to po/README
Ævar Arnfjörð Bjarmason [Fri, 10 Sep 2010 17:43:13 +0000 (17:43 +0000)]
gettext docs: add a "Testing your changes" section to po/README

Change po/README to tell translators that they should do `make` at the
top-level before submitting their translations. Many common errors
will be caught with the `msgfmt --check` run that the Makefile will
compile the message catalogs with.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
14 years agopo/pl.po: add Polish translation
Marcin Cieślak [Mon, 30 Aug 2010 17:29:05 +0000 (17:29 +0000)]
po/pl.po: add Polish translation

An incomplete Polish translation.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Marcin Cieślak <saper@saper.info>
14 years agopo/hi.po: add Hindi Translation
Ramkumar Ramachandra [Thu, 9 Sep 2010 14:02:09 +0000 (19:32 +0530)]
po/hi.po: add Hindi Translation

Translate a few Git messages to Standard Hindi. It uses a phonetic
script called Devanagari. Focus especially on transforming grammar and
tense in a sane manner to serve as a guideline for future translators.

Note that Devanagari rendering is broken on many applications by
default at this time- the latest Emacs, Vim and Chrome render it
incorrectly.

Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
Acked-by: Antriksh Pany <antriksh.pany@gmail.com>
Acked-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
14 years agopo/en_GB.po: add British English translation
Sam Reed [Fri, 3 Sep 2010 17:29:48 +0000 (17:29 +0000)]
po/en_GB.po: add British English translation

Translate three Git messages from US to British English. These all had
to do with z v.s. s differences.

Signed-off-by: Sam Reed <sam@reedyboy.net>
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
14 years agopo/de.po: add German translation
Jan Krüger [Fri, 3 Sep 2010 13:32:07 +0000 (15:32 +0200)]
po/de.po: add German translation

An incomplete German translation.

Signed-off-by: Jan Krüger <jk@jk.gs>
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
14 years agoMakefile: only add gettext tests on XGETTEXT_INCLUDE_TESTS=YesPlease
Ævar Arnfjörð Bjarmason [Mon, 13 Sep 2010 12:42:29 +0000 (12:42 +0000)]
Makefile: only add gettext tests on XGETTEXT_INCLUDE_TESTS=YesPlease

Change the "pot" target so that the xgettext(1) invocation no longer
include test files from t/t0200.

These should only be included in the Icelandic is.po file since Git's
own test suite uses them for regression tests, but nobody else should
translate them. Previously I indicated this with a TRANSLATORS comment
for all the strings:

    #. TRANSLATORS: This is a test. You don't need to translate it.
    #, c-format
    msgid "TEST: A C test string %s"
    msgstr ""

But if translators follow those instructions they'll never have 100%
translation coverage. It's much better to add a hidden option so that
is.po now has to use a special git.pot file for msgmerge(1):

    make pot XGETTEXT_INCLUDE_TESTS=YesPlease

But everything else can continue to use the documented:

    make pot

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
14 years agogettext docs: add po/README file documenting Git's gettext
Ævar Arnfjörð Bjarmason [Fri, 3 Sep 2010 15:36:58 +0000 (15:36 +0000)]
gettext docs: add po/README file documenting Git's gettext

Add a po/README file. This documentation is targated at translators
and maintainers of git.git.

Currently it describes how to add new PO files and how to update
them. But in the future we want to add more things to it, e.g. how and
what to add in TRANSLATOR comments, how to make the source more
gettext friendly etc.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
14 years agogettextize: git-am printf(1) message to eval_gettext
Ævar Arnfjörð Bjarmason [Tue, 7 Sep 2010 14:57:02 +0000 (14:57 +0000)]
gettextize: git-am printf(1) message to eval_gettext

Convert a message that used printf(1) format to use eval_gettext. It's
easier for translators to handle the latter, since the eval format
automatically gives them context via variable names.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
14 years agogettextize: git-am core say messages
Ævar Arnfjörð Bjarmason [Tue, 7 Sep 2010 14:55:56 +0000 (14:55 +0000)]
gettextize: git-am core say messages

Make the core git-am messages that use say() translatable. These are
visible on almost every git am invocation.

There are tests that depend on the "Applying" output that need to be
skipped along with this translation.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
14 years agogettextize: git-am "Apply?" message
Ævar Arnfjörð Bjarmason [Tue, 7 Sep 2010 14:37:41 +0000 (14:37 +0000)]
gettextize: git-am "Apply?" message

Make the "Apply? [y]es/[n]o/[e]dit/[v]iew patch/[a]ccept all" message
translatable, and leave a note in a TRANSLATORS comment explaining
that translators have to preserve a mention of the y/n/e/v/a
characters since the program will expect them, and not their
localized equivalents.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
14 years agogettextize: git-am clean_abort messages
Ævar Arnfjörð Bjarmason [Tue, 7 Sep 2010 14:54:27 +0000 (14:54 +0000)]
gettextize: git-am clean_abort messages

Messages that used the clean_abort function needed both gettext(1) and
eval_gettext(). These need to be interpolated in a string like the die
and cannot_fallback messages.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
14 years agogettextize: git-am cannot_fallback messages
Ævar Arnfjörð Bjarmason [Tue, 7 Sep 2010 14:36:09 +0000 (14:36 +0000)]
gettextize: git-am cannot_fallback messages

Translate messages with gettext(1) before they're passed to the
cannot_fallback function, just like we handle the die function.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
14 years agogettextize: git-am die messages
Ævar Arnfjörð Bjarmason [Tue, 7 Sep 2010 14:11:04 +0000 (14:11 +0000)]
gettextize: git-am die messages

The die messages in git-am need to use:

    die "$(gettext "string")"

Since gettext(1) emits the message instead of returning it like the C
equivalent, and our die() function in git-sh-setup needs to get a
string as an argument.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
14 years agogettextize: git-am eval_gettext messages
Ævar Arnfjörð Bjarmason [Tue, 7 Sep 2010 14:12:59 +0000 (14:12 +0000)]
gettextize: git-am eval_gettext messages

Messages that use variables to be interpolated need to use
eval_gettext(), this wrapper will eval the message and expand the
variable for us.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
14 years agogettextize: git-am multi-line getttext $msg; echo
Ævar Arnfjörð Bjarmason [Tue, 7 Sep 2010 14:35:18 +0000 (14:35 +0000)]
gettextize: git-am multi-line getttext $msg; echo

When we have multi-line `gettext $msg; echo' messages we can't
preserve the existing indenting because gettext(1) can't accept input
on stdin.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
14 years agogettextize: git-am one-line gettext $msg; echo
Ævar Arnfjörð Bjarmason [Tue, 7 Sep 2010 14:20:05 +0000 (14:20 +0000)]
gettextize: git-am one-line gettext $msg; echo

One-line `gettext $msg; echo' messages are the simplest use case for
gettext(1).

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
14 years agogettextize: git-am add git-sh-i18n
Ævar Arnfjörð Bjarmason [Tue, 7 Sep 2010 14:03:50 +0000 (14:03 +0000)]
gettextize: git-am add git-sh-i18n

Source git-sh-i18n in git-am.sh, it's needed to import the Git gettext
shell functions.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
14 years agogettext tests: add GETTEXT_POISON tests for shell scripts
Ævar Arnfjörð Bjarmason [Tue, 7 Sep 2010 15:38:23 +0000 (15:38 +0000)]
gettext tests: add GETTEXT_POISON tests for shell scripts

Test the new GETTEXT_POISON=YesPlease support for shell scripts. This
test is derived from the existing t0201-gettext-fallbacks.sh test.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
14 years agogettext tests: add GETTEXT_POISON support for shell scripts
Ævar Arnfjörð Bjarmason [Tue, 7 Sep 2010 15:25:05 +0000 (15:25 +0000)]
gettext tests: add GETTEXT_POISON support for shell scripts

Expand the existing GETTEXT_POISON=YesPlease support to support shell
scripts. Analogous the existing C support this is needed to test that
changes to the output of the shell scripts don't break the plumbing
output.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
14 years agoMakefile: MSGFMT="msgfmt --check" under GNU_GETTEXT
Ævar Arnfjörð Bjarmason [Tue, 7 Sep 2010 12:06:42 +0000 (12:06 +0000)]
Makefile: MSGFMT="msgfmt --check" under GNU_GETTEXT

GNU msgfmt(1) supports the --check parameter which does various sanity
checks on the translated strings we're processing, including checks
that the printf(3) format of "c-format" translations matches the
original. I.e. that a "%s" isn't missing, or that there aren't
spurious or missing newlines in the translation.

Since Solaris msgfmt(1) doesn't support --check we have to wrap this
in `ifdef GNU_GETTEXT'.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
14 years agoMakefile: add GNU_GETTEXT, set when we expect GNU gettext
Ævar Arnfjörð Bjarmason [Tue, 7 Sep 2010 12:00:46 +0000 (12:00 +0000)]
Makefile: add GNU_GETTEXT, set when we expect GNU gettext

Add a GNU_GETTEXT flag that's set to YesPlease by default everywhere
but on Solaris if the NO_GETTEXT flag isn't set.

Everyone uses GNU gettext these days except Solaris developers, so
having a dumb check for this that just depends on SunOS should be
OK.

I also don't plan to use this (for the time being) for anything that
would break if it isn't correctly set (e.g. if you're using GNU
libintl on Solaris), so I haven't added paranoid autoconf guards.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
14 years agogettextize: git-shortlog basic messages
Ævar Arnfjörð Bjarmason [Sun, 5 Sep 2010 15:26:44 +0000 (15:26 +0000)]
gettextize: git-shortlog basic messages

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
14 years agogettextize: git-revert split up "could not revert/apply" message
Ævar Arnfjörð Bjarmason [Sun, 5 Sep 2010 14:54:15 +0000 (14:54 +0000)]
gettextize: git-revert split up "could not revert/apply" message

Split up the "could not %s %s... %s" message into "could not revert
%s... %s" and "could not apply %s... %s". This makes it easier for
translators to understand the message.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
14 years agogettextize: git-revert literal "me" messages
Ævar Arnfjörð Bjarmason [Sun, 5 Sep 2010 14:34:40 +0000 (14:34 +0000)]
gettextize: git-revert literal "me" messages

Translate messages that use the `me' variable. These are all error
messages referencing the command name, so the name shouldn't be
translated.

Reported-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
14 years agogettextize: git-revert "Your local changes" message
Ævar Arnfjörð Bjarmason [Tue, 7 Sep 2010 13:33:18 +0000 (13:33 +0000)]
gettextize: git-revert "Your local changes" message

Translate the "Your local changes [...]" message without using the
`me' variable, instead split up the two messages so translators can
translate the whole messages as-is.

Reported-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
14 years agogettextize: git-revert basic messages
Ævar Arnfjörð Bjarmason [Sun, 5 Sep 2010 14:11:57 +0000 (14:11 +0000)]
gettextize: git-revert basic messages

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
14 years agogettextize: git-notes "Refusing to %s notes in %s" message
Ævar Arnfjörð Bjarmason [Sun, 5 Sep 2010 14:02:13 +0000 (14:02 +0000)]
gettextize: git-notes "Refusing to %s notes in %s" message

The first %s in "Refusing to %s notes in %s" is one of "git notes
ACTION". So we need to mark those actions for translation and later
use _().

Also add a TRANSLATORS comment explaining to translators what the
first %s means.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
14 years agogettextize: git-notes GIT_NOTES_REWRITE_MODE error message
Ævar Arnfjörð Bjarmason [Sun, 5 Sep 2010 13:56:57 +0000 (13:56 +0000)]
gettextize: git-notes GIT_NOTES_REWRITE_MODE error message

Use sprintf format for the error message that's displayed if
GIT_NOTES_REWRITE_MODE is invalid, and leave a note in a TRANSLATORS
comment indicating what the message means.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
14 years agogettextize: git-notes basic commands
Ævar Arnfjörð Bjarmason [Sun, 5 Sep 2010 13:49:10 +0000 (13:49 +0000)]
gettextize: git-notes basic commands

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
14 years agogettextize: git-gc "Auto packing the repository" message
Ævar Arnfjörð Bjarmason [Sun, 5 Sep 2010 12:52:02 +0000 (12:52 +0000)]
gettextize: git-gc "Auto packing the repository" message

Split up the "Auto packing the repository" message into quiet and
verbose variants to make translation easier.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
14 years agogettextize: git-gc basic messages
Ævar Arnfjörð Bjarmason [Sun, 5 Sep 2010 12:47:15 +0000 (12:47 +0000)]
gettextize: git-gc basic messages

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
14 years agogettextize: git-describe basic messages
Ævar Arnfjörð Bjarmason [Sun, 5 Sep 2010 12:43:31 +0000 (12:43 +0000)]
gettextize: git-describe basic messages

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
14 years agogettextize: git-clean clean.requireForce messages
Ævar Arnfjörð Bjarmason [Sun, 5 Sep 2010 12:34:17 +0000 (12:34 +0000)]
gettextize: git-clean clean.requireForce messages

Split up the "clean.requireForce set/defaults to true..." die()
message to make it easier to translate.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
14 years agogettextize: git-clean basic messages
Ævar Arnfjörð Bjarmason [Sun, 5 Sep 2010 12:31:48 +0000 (12:31 +0000)]
gettextize: git-clean basic messages

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
14 years agogettextize: git-bundle basic messages
Ævar Arnfjörð Bjarmason [Sun, 5 Sep 2010 12:29:55 +0000 (12:29 +0000)]
gettextize: git-bundle basic messages

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
14 years agogettextize: git-archive basic messages
Ævar Arnfjörð Bjarmason [Sun, 5 Sep 2010 12:28:29 +0000 (12:28 +0000)]
gettextize: git-archive basic messages

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
14 years agogettextize: git-status "renamed: " message
Ævar Arnfjörð Bjarmason [Sun, 19 Sep 2010 14:29:46 +0000 (14:29 +0000)]
gettextize: git-status "renamed: " message

Gettextize the "renamed: %s -> %s" message which appears as part of
git-status(1) output. Two tests in t4001-diff-rename.sh explicitly
checked for this message. Change them to skip under
GETTEXT_POISON=YesPlease.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
14 years agogettextize: git-status "Initial commit" message
Ævar Arnfjörð Bjarmason [Sun, 19 Sep 2010 14:59:27 +0000 (14:59 +0000)]
gettextize: git-status "Initial commit" message

Gettextize the "# Initial commit" message. A test in t7501-commit.sh
explicitly checked for this message. Change it to skip under
GETTEXT_POISON=YesPlease.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
14 years agogettextize: git-status "Changes to be committed" message
Ævar Arnfjörð Bjarmason [Sun, 19 Sep 2010 17:27:44 +0000 (17:27 +0000)]
gettextize: git-status "Changes to be committed" message

Gettextize the "# Changes to be committed:" messages. Several tests
explicitly checked for this message. Change them to skip under
GETTEXT_POISON=YesPlease.

Since these tests didn't check for the rest of the git-status(1)
output this change has been split up from the "git-status basic
messages" patch.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
14 years agogettextize: git-status shortstatus messages
Ævar Arnfjörð Bjarmason [Thu, 2 Sep 2010 19:17:17 +0000 (19:17 +0000)]
gettextize: git-status shortstatus messages

Make the messages added in v1.7.2-rc0~54^2~1 translatable. Some of
these could use the to be implemented plural support in the gettext
library.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
14 years agogettextize: git-status "nothing to commit" messages
Ævar Arnfjörð Bjarmason [Sun, 19 Sep 2010 18:25:18 +0000 (18:25 +0000)]
gettextize: git-status "nothing to commit" messages

Gettextize the "nothing to commit" messages. Many tests explicitly
checked for this message. Change them to skip under
GETTEXT_POISON=YesPlease.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
14 years agogettextize: git-status basic messages
Ævar Arnfjörð Bjarmason [Thu, 2 Sep 2010 19:12:26 +0000 (19:12 +0000)]
gettextize: git-status basic messages

Gettextize the most common git-status messages. Many tests checked for
these explicitly. Change them to skip under GETTEXT_POISON=YesPlease.

Some of the tests in t7508-status.sh needed to be split up when I
added NO_GETTEXT_POISON to them, since parts of them affected later
tests (some of which aren't being skipped) indirectly.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
14 years agogettextize: git-push "prevent you from losing" message
Ævar Arnfjörð Bjarmason [Sun, 19 Sep 2010 19:32:01 +0000 (19:32 +0000)]
gettextize: git-push "prevent you from losing" message

Gettextize the "To prevent you from losing history" message. A test in
lib-httpd.sh and another in t5541-http-push.sh explicitly checked for
this message. Change them to skip under GETTEXT_POISON=YesPlease.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
14 years agogettextize: git-push basic messages
Ævar Arnfjörð Bjarmason [Thu, 2 Sep 2010 18:58:04 +0000 (18:58 +0000)]
gettextize: git-push basic messages

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
14 years agogettextize: git-tag tag_template message
Ævar Arnfjörð Bjarmason [Thu, 2 Sep 2010 18:55:40 +0000 (18:55 +0000)]
gettextize: git-tag tag_template message

Mark the tag_template message as translatable with N_() and then use
it later with _(). We need to skip a test under GETTEXT_POISON that
relies on the output having a leading newline.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
14 years agogettextize: git-tag basic messages
Ævar Arnfjörð Bjarmason [Thu, 2 Sep 2010 18:53:33 +0000 (18:53 +0000)]
gettextize: git-tag basic messages

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
14 years agogettextize: git-reset "Unstaged changes after reset" message
Ævar Arnfjörð Bjarmason [Sun, 19 Sep 2010 13:36:28 +0000 (13:36 +0000)]
gettextize: git-reset "Unstaged changes after reset" message

Gettextize the ""Unstaged changes after reset:" message. A test in
t7102-reset.sh explicitly checked for this message. Change it to skip
under GETTEXT_POISON=YesPlease.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
14 years agogettextize: git-reset reset_type_names messages
Ævar Arnfjörð Bjarmason [Thu, 2 Sep 2010 18:46:15 +0000 (18:46 +0000)]
gettextize: git-reset reset_type_names messages

Make the messages in git-reset that use the reset_type_names static
array to be translatable by marking the array items with N_() and
using _() later.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
14 years agogettextize: git-reset basic messages
Ævar Arnfjörð Bjarmason [Thu, 2 Sep 2010 18:41:55 +0000 (18:41 +0000)]
gettextize: git-reset basic messages

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
14 years agogettextize: git-rm basic messages
Ævar Arnfjörð Bjarmason [Thu, 2 Sep 2010 18:37:33 +0000 (18:37 +0000)]
gettextize: git-rm basic messages

Make the basic git-mv messages translatable, but skip things like "rm
'%s'\n" and "git rm '%s'\n" for now.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
14 years agogettextize: git-mv "bad" messages
Ævar Arnfjörð Bjarmason [Thu, 2 Sep 2010 18:28:56 +0000 (18:28 +0000)]
gettextize: git-mv "bad" messages

Gettextize messages made by assigning to the "bad" char* variable.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
14 years agogettextize: git-mv basic messages
Ævar Arnfjörð Bjarmason [Thu, 2 Sep 2010 18:26:27 +0000 (18:26 +0000)]
gettextize: git-mv basic messages

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
14 years agogettextize: git-merge "Wonderful" message
Ævar Arnfjörð Bjarmason [Sun, 19 Sep 2010 14:18:47 +0000 (14:18 +0000)]
gettextize: git-merge "Wonderful" message

Gettextize the "Wonderful" message. A test in t7600-merge.sh
explicitly checked for this message. Change it to skip under
GETTEXT_POISON=YesPlease.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
14 years agogettextize: git-merge "You have not concluded your merge" messages
Ævar Arnfjörð Bjarmason [Sun, 19 Sep 2010 15:20:50 +0000 (15:20 +0000)]
gettextize: git-merge "You have not concluded your merge" messages

Gettextize the "You have not concluded your merge messages. A test in
t3030-merge-recursive.sh explicitly checked for this message. Change
it to skip the test under GETTEXT_POISON=YesPlease.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
14 years agogettextize: git-merge "Updating %s..%s" message
Ævar Arnfjörð Bjarmason [Sun, 19 Sep 2010 14:43:47 +0000 (14:43 +0000)]
gettextize: git-merge "Updating %s..%s" message

Gettextize the "Updating %s..%s\n" message. A test in
t1200-tutorial.sh explicitly checked for this message. Split it into
two tests to skip the test_cmp test under GETTEXT_POISON=YesPlease.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
14 years agogettextize: git-merge basic messages
Ævar Arnfjörð Bjarmason [Thu, 2 Sep 2010 17:47:52 +0000 (17:47 +0000)]
gettextize: git-merge basic messages

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
14 years agogettextize: git-log "--OPT does not make sense" messages
Ævar Arnfjörð Bjarmason [Sun, 19 Sep 2010 15:11:42 +0000 (15:11 +0000)]
gettextize: git-log "--OPT does not make sense" messages

Gettextize the "--name-only/--name-status/--check does not make sense"
messages. A test in t4014-format-patch.sh explicitly checked for these
messages. Change them to skip under GETTEXT_POISON=YesPlease.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
14 years agogettextize: git-log basic messages
Ævar Arnfjörð Bjarmason [Thu, 2 Sep 2010 17:35:39 +0000 (17:35 +0000)]
gettextize: git-log basic messages

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
14 years agogettextize: git-grep "--open-files-in-pager" message
Ævar Arnfjörð Bjarmason [Sun, 19 Sep 2010 14:08:50 +0000 (14:08 +0000)]
gettextize: git-grep "--open-files-in-pager" message

Gettextize the "--open-files-in-pager only works on the worktree"
message. A test in t7811-grep-open.sh explicitly checked for this
message. Change it to skip under GETTEXT_POISON=YesPlease.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
14 years agogettextize: git-grep basic messages
Ævar Arnfjörð Bjarmason [Thu, 2 Sep 2010 17:30:36 +0000 (17:30 +0000)]
gettextize: git-grep basic messages

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
14 years agogettextize: git-fetch split up "(non-fast-forward)" message
Ævar Arnfjörð Bjarmason [Fri, 3 Sep 2010 23:59:27 +0000 (23:59 +0000)]
gettextize: git-fetch split up "(non-fast-forward)" message

Split up the "(non-fast-forward)" message from printf directives and
make it translatable.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
14 years agogettextize: git-fetch update_local_ref messages
Ævar Arnfjörð Bjarmason [Fri, 3 Sep 2010 23:58:01 +0000 (23:58 +0000)]
gettextize: git-fetch update_local_ref messages

Translate a "[rejected]" message spotted by Jeff King, and other
things in update_local_ref along with it.

Reported-by: Jeff King <peff@peff.net>
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
14 years agogettextize: git-fetch formatting messages
Ævar Arnfjörð Bjarmason [Thu, 2 Sep 2010 17:29:01 +0000 (17:29 +0000)]
gettextize: git-fetch formatting messages

Translate some of the formatting messages that appear on git-fetch
showing how branches/tags etc. were updated.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
14 years agogettextize: git-fetch basic messages
Ævar Arnfjörð Bjarmason [Thu, 2 Sep 2010 17:21:53 +0000 (17:21 +0000)]
gettextize: git-fetch basic messages

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>