[PATCH v4 11/38] i18n: bisect: simplify error message for i18n

2016-06-07 Thread Vasco Almeida
Internationalization from gettext manual [1]: "Simplify translatable strings so that they don't contain command substitution ("`...`" or "$(...)") [...]" [1] http://www.gnu.org/software/gettext/manual/html_node/Preparing-Shell-Scripts.html Signed-off-by: Vasco Almei

Re: What's cooking in git.git (Jun 2016, #02; Mon, 6)

2016-06-07 Thread Vasco Almeida
Junio C Hamano pobox.com> writes: > * va/i18n-even-more (2016-05-26) 22 commits > - t5523: use test_i18ngrep for negation [snip because of gmane] > - i18n: advice: mark string about detached head for translation > - i18n: builtin/remote.c: fix mark for translation > > More markings of mess

Re: [PATCH v3 24/39] i18n: bisect: enable l10n of bisect terms in messages

2016-06-03 Thread Vasco Almeida
Às 17:33 de 02-06-2016, Junio C Hamano escreveu: > Vasco Almeida writes: > >> Às 17:38 de 01-06-2016, Junio C Hamano escreveu: >>> Vasco Almeida writes: >>> >>>> @@ -739,7 +748,7 @@ static void handle_bad_merge_base(void) >>>>

Re: [PATCH v3 28/39] i18n: config: unfold error messages marked for translation

2016-06-02 Thread Vasco Almeida
Às 17:43 de 01-06-2016, Junio C Hamano escreveu: > Vasco Almeida writes: > >> Introduced in 473166b ("config: add 'origin_type' to config_source >> struct", 2016-02-19), Git can inform the user about the origin of a >> config error, but the

Re: [PATCH v3 13/39] i18n: git-sh-setup.sh: mark strings for translation

2016-06-02 Thread Vasco Almeida
Às 20:30 de 01-06-2016, Junio C Hamano escreveu: > Junio C Hamano writes: > Would it allow you to lose the $(git --exec-path) prefix in the new > dot-source to have this patch before applying your patch? > > -- >8 -- > Subject: t2300: run git-sh-setup in an environment that better mimics the > r

Re: [PATCH v3 24/39] i18n: bisect: enable l10n of bisect terms in messages

2016-06-02 Thread Vasco Almeida
Às 17:38 de 01-06-2016, Junio C Hamano escreveu: > Vasco Almeida writes: > >> +enum term { BAD, GOOD, OLD, NEW }; >> +static const char *term_names[] = { >> +/* TRANSLATORS: in bisect.c source code file, the following terms are >> + used to describe a "bad co

[PATCH v3 38/39] i18n: unmark die messages for translation

2016-06-01 Thread Vasco Almeida
These messages are relevant for the programmer only, not for the end user. Thus, they can be unmarked for translation, saving translator some work. Signed-off-by: Vasco Almeida --- git-bisect.sh | 2 +- wt-status.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/git

[PATCH v3 35/39] i18n: init-db: join message pieces

2016-06-01 Thread Vasco Almeida
Join message displayed during repository initialization in one entire sentence. That would improve translations since it's easier translate an entire sentence than translating each piece. Signed-off-by: Vasco Almeida --- builtin/init-db.c | 17 ++--- 1 file changed, 10 inser

[PATCH v3 37/39] i18n: submodule: escape shell variables inside eval_gettext

2016-06-01 Thread Vasco Almeida
-Scripts.html Signed-off-by: Vasco Almeida --- git-submodule.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/git-submodule.sh b/git-submodule.sh index 91fca56..75a7ebe 100755 --- a/git-submodule.sh +++ b/git-submodule.sh @@ -648,7 +648,7 @@ cmd_update

[PATCH v3 34/39] i18n: remote: allow translations to reorder message

2016-06-01 Thread Vasco Almeida
Before this patch, translations couldn't place the branch name where it was better fit in the message "and with remote ". Allow translations that, instead of forcing the branch name to display right of the message. Signed-off-by: Vasco Almeida --- builtin/remote.c | 7 +++ 1

[PATCH v3 39/39] i18n: branch: mark comment when editing branch description for translation

2016-06-01 Thread Vasco Almeida
When one issues git branch --edit-description branch_name, a edit with that message commented out is opened. Mark that message for translation in to order to be localized. Signed-off-by: Vasco Almeida --- builtin/branch.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a

[PATCH v3 36/39] i18n: submodule: join strings marked for translation

2016-06-01 Thread Vasco Almeida
Join strings marked for translation since that would facilitate and improve translations result. Signed-off-by: Vasco Almeida --- git-submodule.sh | 18 ++ 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/git-submodule.sh b/git-submodule.sh index 5a4dec0..91fca56

[PATCH v3 26/39] i18n: notes: mark strings for translation

2016-06-01 Thread Vasco Almeida
. Fix conflicts in %s and [...]". Signed-off-by: Vasco Almeida --- builtin/notes.c | 20 ++-- t/t3310-notes-merge-manual-resolve.sh | 8 t/t3320-notes-merge-worktrees.sh | 2 +- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git

[PATCH v3 22/39] t5523: use test_i18ngrep for negation

2016-06-01 Thread Vasco Almeida
of consistency and also to make obvious that those strings are subject to i18n. Signed-off-by: Vasco Almeida --- t/t5523-push-upstream.sh | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/t/t5523-push-upstream.sh b/t/t5523-push-upstream.sh index 4a7b98b..d6981ba 100755

[PATCH v3 00/39] i18n and test updates

2016-06-01 Thread Vasco Almeida
fixes issues comment on the previous discussion and adds patches to mark more strings for translation. Previous discussion: http://thread.gmane.org/gmane.comp.version-control.git/295354 Interdiff v2 v3 included bellow. Vasco Almeida (39): i18n: builtin/remote.c: fix mark for translation i18n

[PATCH v3 29/39] i18n: merge: mark messages for translation

2016-06-01 Thread Vasco Almeida
Mark messages shown to the user for translation. Signed-off-by: Vasco Almeida --- builtin/merge.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/builtin/merge.c b/builtin/merge.c index b555a1b..961def5 100644 --- a/builtin/merge.c +++ b/builtin/merge.c @@ -1014,7

[PATCH v3 11/39] i18n: bisect: simplify error message for i18n

2016-06-01 Thread Vasco Almeida
Internationalization from gettext manual [1]: "Simplify translatable strings so that they don't contain command substitution ("`...`" or "$(...)") [...]" [1] http://www.gnu.org/software/gettext/manual/html_node/Preparing-Shell-Scripts.html Signed-off-by: Vasco Almei

[PATCH v3 02/39] i18n: advice: mark string about detached head for translation

2016-06-01 Thread Vasco Almeida
Mark string with advice seen by the user when in detached head. Update test t7201-co.sh to pass under GETTEXT_POISON build. Pretend success if the number of lines of "git checkout renamer^" output is not greater than 1 and test are running under GETTEXT_POISON. Signed-off-by: Vas

[PATCH v3 30/39] i18n: merge: change command option help to lowercase

2016-06-01 Thread Vasco Almeida
Change command option description to lowercase, matching pull counterpart option. Translators would have to translate such message only once. Signed-off-by: Vasco Almeida --- builtin/merge.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builtin/merge.c b/builtin/merge.c

[PATCH v3 09/39] i18n: rebase: fix marked string to use eval_gettext variant

2016-06-01 Thread Vasco Almeida
The string message marked for translation should use eval_gettext variant instead of the gettext one, since we want to dollar-substitute $head_name in the result. Signed-off-by: Vasco Almeida --- git-rebase.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git-rebase.sh b

[PATCH v3 27/39] i18n: notes: mark options for translation

2016-06-01 Thread Vasco Almeida
Mark options description of git prune for translation. Signed-off-by: Vasco Almeida --- builtin/notes.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/builtin/notes.c b/builtin/notes.c index d11e6eb..0572051 100644 --- a/builtin/notes.c +++ b/builtin/notes.c @@ -934,8

[PATCH v3 21/39] t4153: fix negated test_i18ngrep call

2016-06-01 Thread Vasco Almeida
tests: fix negated test_i18ngrep calls", 2014-08-13). Signed-off-by: Vasco Almeida --- t/t4153-am-resume-override-opts.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/t/t4153-am-resume-override-opts.sh b/t/t4153-am-resume-override-opts.sh index 7c013d8..8ea22d1 1007

[PATCH v3 03/39] i18n: advice: internationalize message for conflicts

2016-06-01 Thread Vasco Almeida
languages. Signed-off-by: Vasco Almeida --- advice.c| 17 +++-- builtin/pull.c | 2 +- t/t5520-pull.sh | 2 +- 3 files changed, 17 insertions(+), 4 deletions(-) diff --git a/advice.c b/advice.c index cb445a7..b84ae49 100644 --- a/advice.c +++ b/advice.c @@ -79,7 +79

[PATCH v3 23/39] i18n: bisect: mark strings for translation

2016-06-01 Thread Vasco Almeida
In the last message, involving Q_(), try to mark the message in such way that is suited for RTL (Right to Left) languages. Update test t6030-bisect-porcelain.sh to reflect the changes. Signed-off-by: Vasco Almeida --- bisect.c| 56

[PATCH v3 31/39] i18n: sequencer: add period to error message

2016-06-01 Thread Vasco Almeida
Add a period to error message so it matches others instances in sequencer.c. Now translator would have to translate such message only once. Signed-off-by: Vasco Almeida --- sequencer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sequencer.c b/sequencer.c index 57b3671

[PATCH v3 10/39] i18n: rebase: mark placeholder for translation

2016-06-01 Thread Vasco Almeida
Mark placeholder "" in git-rebase.sh for translation. The string containing the named placeholder is passed to shell function error_on_missing_default_upstream in git-parse-remote.sh which uses it to display a command hint for the user. Signed-off-by: Vasco Almeida --- git-rebase.sh

[PATCH v3 07/39] i18n: merge-octopus: mark messages for translation

2016-06-01 Thread Vasco Almeida
Mark messages in git-merge-octopus.sh for translation. Signed-off-by: Vasco Almeida --- git-merge-octopus.sh | 18 ++ 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/git-merge-octopus.sh b/git-merge-octopus.sh index dc2fd1b..89e967a 100755 --- a/git-merge

[PATCH v3 01/39] i18n: builtin/remote.c: fix mark for translation

2016-06-01 Thread Vasco Almeida
The second string inside _() was not being extracted for translation by xgettext, meaning that, although the string was passed to gettext, there was no translation available. Mark each individual string instead of marking the result of ternary if. Signed-off-by: Vasco Almeida --- builtin

[PATCH v3 08/39] merge-octupus: use die shell function from git-sh-setup.sh

2016-06-01 Thread Vasco Almeida
Source git-sh-setup in order to use die shell function from git-sh-setup.sh library instead of using the one defined in git-merge-octopus.sh. Remove the former die function. Signed-off-by: Vasco Almeida --- git-merge-octopus.sh | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff

[PATCH v3 28/39] i18n: config: unfold error messages marked for translation

2016-06-01 Thread Vasco Almeida
gibility and code conciseness are improved for that instance. Signed-off-by: Vasco Almeida --- cache.h| 9 - config.c | 102 - submodule-config.c | 2 +- 3 files changed, 95 insertions(+), 18 deletions(-) diff -

[PATCH v3 25/39] i18n: transport-helper.c: change N_() call to _()

2016-06-01 Thread Vasco Almeida
The N_() no-op call currently marks the string to be extracted by xgettext but doesn't trigger the retrieval of the translation at run time, whereas _() does both. Meaning that, in spite of having translations available, they were never retrieved to make use of them. Signed-off-by: Vasco Al

[PATCH v3 04/39] i18n: transport: mark strings for translation

2016-06-01 Thread Vasco Almeida
Mark one printf string and one error string for translation. Signed-off-by: Vasco Almeida --- transport.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/transport.c b/transport.c index 095e61f..59b911e 100644 --- a/transport.c +++ b/transport.c

[PATCH v3 32/39] i18n: standardise messages

2016-06-01 Thread Vasco Almeida
remove '%s'" "index file corrupt" "corrupt index file" "failed to read %s" "read of %s failed" "detach the HEAD at named commit" "detach HEAD at named commit" Signed-off-by: Vasco Almeida --- builtin/apply.c| 6 +++-

[PATCH v3 19/39] tests: unpack-trees: update to use test_i18n* functions

2016-06-01 Thread Vasco Almeida
ot;i18n: unpack-trees: avoid substituting only a verb in sentences", 2016-05-12). Signed-off-by: Vasco Almeida --- t/t1011-read-tree-sparse-checkout.sh | 2 +- t/t3400-rebase.sh| 4 ++-- t/t3404-rebase-interactive.sh| 4 ++-- t/t7607-merge-overwrite.sh | 2

[PATCH v3 16/39] i18n: rebase-interactive: mark comments of squash for translation

2016-06-01 Thread Vasco Almeida
ngettext instead of eval_gettext, since other languages have more complex plural forms. Signed-off-by: Vasco Almeida --- git-rebase--interactive.sh | 69 +- t/lib-rebase.sh| 1 + 2 files changed, 57 insertions(+), 13 deletions(-) diff --

[PATCH v3 17/39] i18n: setup: mark strings for translation

2016-06-01 Thread Vasco Almeida
Update tests that compare the strings newly marked for translation to succeed when running under GETTEXT_POISON. Signed-off-by: Vasco Almeida --- setup.c| 16 t/t1506-rev-parse-diagnosis.sh | 2 +- t/t4208-log-magic-pathspec.sh | 4 ++-- 3 files

[PATCH v3 24/39] i18n: bisect: enable l10n of bisect terms in messages

2016-06-01 Thread Vasco Almeida
ction in git-bisect.sh. Signed-off-by: Vasco Almeida --- bisect.c | 29 +++-- 1 file changed, 19 insertions(+), 10 deletions(-) diff --git a/bisect.c b/bisect.c index a8713a8..293d7ec 100644 --- a/bisect.c +++ b/bisect.c @@ -23,6 +23,15 @@ static const char *argv_show_bra

[PATCH v3 18/39] tests: use test_i18n* functions to suppress false positives

2016-06-01 Thread Vasco Almeida
marked for translation, suppressing false positives. Signed-off-by: Vasco Almeida --- t/t0008-ignores.sh| 4 ++-- t/t1300-repo-config.sh| 8 t/t1307-config-blob.sh| 5 + t/t1308-config-set.sh | 4 ++-- t/t1400-update-ref.sh

[PATCH v3 33/39] i18n: remote: mark URL fallback text for translation

2016-06-01 Thread Vasco Almeida
Marks fallback text for translation that may be displayed in git remote show output. Signed-off-by: Vasco Almeida --- builtin/remote.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/builtin/remote.c b/builtin/remote.c index ae74da6..9f934cb 100644 --- a/builtin

[PATCH v3 05/39] i18n: sequencer: mark entire sentences for translation

2016-06-01 Thread Vasco Almeida
ource code verbosity. Moreover, translators can now 1) translate the terms "revert" and "cherry-pick" if they please 2) have more leeway to adapt their translations. Signed-off-by: Vasco Almeida --- sequencer.c | 11 --- 1 file changed, 8 insertions(+), 3 deletions(

[PATCH v3 13/39] i18n: git-sh-setup.sh: mark strings for translation

2016-06-01 Thread Vasco Almeida
sh-i18n instead of simply git-sh-i18n, because latter case would fail test t2300-cd-to-toplevel.sh. [1] http://www.gnu.org/software/gettext/manual/html_node/Preparing-Shell-Scripts.html Signed-off-by: Vasco Almeida --- Makefile| 4 +++- git-s

[PATCH v3 20/39] t9003: become resilient to GETTEXT_POISON

2016-06-01 Thread Vasco Almeida
The test t9003-help-autocorrect.sh fails when run under GETTEXT_POISON, because it's expecting to filter out the original output. Accommodate gettext poison case by also filtering out the default simulated output. Signed-off-by: Vasco Almeida --- t/t9003-help-autocorrect.sh | 4 ++-- 1

[PATCH v3 15/39] i18n: rebase-interactive: mark here-doc strings for translation

2016-06-01 Thread Vasco Almeida
nce, under GETTEXT_POISON. Otherwise, tests would fail under GETTEXT_POISON, or other build that doesn't support the GNU gettext, because that function could not be found. Signed-off-by: Vasco Almeida --- git-rebase--interactive.sh| 30 +++--- git-sh-i18n.sh

[PATCH v3 14/39] i18n: rebase-interactive: mark strings for translation

2016-06-01 Thread Vasco Almeida
Mark strings in git-rebase--interactive.sh for translation. There is no need to source git-sh-i18n since git-rebase.sh already does so. Add git-rebase--interactive.sh to LOCALIZED_SH in Makefile in order to enable extracting strings marked for translation by xgettext. Signed-off-by: Vasco

[PATCH v3 06/39] i18n: sequencer: mark string for translation

2016-06-01 Thread Vasco Almeida
Mark informative string ": fast-forward" for translation. Signed-off-by: Vasco Almeida --- sequencer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sequencer.c b/sequencer.c index 88a7c78..57b3671 100644 --- a/sequencer.c +++ b/sequencer.c @@ -225,7 +225,7 @@

[PATCH v3 12/39] t6030: update to use test_i18ncmp

2016-06-01 Thread Vasco Almeida
Since the git bisect output tested here is subject to translation, the helper function test_i18ncmp should be used over test_cmp. Signed-off-by: Vasco Almeida --- t/t6030-bisect-porcelain.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/t/t6030-bisect-porcelain.sh b/t

Re: [PATCH v2 02/22] i18n: advice: mark string about detached head for translation

2016-05-30 Thread Vasco Almeida
Às 19:27 de 23-05-2016, Vasco Almeida escreveu: > Mark string with advice seen by the user when in detached head. > > Signed-off-by: Vasco Almeida > --- > advice.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/advice.c b/advice.c > in

Re: [PATCH v2 00/22] i18n and test updates

2016-05-28 Thread Vasco Almeida
Às 17:11 de 27-05-2016, Junio C Hamano escreveu: > Vasco Almeida writes: > >> Marks several messages for translation and updates tests to pass under >> GETTEXT_POISON. Some tests were updated to fit previous i18n marks, others >> were updated to fit marks made by these pa

Re: [PATCH v2 18/22] tests: use test_i18n* functions to suppress false positives

2016-05-27 Thread Vasco Almeida
Às 17:08 de 27-05-2016, Junio C Hamano escreveu: > Vasco Almeida writes: > >> diff --git a/t/t1307-config-blob.sh b/t/t1307-config-blob.sh >> index 3c6791e..4079fef 100755 >> --- a/t/t1307-config-blob.sh >> +++ b/t/t1307-config-blob.sh >> @@ -64,7 +64,7 @@

Re: [PATCH v2 16/22] i18n: rebase-interactive: mark comments of squash for translation

2016-05-27 Thread Vasco Almeida
Às 22:35 de 26-05-2016, Junio C Hamano escreveu: > Vasco Almeida writes: > >> Helper functions this_nth_commit_message and skip_nth_commit_message >> replace the previous method of making the comment messages (such as >> "This is the 2nd commit message:") a

Re: [PATCH v2 13/22] i18n: git-sh-setup.sh: mark strings for translation

2016-05-27 Thread Vasco Almeida
Às 22:46 de 26-05-2016, Junio C Hamano escreveu: > Vasco Almeida writes: > >> > require_work_tree_exists () { >> > + program_name=$0 >> >if test "z$(git rev-parse --is-bare-repository)" != zfalse >> >then >> > -

Re: [PATCH v2 14/22] i18n: rebase-interactive: mark strings for translation

2016-05-27 Thread Vasco Almeida
Às 22:36 de 26-05-2016, Junio C Hamano escreveu: > Vasco Almeida writes: > >> @@ -222,9 +223,10 @@ has_action () { >> } >> >> is_empty_commit() { >> -tree=$(git rev-parse -q --verify "$1"^{tree} 2>/dev/null || >> -die &qu

Re: [PATCH v2 15/22] i18n: rebase-interactive: mark here-doc strings for translation

2016-05-25 Thread Vasco Almeida
Às 19:27 de 23-05-2016, Vasco Almeida escreveu: > Add eval_ngettext dummy function to be called by tests when running > under GETTEXT_POISON. Otherwise, tests would fail under gettext poison > because that function could not be found. > > [...] > > diff --git a/git-sh-i18

[PATCH v2 20/22] t9003: become resilient to GETTEXT_POISON

2016-05-23 Thread Vasco Almeida
The test t9003-help-autocorrect.sh fails when run under GETTEXT_POISON, because it's expecting to filter out the original output. Accommodate gettext poison case by also filtering out the default simulated output. Signed-off-by: Vasco Almeida --- That is a TAB between '^' and &

[PATCH v2 22/22] t5523: use test_i18ngrep for negation

2016-05-23 Thread Vasco Almeida
consistency and also to make obvious that those strings are subject to i18n. Signed-off-by: Vasco Almeida --- t/t5523-push-upstream.sh | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/t/t5523-push-upstream.sh b/t/t5523-push-upstream.sh index 4a7b98b..d6981ba 100755

[PATCH v2 17/22] i18n: setup: mark strings for translation

2016-05-23 Thread Vasco Almeida
Update tests that compare the strings newly marked for translation to succeed when running under GETTEXT_POISON. Signed-off-by: Vasco Almeida --- setup.c| 16 t/t1506-rev-parse-diagnosis.sh | 2 +- t/t4208-log-magic-pathspec.sh | 4 ++-- 3 files

[PATCH v2 21/22] t4153: fix negated test_i18ngrep call

2016-05-23 Thread Vasco Almeida
tests: fix negated test_i18ngrep calls", 2014-08-13). Signed-off-by: Vasco Almeida --- t/t4153-am-resume-override-opts.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/t/t4153-am-resume-override-opts.sh b/t/t4153-am-resume-override-opts.sh index 7c013d8..8ea22d1 1007

[PATCH v2 13/22] i18n: git-sh-setup.sh: mark strings for translation

2016-05-23 Thread Vasco Almeida
i18n instead of simply git-sh-i18n, because latter case would fail test t2300-cd-to-toplevel.sh. Signed-off-by: Vasco Almeida --- Makefile| 4 +++- git-sh-setup.sh | 56 ++-- 2 files changed, 45 insertions(+), 15 deletions(-) diff --g

[PATCH v2 18/22] tests: use test_i18n* functions to suppress false positives

2016-05-23 Thread Vasco Almeida
marked for translation, suppressing false positives. Signed-off-by: Vasco Almeida --- t/t0008-ignores.sh| 4 ++-- t/t1300-repo-config.sh| 8 t/t1307-config-blob.sh| 2 +- t/t1308-config-set.sh | 4 ++-- t/t1400-update-ref.sh

[PATCH v2 14/22] i18n: rebase-interactive: mark strings for translation

2016-05-23 Thread Vasco Almeida
Mark strings in git-rebase--interactive.sh for translation. There is no need to source git-sh-i18n since git-rebase.sh already does so. Add git-rebase--interactive.sh to LOCALIZED_SH in Makefile in order to enable extracting strings marked for translation by xgettext. Signed-off-by: Vasco

[PATCH v2 15/22] i18n: rebase-interactive: mark here-doc strings for translation

2016-05-23 Thread Vasco Almeida
EXT_POISON. Otherwise, tests would fail under gettext poison because that function could not be found. Signed-off-by: Vasco Almeida --- git-rebase--interactive.sh| 30 +++--- git-sh-i18n.sh| 4 t/t3404-rebase-interactive.sh | 14 +++--- 3 files c

[PATCH v2 12/22] t6030: update to use test_i18ncmp

2016-05-23 Thread Vasco Almeida
Since the git bisect output tested here is subject to translation, the helper function test_i18ncmp should be used over test_cmp. Signed-off-by: Vasco Almeida --- t/t6030-bisect-porcelain.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/t/t6030-bisect-porcelain.sh b/t

[PATCH v2 11/22] i18n: bisect: simplify error message for i18n

2016-05-23 Thread Vasco Almeida
Internationalization from gettext manual [1]: "Simplify translatable strings so that they don't contain command substitution ("`...`" or "$(...)") [...]" [1] http://www.gnu.org/software/gettext/manual/gettext.html#Preparing-Shell-Scripts Signed-off-by: Vasco Almei

[PATCH v2 04/22] i18n: transport: mark strings for translation

2016-05-23 Thread Vasco Almeida
Mark one printf string and one error string for translation. Signed-off-by: Vasco Almeida --- transport.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/transport.c b/transport.c index 095e61f..59b911e 100644 --- a/transport.c +++ b/transport.c

[PATCH v2 19/22] tests: unpack-trees: update to use test_i18n* functions

2016-05-23 Thread Vasco Almeida
ot;i18n: unpack-trees: avoid substituting only a verb in sentences", 2016-05-12). Signed-off-by: Vasco Almeida --- t/t1011-read-tree-sparse-checkout.sh | 2 +- t/t3400-rebase.sh| 4 ++-- t/t3404-rebase-interactive.sh| 4 ++-- t/t7607-merge-overwrite.sh | 2

[PATCH v2 06/22] i18n: sequencer: mark string for translation

2016-05-23 Thread Vasco Almeida
Mark informative string ": fast-forward" for translation. Signed-off-by: Vasco Almeida --- sequencer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sequencer.c b/sequencer.c index 88a7c78..57b3671 100644 --- a/sequencer.c +++ b/sequencer.c @@ -225,7 +225,7 @@

[PATCH v2 08/22] merge-octupus: use die shell function from git-sh-setup.sh

2016-05-23 Thread Vasco Almeida
Source git-sh-setup in order to use die shell function from git-sh-setup.sh library instead of using the one defined in git-merge-octopus.sh. Remove the former die function. Signed-off-by: Vasco Almeida --- git-merge-octopus.sh | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff

[PATCH v2 10/22] i18n: rebase: mark placeholder for translation

2016-05-23 Thread Vasco Almeida
Mark placeholder "" in git-rebase.sh for translation. The string containing the named placeholder is passed to shell function error_on_missing_default_upstream in git-parse-remote.sh which uses it to display a command hint for the user. Signed-off-by: Vasco Almeida --- git-rebase.sh

[PATCH v2 05/22] i18n: sequencer: mark entire sentences for translation

2016-05-23 Thread Vasco Almeida
ource code verbosity. Moreover, translators can now 1) translate the terms "revert" and "cherry-pick" if they please 2) have more leeway to adapt their translations. Signed-off-by: Vasco Almeida --- Similarly to Patch 03/22, I've added more info to commit message, but hav

[PATCH v2 09/22] i18n: rebase: fix marked string to use eval_gettext variant

2016-05-23 Thread Vasco Almeida
The string message marked for translation should use eval_gettext variant instead of the gettext one, since we want to dollar-substitute $head_name in the result. Signed-off-by: Vasco Almeida --- git-rebase.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git-rebase.sh b

[PATCH v2 16/22] i18n: rebase-interactive: mark comments of squash for translation

2016-05-23 Thread Vasco Almeida
ngettext instead of eval_gettext, since other languages have more complex plural forms. Signed-off-by: Vasco Almeida --- git-rebase--interactive.sh | 69 +- t/lib-rebase.sh| 1 + 2 files changed, 57 insertions(+), 13 deletions(-) diff --

[PATCH v2 07/22] i18n: merge-octopus: mark messages for translation

2016-05-23 Thread Vasco Almeida
Mark messages in git-merge-octopus.sh for translation. Signed-off-by: Vasco Almeida --- git-merge-octopus.sh | 18 ++ 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/git-merge-octopus.sh b/git-merge-octopus.sh index dc2fd1b..89e967a 100755 --- a/git-merge

[PATCH v2 03/22] i18n: advice: internationalize message for conflicts

2016-05-23 Thread Vasco Almeida
languages. Signed-off-by: Vasco Almeida --- It is not clear to me what is the current stand on this approach, so I've updated the commit message to include more information and changed the messages a bit. advice.c| 17 +++-- builtin/pull.c | 2 +- t/t5520-pull.sh |

[PATCH v2 01/22] i18n: builtin/remote.c: fix mark for translation

2016-05-23 Thread Vasco Almeida
The second string inside _() was not being extracted for translation by xgettext, meaning that, although the string was passed to gettext, there was no translation available. Mark each individual string instead of marking the result of ternary if. Signed-off-by: Vasco Almeida --- builtin

[PATCH v2 02/22] i18n: advice: mark string about detached head for translation

2016-05-23 Thread Vasco Almeida
Mark string with advice seen by the user when in detached head. Signed-off-by: Vasco Almeida --- advice.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/advice.c b/advice.c index 4dc5cf1..703a847 100644 --- a/advice.c +++ b/advice.c @@ -107,13 +107,13 @@ void NORETURN

[PATCH v2 00/22] i18n and test updates

2016-05-23 Thread Vasco Almeida
takes into consideration the comments for v1 at http://thread.gmane.org/gmane.comp.version-control.git/294946 Interdiff of v1 to v2 is included below. Vasco Almeida (22): i18n: builtin/remote.c: fix mark for translation i18n: advice: mark string about detached head for translation i18n

Re: [PATCH 14/21] i18n: rebase-interactive: mark strings for translation

2016-05-21 Thread Vasco Almeida
Às 12:57 de 21-05-2016, Ævar Arnfjörð Bjarmason escreveu: > On Wed, May 18, 2016 at 5:27 PM, Vasco Almeida wrote: >> > Mark strings in git-rebase--interactive.sh for translation. There is no >> > need to source git-sh-i18n since git-rebase.sh already does so. > Cool, th

Re: [PATCH 19/21] t9003: become resilient to GETTEXT_POISON

2016-05-20 Thread Vasco Almeida
Às 17:59 de 20-05-2016, Junio C Hamano escreveu: > As long as translators do not translate "Did you mean..." to begin a > line with a tab (which I do not think there is any reason to), it is > going to work reliably to grep for "^ lgf$" here, and it will catch > such a potential future bug under GE

Re: [PATCH 19/21] t9003: become resilient to GETTEXT_POISON

2016-05-20 Thread Vasco Almeida
Às 16:39 de 20-05-2016, Junio C Hamano escreveu: > We want to see the string appear after "Did you mean this?" and we > do not want to be fooled by a future change in the early part of the > message, which may contain a substring l-g-f that does not have > anything to do with the alias we are looki

Re: [PATCH 19/21] t9003: become resilient to GETTEXT_POISON

2016-05-19 Thread Vasco Almeida
Às 18:34 de 19-05-2016, Eric Sunshine escreveu: > On Wed, May 18, 2016 at 11:27 AM, Vasco Almeida wrote: >> The test t9003-help-autocorrect.sh fails when run under GETTEXT_POISON, >> because it's expecting to filter out the original output. Accommodate >> gettext poison

Re: [PATCH 05/21] i18n: sequencer: mark entire sentences for translation

2016-05-18 Thread Vasco Almeida
Às 19:28 de 18-05-2016, Eric Sunshine escreveu: > On Wed, May 18, 2016 at 11:27 AM, Vasco Almeida wrote: >> Mark entire sentences of error message rather than assembling one using >> placeholders (e.g. "Cannot %s during a %s"). That would facilitate >> translation w

[PATCH 14/21] i18n: rebase-interactive: mark strings for translation

2016-05-18 Thread Vasco Almeida
Mark strings in git-rebase--interactive.sh for translation. There is no need to source git-sh-i18n since git-rebase.sh already does so. Add git-rebase--interactive.sh to LOCALIZED_SH in Makefile in order to enabled extracting strings marked for translation by xgettext. Signed-off-by: Vasco

[PATCH 19/21] t9003: become resilient to GETTEXT_POISON

2016-05-18 Thread Vasco Almeida
The test t9003-help-autocorrect.sh fails when run under GETTEXT_POISON, because it's expecting to filter out the original output. Accommodate gettext poison case by also filtering out the default simulated output. Signed-off-by: Vasco Almeida --- t/t9003-help-autocorrect.sh | 8 ++-- 1

[PATCH 18/21] tests: unpack-trees: update to use test_i18n* functions

2016-05-18 Thread Vasco Almeida
ot;i18n: unpack-trees: avoid substituting only a verb in sentences", 2016-05-12). Signed-off-by: Vasco Almeida --- t/t1011-read-tree-sparse-checkout.sh | 2 +- t/t3400-rebase.sh| 4 ++-- t/t3404-rebase-interactive.sh| 4 ++-- t/t7607-merge-overwrite.sh | 2

[PATCH 21/21] t5523: use test_i18ngrep for negation

2016-05-18 Thread Vasco Almeida
consistency and also to make obvious that those strings are subject to i18n. Signed-off-by: Vasco Almeida --- t/t5523-push-upstream.sh | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/t/t5523-push-upstream.sh b/t/t5523-push-upstream.sh index 4a7b98b..d6981ba 100755

[PATCH 15/21] i18n: rebase-interactive: mark here-doc strings for translation

2016-05-18 Thread Vasco Almeida
EXT_POISON. Otherwise, tests would fail under gettext poison because that function could not be found. Signed-off-by: Vasco Almeida --- git-rebase--interactive.sh| 30 +++--- git-sh-i18n.sh| 4 t/t3404-rebase-interactive.sh | 14 +++--- 3 files c

[PATCH 17/21] tests: use test_i18n* functions to suppress false positives

2016-05-18 Thread Vasco Almeida
marked for translation, suppressing false positives. Signed-off-by: Vasco Almeida --- t/t0008-ignores.sh| 4 ++-- t/t1300-repo-config.sh| 8 t/t1307-config-blob.sh| 2 +- t/t1308-config-set.sh | 4 ++-- t/t1400-update-ref.sh

[PATCH 16/21] i18n: rebase-interactive: mark comments of squash for translation

2016-05-18 Thread Vasco Almeida
ngettext instead of eval_gettext, since other languages have more complex plural forms. Signed-off-by: Vasco Almeida --- git-rebase--interactive.sh | 69 +- t/lib-rebase.sh| 1 + 2 files changed, 57 insertions(+), 13 deletions(-) diff --

[PATCH 20/21] t4153: fix negated test_i18ngrep call

2016-05-18 Thread Vasco Almeida
tests: fix negated test_i18ngrep calls", 2014-08-13). Signed-off-by: Vasco Almeida --- t/t4153-am-resume-override-opts.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/t/t4153-am-resume-override-opts.sh b/t/t4153-am-resume-override-opts.sh index 7c013d8..8ea22d1 1007

[PATCH 13/21] i18n: git-sh-setup.sh: mark strings for translation

2016-05-18 Thread Vasco Almeida
i18n instead of simply git-sh-i18n, because latter case would fail test t2300-cd-to-toplevel.sh. Signed-off-by: Vasco Almeida --- Makefile| 4 +++- git-sh-setup.sh | 56 ++-- 2 files changed, 45 insertions(+), 15 deletions(-) diff --g

[PATCH 09/21] i18n: rebase: fix marked string to use eval_gettext variant

2016-05-18 Thread Vasco Almeida
The string message marked for translation should use eval_gettext variant instead of the gettext one, since we want to dollar-substitute $head_name in the result. Signed-off-by: Vasco Almeida --- git-rebase.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git-rebase.sh b

[PATCH 10/21] i18n: rebase: mark placeholder for translation

2016-05-18 Thread Vasco Almeida
Mark placeholder "" in git-rebase.sh for translation. The string containing the named placeholder is passed to shell function error_on_missing_default_upstream in git-parse-remote.sh which uses it to display a command hint for the user. Signed-off-by: Vasco Almeida --- git-rebase.sh

[PATCH 05/21] i18n: sequencer: mark entire sentences for translation

2016-05-18 Thread Vasco Almeida
Mark entire sentences of error message rather than assembling one using placeholders (e.g. "Cannot %s during a %s"). That would facilitate translation work. Signed-off-by: Vasco Almeida --- sequencer.c | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/seq

[PATCH 02/21] i18n: advice: mark string about detached head for translation

2016-05-18 Thread Vasco Almeida
Mark string with advice seen by the user when in detached head. Signed-off-by: Vasco Almeida --- advice.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/advice.c b/advice.c index 4dc5cf1..703a847 100644 --- a/advice.c +++ b/advice.c @@ -107,13 +107,13 @@ void NORETURN

[PATCH 12/21] t6030: update to use test_i18ncmp

2016-05-18 Thread Vasco Almeida
Since the git bisect output tested here is subject to translation, the helper function test_i18ncmp should be used over test_cmp. Signed-off-by: Vasco Almeida --- t/t6030-bisect-porcelain.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/t/t6030-bisect-porcelain.sh b/t

[PATCH 04/21] i18n: transport: mark strings for translation

2016-05-18 Thread Vasco Almeida
Mark one printf string and one error string for translation. Signed-off-by: Vasco Almeida --- transport.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/transport.c b/transport.c index 095e61f..59b911e 100644 --- a/transport.c +++ b/transport.c

[PATCH 01/21] i18n: builtin/remote.c: fix mark for translation

2016-05-18 Thread Vasco Almeida
The second string inside _() was not being extracted for translation by xgettext, meaning that, although the string was passed to gettext, there was no translation available. Mark each individual string instead of marking the result of ternary if. Signed-off-by: Vasco Almeida --- builtin

[PATCH 06/21] i18n: sequencer: mark string for translation

2016-05-18 Thread Vasco Almeida
Mark informative string ": fast-forward" for translation. Signed-off-by: Vasco Almeida --- sequencer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sequencer.c b/sequencer.c index 88a7c78..57b3671 100644 --- a/sequencer.c +++ b/sequencer.c @@ -225,7 +225,7 @@

[PATCH 03/21] i18n: advice: internationalize message for conflicts

2016-05-18 Thread Vasco Almeida
Mark message for translation telling the user she has conflicts to resolve. Expose each particular use case, in order to enable translating entire sentences which would facilitate translating into other languages. Change "Pull" to lowercase to match other messages. Signed-off-by: Vas

[PATCH 08/21] merge-octupus: use die shell function from git-sh-setup.sh

2016-05-18 Thread Vasco Almeida
Source git-sh-setup in order to use die shell function from git-sh-setup.sh library instead of using the one defined in git-merge-octopus.sh. Remove the former die function. Signed-off-by: Vasco Almeida --- git-merge-octopus.sh | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff

<    1   2   3   4   5   >