summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* i18n: git-bisect bisect_replay + $1 messagesÆvar Arnfjörð Bjarmason2011-05-211-3/+4
| | | | | | | | | | | Gettextize bisect_replay messages that use the $1 variable. Since it's subroutine local we have to provide an alias for it for eval_gettext. Since I was doing that anyway I've changed all other uses of $1 variable to use the alias variable for clarity. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* i18n: git-bisect bisect_reset + $1 messagesÆvar Arnfjörð Bjarmason2011-05-211-2/+4
| | | | | | | | ettextize bisect_reset messages that use 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> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* i18n: git-bisect bisect_run + $@ messagesÆvar Arnfjörð Bjarmason2011-05-211-3/+7
| | | | | | | | Gettextize bisect_run messages that use 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> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* i18n: git-bisect die + eval_gettext messagesÆvar Arnfjörð Bjarmason2011-05-211-6/+6
| | | | | Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* i18n: git-bisect die + gettext messagesÆvar Arnfjörð Bjarmason2011-05-211-8/+8
| | | | | Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* i18n: git-bisect echo + eval_gettext messageÆvar Arnfjörð Bjarmason2011-05-211-2/+5
| | | | | Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* i18n: git-bisect echo + gettext messagesÆvar Arnfjörð Bjarmason2011-05-211-3/+12
| | | | | Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* i18n: git-bisect gettext + echo messageÆvar Arnfjörð Bjarmason2011-05-211-2/+2
| | | | | Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* i18n: git-bisect add git-sh-i18nÆvar Arnfjörð Bjarmason2011-05-211-0/+1
| | | | | Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* i18n: git-stash drop_stash say/die messagesÆvar Arnfjörð Bjarmason2011-05-211-1/+2
| | | | | | | | | 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> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* i18n: git-stash "unknown option" messageÆvar Arnfjörð Bjarmason2011-05-211-2/+13
| | | | | | | | | | | | | | | | 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> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* i18n: git-stash die + eval_gettext $1 messagesÆvar Arnfjörð Bjarmason2011-05-211-1/+4
| | | | | | | | 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> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* i18n: git-stash die + eval_gettext $* messagesÆvar Arnfjörð Bjarmason2011-05-211-2/+8
| | | | | | | | 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> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* i18n: git-stash die + eval_gettext messagesÆvar Arnfjörð Bjarmason2011-05-211-1/+1
| | | | | Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* i18n: git-stash die + gettext messagesÆvar Arnfjörð Bjarmason2011-05-211-18/+18
| | | | | Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* i18n: git-stash say + gettext messagesÆvar Arnfjörð Bjarmason2011-05-211-2/+2
| | | | | Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* i18n: git-stash echo + gettext messageÆvar Arnfjörð Bjarmason2011-05-211-1/+4
| | | | | Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* i18n: git-stash add git-sh-i18nÆvar Arnfjörð Bjarmason2011-05-211-0/+1
| | | | | Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* i18n: git-submodule "blob" and "submodule" messagesÆvar Arnfjörð Bjarmason2011-05-212-6/+8
| | | | | | | | | | 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 a portion of a test with test_i18ncmp. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* i18n: git-submodule "path not initialized" messageÆvar Arnfjörð Bjarmason2011-05-212-3/+3
| | | | | | | | | Gettextize the "Submodule path '$path' not initialized" message. This is explicitly tested for so we need to skip a portion of a test with test_i18grep. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* i18n: git-submodule "[...] path is ignored" messageÆvar Arnfjörð Bjarmason2011-05-212-4/+7
| | | | | | | | | Gettextize the "The following path is ignored" message. This is explicitly tested for so we need to skip a portion of a test with test_i18ncmp. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* i18n: git-submodule "Entering [...]" messageÆvar Arnfjörð Bjarmason2011-05-212-3/+3
| | | | | | | | Gettextize the "Entering [...]" message. This is explicitly tested for so we need to skip a portion of a test with test_i18ncmp. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* i18n: git-submodule $errmsg messagesÆvar Arnfjörð Bjarmason2011-05-212-4/+4
| | | | | | | | | Gettextize warning messages stored in the $errmsg variable using eval_gettext interpolation. This is explicitly tested for so we need to skip a portion of a test with test_i18ncmp. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* i18n: git-submodule "Submodule change[...]" messagesÆvar Arnfjörð Bjarmason2011-05-212-3/+3
| | | | | | | | | Gettextize the "Submodules changed but not updated" and "Submodule changes to be committed" messages. This is explicitly tested for so we need to skip a portion of a test with test_i18ncmp. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* i18n: git-submodule "cached cannot be used" messageÆvar Arnfjörð Bjarmason2011-05-211-1/+1
| | | | | | | | | | 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> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* i18n: git-submodule $update_module say + die messagesÆvar Arnfjörð Bjarmason2011-05-212-10/+9
| | | | | | | | 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> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* i18n: git-submodule die + eval_gettext messagesÆvar Arnfjörð Bjarmason2011-05-211-19/+19
| | | | | Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* i18n: git-submodule say + eval_gettext messagesÆvar Arnfjörð Bjarmason2011-05-211-1/+1
| | | | | Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* i18n: git-submodule echo + eval_gettext messagesÆvar Arnfjörð Bjarmason2011-05-211-2/+5
| | | | | Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* i18n: git-submodule add git-sh-i18nÆvar Arnfjörð Bjarmason2011-05-211-0/+1
| | | | | Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* i18n: git-pull eval_gettext + warning messageÆvar Arnfjörð Bjarmason2011-05-211-3/+6
| | | | | Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* i18n: git-pull eval_gettext + die messageÆvar Arnfjörð Bjarmason2011-05-211-3/+3
| | | | | Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* i18n: git-pull die messagesÆvar Arnfjörð Bjarmason2011-05-211-9/+9
| | | | | Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* i18n: git-pull add git-sh-i18nÆvar Arnfjörð Bjarmason2011-05-211-0/+1
| | | | | Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* i18n: git-am printf(1) message to eval_gettextÆvar Arnfjörð Bjarmason2011-05-211-1/+1
| | | | | | | | | 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> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* i18n: git-am core say messagesÆvar Arnfjörð Bjarmason2011-05-213-6/+7
| | | | | | | | | | | 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 changed to use the test_i18* functions along with this translation. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* i18n: git-am "Falling back" say messageÆvar Arnfjörð Bjarmason2011-05-211-1/+1
| | | | | | | | Make the "Falling back to patching base and 3-way merge..." message used by fall_back_3way() translatable. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* i18n: git-am "Apply?" messageÆvar Arnfjörð Bjarmason2011-05-211-1/+4
| | | | | | | | | | | 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> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* i18n: git-am clean_abort messagesÆvar Arnfjörð Bjarmason2011-05-211-3/+3
| | | | | | | | | 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> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* i18n: git-am cannot_fallback messagesÆvar Arnfjörð Bjarmason2011-05-211-3/+3
| | | | | | | | 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> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* i18n: git-am die messagesÆvar Arnfjörð Bjarmason2011-05-211-7/+7
| | | | | | | | | | | | | 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> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* i18n: git-am gettext + gettext to stderr messageÆvar Arnfjörð Bjarmason2011-05-211-2/+5
| | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
* i18n: git-am eval_gettext messagesÆvar Arnfjörð Bjarmason2011-05-211-6/+6
| | | | | | | | | 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> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* i18n: git-am multi-line getttext $msg; echoÆvar Arnfjörð Bjarmason2011-05-211-5/+5
| | | | | | | | | 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> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* i18n: git-am one-line gettext $msg; echoÆvar Arnfjörð Bjarmason2011-05-211-3/+3
| | | | | | | | One-line `gettext $msg; echo' messages are the simplest use case for gettext(1). Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* i18n: git-am add git-sh-i18nÆvar Arnfjörð Bjarmason2011-05-211-0/+1
| | | | | | | | 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> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Makefile: add xgettext target for *.sh filesÆvar Arnfjörð Bjarmason2011-05-141-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change the "pot" target to also extract strings from our $(SCRIPT_SH) files with xgettext(1). Note that due to Jonathan Nieder's trick of doing "mv $@+ $@" at the end of the target the "pot" target will now warn: $ make pot XGETTEXT po/git.pot po/git.pot+: warning: Charset "CHARSET" is not a portable encoding name. Message conversion to user's charset might not work. This warnings is emitted because xgettext is writing into a non-*.pot file, it's harmless however. The content that's written out is equivalent to what it would be if we were writing directly into an existing POT file with --join-existing. As part of this change I've eliminated the && chain between xgettext calls, this is incompatible with $(QUIET_XGETTEXT), if the && is left in it'll emit: /bin/sh: @echo: not found Since it's redundant (the Makefile will stop if there's an error) I've removed it altogether. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* git-sh-i18n.sh: add GIT_GETTEXT_POISON supportÆvar Arnfjörð Bjarmason2011-05-141-9/+21
| | | | | | | | | | Change git-sh-i18n.sh to support the GIT_GETTEXT_POISON environment variable like gettext.c does, this ensures that tests that use git-sh-i18n.sh will fail under GETTEXT_POISON=YesPlease if they rely on Git's C locale messages without declaring that they do. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* git-sh-i18n.sh: add no-op gettext() and eval_gettext() wrappersÆvar Arnfjörð Bjarmason2011-05-144-0/+61
| | | | | | | | | | Add a no-op wrapper library for Git's shell scripts. To split up the gettext series I'm first submitting patches to gettextize the source tree before I add any of the Makefile and Shell library changes needed to actually use them. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* git-sh-i18n--envsubst: our own envsubst(1) for eval_gettext()Ævar Arnfjörð Bjarmason2011-05-145-0/+524
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a git-sh-i18n--envsubst program which is a stripped-down version of the GNU envsubst(1) program that comes with GNU gettext for use in the eval_gettext() fallback. We need a C helper program because implementing eval_gettext() purely in shell turned out to be unworkable. Digging through the Git mailing list archives will reveal two shell implementations of eval_gettext that are almost good enough, but fail on an edge case which is tested for in the tests which are part of this patch. These are the modifications I made to envsubst.c as I turned it into sh-i18n--envsubst.c: * Added our git-compat-util.h header for xrealloc() and friends. * Removed inclusion of gettext-specific headers. * Removed most of main() and replaced it with my own. The modified version only does option parsing for --variables. That's all it needs. * Modified error() invocations to use our error() instead of error(3). * Replaced the gettext XNMALLOC(n, size) macro with just xmalloc(n). Since XNMALLOC() only allocated char's. * Removed the string_list_destroy function. It's redundant (also in the upstream code). * Replaced the use of stdbool.h (a C99 header) by doing the following replacements on the code: * s/bool/unsigned short int/g * s/true/1/g * s/false/0/g Reported-by: Johannes Sixt <j.sixt@viscovery.net> Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>