[PATCH 09/11] i18n: send-email: mark warnings and errors for translation

2016-06-21 Thread Vasco Almeida
Mark warnings, errors and other messages for translation. Signed-off-by: Vasco Almeida <vascomalme...@sapo.pt> --- git-send-email.perl | 36 ++-- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/git-send-email.perl b/git-send-email.perl

Re: [PATCH 11/11] i18n: difftool: mark warnings for translation

2016-06-22 Thread Vasco Almeida
A Terça, 21 de Junho de 2016 21:33:29 David Aguilar escreveu: > I'm assuming that the i18n infrastructure is prepared to deal > with perl's . dot syntax for string concatenation, though, and > I don't know whether that's true. Does that work? Yes, dot syntax does work. xgettext is able to

Re: [PATCH v4 34/38] i18n: init-db: join message pieces

2016-06-17 Thread Vasco Almeida
A Terça, 7 de Junho de 2016 12:55:37 Vasco Almeida escreveu: > 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

Re: What's cooking in git.git (Jun 2016, #05; Thu, 16)

2016-06-17 Thread Vasco Almeida
Junio C Hamano pobox.com> writes: > * va/i18n-even-more (2016-06-07) 38 commits > - i18n: branch: mark comment when editing branch description for translation > - i18n: unmark die messages for translation > - i18n: submodule: escape shell variables inside eval_gettext > - i18n: submodule:

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

2016-06-17 Thread Vasco Almeida
Mark informative string ": fast-forward" for translation. Signed-off-by: Vasco Almeida <vascomalme...@sapo.pt> --- 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/seque

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

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

[PATCH v5 35/38] i18n: submodule: join strings marked for translation

2016-06-17 Thread Vasco Almeida
Join strings marked for translation since that would facilitate and improve translations result. Signed-off-by: Vasco Almeida <vascomalme...@sapo.pt> --- git-submodule.sh | 18 ++ 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/git-submodule.sh b/git-submod

[PATCH v5 34/38] i18n: init-db: join message pieces

2016-06-17 Thread Vasco Almeida
with test t0204-gettext-reencode-sanity.sh and not updating the translation would fail the test. Signed-off-by: Vasco Almeida <vascomalme...@sapo.pt> --- builtin/init-db.c | 17 ++--- po/is.po | 46 -- 2 files changed, 38 inse

[PATCH v5 36/38] i18n: submodule: escape shell variables inside eval_gettext

2016-06-17 Thread Vasco Almeida
-Scripts.html Signed-off-by: Vasco Almeida <vascomalme...@sapo.pt> --- git-submodule.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/git-submodule.sh b/git-submodule.sh index f72b237..1ff2f3a 100755 --- a/git-submodule.sh +++ b/git-submodule.sh @@ -618,7 +618,7 @@ cmd_

[PATCH v5 37/38] i18n: unmark die messages for translation

2016-06-17 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 <vascomalme...@sapo.pt> --- git-bisect.sh | 2 +- wt-status.c | 4 ++-- 2 files changed, 3 insertions

[PATCH v5 38/38] i18n: branch: mark comment when editing branch description for translation

2016-06-17 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 <vascomalme...@sapo.pt> --- builtin/branch.c | 6 +++--- 1 file changed, 3 insertions

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

2016-06-17 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 <vascoma

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

2016-06-17 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 <vascomalme...@sapo.pt> --- git-rebase.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

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

2016-06-17 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 v5 05/38] i18n: sequencer: mark entire sentences for translation

2016-06-17 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 <vascomalme...@sapo.pt> --- sequencer.c | 11 --- 1 file changed, 8

[PATCH v5 00/38] i18n and test updates

2016-06-17 Thread Vasco Almeida
'master'. Interdiff included below. Vasco Almeida (38): i18n: builtin/remote.c: fix mark for translation i18n: advice: mark string about detached head for translation i18n: advice: internationalize message for conflicts i18n: transport: mark strings for translation i18n: sequencer: m

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

2016-06-17 Thread Vasco Almeida
languages. Signed-off-by: Vasco Almeida <vascomalme...@sapo.pt> --- 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.

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

2016-06-17 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 <vascomalme...@sapo.pt> --- git-merge-octopus.sh | 6 +- 1 file changed, 1 ins

[PATCH v5 32/38] i18n: remote: mark URL fallback text for translation

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

[PATCH v5 27/38] i18n: config: unfold error messages marked for translation

2016-06-17 Thread Vasco Almeida
t instance. Signed-off-by: Vasco Almeida <vascomalme...@sapo.pt> --- cache.h| 9 - config.c | 101 - submodule-config.c | 2 +- 3 files changed, 94 insertions(+), 18 deletions(-) diff --git a/cache.h b/cache

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

2016-06-17 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 <vascomal

[PATCH v5 28/38] i18n: merge: mark messages for translation

2016-06-17 Thread Vasco Almeida
Mark messages shown to the user for translation. Signed-off-by: Vasco Almeida <vascomalme...@sapo.pt> --- 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

[PATCH v5 17/38] i18n: setup: mark strings for translation

2016-06-17 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 <vascomalme...@sapo.pt> --- setup.c| 16 t/t1506-rev-parse-diagnosis.sh | 2 +- t/t4208-log-magic-paths

[PATCH v5 07/38] i18n: merge-octopus: mark messages for translation

2016-06-17 Thread Vasco Almeida
Mark messages in git-merge-octopus.sh for translation. Signed-off-by: Vasco Almeida <vascomalme...@sapo.pt> --- 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

[PATCH v5 21/38] t4153: fix negated test_i18ngrep call

2016-06-17 Thread Vasco Almeida
tests: fix negated test_i18ngrep calls", 2014-08-13). Signed-off-by: Vasco Almeida <vascomalme...@sapo.pt> --- 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.

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

2016-06-17 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 v5 31/38] i18n: standardise messages

2016-06-17 Thread Vasco Almeida
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 <vascomalme...@sapo.pt> --- builtin/apply.c

[PATCH v5 29/38] i18n: merge: change command option help to lowercase

2016-06-17 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 <vascomalme...@sapo.pt> --- builtin/merge.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/b

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

2016-06-17 Thread Vasco Almeida
to, for instance, gettextln not being found. [1] http://www.gnu.org/software/gettext/manual/html_node/Preparing-Shell-Scripts.html Signed-off-by: Vasco Almeida <vascomalme...@sapo.pt> --- Makefile | 4 +++- git-bisect.sh| 1 - git-merge-octopus.sh | 1 - git-reb

[PATCH v5 24/38] i18n: transport-helper.c: change N_() call to _()

2016-06-17 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 Almeida

[PATCH v5 18/38] tests: use test_i18n* functions to suppress false positives

2016-06-17 Thread Vasco Almeida
marked for translation, suppressing false positives. Signed-off-by: Vasco Almeida <vascomalme...@sapo.pt> --- t/t0008-ignores.sh| 4 ++-- t/t1300-repo-config.sh| 8 t/t1307-config-blob.sh| 5 + t/t1308-config-set.sh | 4 ++-- t

[PATCH v5 25/38] i18n: notes: mark strings for translation

2016-06-17 Thread Vasco Almeida
. Fix conflicts in %s and [...]". Signed-off-by: Vasco Almeida <vascomalme...@sapo.pt> --- builtin/notes.c | 20 ++-- t/t3310-notes-merge-manual-resolve.sh | 8 t/t3320-notes-merge-worktrees.sh | 2 +- 3 files changed, 15 insertions(

[PATCH v5 33/38] i18n: remote: allow translations to reorder message

2016-06-17 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 <vascomalme...@sapo.pt> --- buil

[PATCH v5 12/38] t6030: update to use test_i18ncmp

2016-06-17 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 <vascomalme...@sapo.pt> --- t/t6030-bisect-porcelain.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/t

[PATCH v5 26/38] i18n: notes: mark options for translation

2016-06-17 Thread Vasco Almeida
Mark options description of git prune for translation. Signed-off-by: Vasco Almeida <vascomalme...@sapo.pt> --- 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

[PATCH v5 30/38] i18n: sequencer: add period to error message

2016-06-17 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 <vascomalme...@sapo.pt> --- sequencer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sequenc

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

2016-06-17 Thread Vasco Almeida
d of eval_gettext, since other languages have more complex plural forms. Signed-off-by: Vasco Almeida <vascomalme...@sapo.pt> --- git-rebase--interactive.sh | 69 +- t/lib-rebase.sh| 1 + 2 files changed, 57 insertions(+), 13 d

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

2016-06-17 Thread Vasco Almeida
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 <vascomalme...@sapo.pt> --- git-rebase--interactive.sh| 30 +++--- git-sh-i

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

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

[PATCH v5 23/38] i18n: bisect: mark strings for translation

2016-06-17 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 <vascomalme...@sapo.pt> --- bisect.c

[PATCH v5 22/38] t5523: use test_i18ngrep for negation

2016-06-17 Thread Vasco Almeida
of consistency and also to make obvious that those strings are subject to i18n. Signed-off-by: Vasco Almeida <vascomalme...@sapo.pt> --- 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

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

2016-06-17 Thread Vasco Almeida
for 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 Almeida &l

[PATCH v5 20/38] t9003: become resilient to GETTEXT_POISON

2016-06-17 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 <vascomalme...@sapo.pt> --- t/t900

Re: [PATCH] unpack-trees: fix English grammar in do-this-before-that messages

2016-06-24 Thread Vasco Almeida
Às 05:31 de 24-06-2016, Alex Henrie escreveu: > Signed-off-by: Alex Henrie > --- > unpack-trees.c | 18 +- > 1 file changed, 9 insertions(+), 9 deletions(-) > > diff --git a/unpack-trees.c b/unpack-trees.c > index 6bc9512..11c37fb 100644 > ---

Re: [PATCH] unpack-trees: fix English grammar in do-this-before-that messages

2016-06-24 Thread Vasco Almeida
Citando Junio C Hamano <gits...@pobox.com>: Vasco Almeida <vascomalme...@sapo.pt> writes: The only downside I can tell about this is translator are going to have to update those strings on their translations, but that is a normal thing to do on an active project like Git. A

[PATCH 2/2] i18n: branch: move comment for translators

2016-04-13 Thread Vasco Almeida
Move and split comment for translators (marked by TRANSLATORS) to be immediately above the strings marked for translation. As a result, the comment can now be extracted by xgettext. Signed-off-by: Vasco Almeida <vascomalme...@sapo.pt> --- builtin/branch.c | 6 -- 1 file chan

[PATCH 1/2] i18n: branch: unmark string for translation

2016-04-13 Thread Vasco Almeida
Unmark strings for translation for command help/hint. These strings can not be translated, just copied. Signed-off-by: Vasco Almeida <vascomalme...@sapo.pt> --- Moreover, prevent a possible translation mistake, e.g. wrong leading spacing. builtin/branch.c | 4 ++-- 1 file changed, 2 inse

Re: [PATCH 2/7] l10n: unpack-trees: mark strings for translation

2016-04-09 Thread Vasco Almeida
Às 20:23 de 08-04-2016, Junio C Hamano escreveu: > Vasco Almeida <vascomalme...@sapo.pt> writes: > >> Mark strings seen by the user inside setup_unpack_trees_porcelain() and >> display_error_msgs() functions for translation. >> >> One case Git outputs the name

Re: [PATCH 4/7] l10n: builtin/pull.c: mark strings for translation

2016-04-09 Thread Vasco Almeida
Às 20:33 de 08-04-2016, Junio C Hamano escreveu: > Vasco Almeida <vascomalme...@sapo.pt> writes: > >> Some translations might also translate "" and "". >> ... >> fprintf_ln(stderr, _("See git-pull(1) for details.")); >&

[PATCH v2 4/7] i18n: builtin/pull.c: mark strings for translation

2016-04-09 Thread Vasco Almeida
Some translations might also translate "" and "". Signed-off-by: Vasco Almeida <vascomalme...@sapo.pt> --- builtin/pull.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/builtin/pull.c b/builtin/pull.c index 10eff03..9e8883c 100644 --- a/bu

[PATCH v2 3/7] i18n: git-parse-remote.sh: mark strings for translation

2016-04-09 Thread Vasco Almeida
Change Makefile to include git-parse-remote.sh in LOCALIZED_SH. TODO: remove 3rd argument of error_on_missing_default_upstream function that is no longer required. Signed-off-by: Vasco Almeida <vascomalme...@sapo.pt> --- Makefile| 2 +- git-parse-remote.s

[PATCH v2 2/7] i18n: unpack-trees: mark strings for translation

2016-04-09 Thread Vasco Almeida
Mark strings seen by the user inside setup_unpack_trees_porcelain() and display_error_msgs() functions for translation. Signed-off-by: Vasco Almeida <vascomalme...@sapo.pt> --- unpack-trees.c | 24 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/

[PATCH v2 1/7] i18n: index-pack: use plural string instead of normal one

2016-04-09 Thread Vasco Almeida
Git could output "completed with 1 local objects", but in this case using "object" instead of "objects" is the correct form. Use Q_() instead of _(). Signed-off-by: Vasco Almeida <vascomalme...@sapo.pt> --- builtin/index-pack.c | 4 +++- 1 file changed, 3 inse

[PATCH v2 5/7] i18n: builtin/pull.c: split strings marked for translation

2016-04-09 Thread Vasco Almeida
k as fuzzy and the translator needs to correct it herself. Signed-off-by: Vasco Almeida <vascomalme...@sapo.pt> --- builtin/pull.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/builtin/pull.c b/builtin/pull.c index 9e8883c..617893c 100644 --- a/builtin/pull.c +++ b/builtin/p

[PATCH v2 7/7] i18n: builtin/branch.c: mark option for translation

2016-04-09 Thread Vasco Almeida
Mark description and parameter for option "set-upstream-to" for translation. Signed-off-by: Vasco Almeida <vascomalme...@sapo.pt> --- builtin/branch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builtin/branch.c b/builtin/branch.c index 7b45b6b

[PATCH v2 6/7] i18n: builtin/rm.c: remove a comma ',' from string

2016-04-09 Thread Vasco Almeida
Remove a comma from string marked for translation. Make the string match the one in builtin/mv.c. Now translators have do handle this string only once. Signed-off-by: Vasco Almeida <vascomalme...@sapo.pt> --- builtin/rm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[PATCH 4/7] l10n: builtin/pull.c: mark strings for translation

2016-04-08 Thread Vasco Almeida
Some translations might also translate "" and "". Signed-off-by: Vasco Almeida <vascomalme...@sapo.pt> --- builtin/pull.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/builtin/pull.c b/builtin/pull.c index 10eff03..a99d6b9 100644 --- a/bu

[PATCH 3/7] l10n: git-parse-remote.sh: mark strings for translation

2016-04-08 Thread Vasco Almeida
Change Makefile to include git-parse-remote.sh in LOCALIZED_SH. TODO: remove 3rd argument of error_on_missing_default_upstream function that is no longer required. Signed-off-by: Vasco Almeida <vascomalme...@sapo.pt> --- Makefile| 2 +- git-parse-remote.s

[PATCH 5/7] l10n: builtin/pull.c: split strings marked for translation

2016-04-08 Thread Vasco Almeida
k as fuzzy and the translator needs to correct it herself. Signed-off-by: Vasco Almeida <vascomalme...@sapo.pt> --- builtin/pull.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/builtin/pull.c b/builtin/pull.c index a99d6b9..ac942f6 100644 --- a/builtin/pull.c +++ b/builtin/

[PATCH 7/7] l10n: builtin/branch.c: mark option for translation

2016-04-08 Thread Vasco Almeida
Mark description and parameter for option "set-upstream-to" for translation. Signed-off-by: Vasco Almeida <vascomalme...@sapo.pt> --- builtin/branch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builtin/branch.c b/builtin/branch.c index 7b45b6b

[PATCH 6/7] l10n: mv.c: add a comma ',' to string

2016-04-08 Thread Vasco Almeida
Add a comma to string marked for translation. Make the string match the one in rm.c. Now translators have do handle this string only once. Signed-off-by: Vasco Almeida <vascomalme...@sapo.pt> --- builtin/mv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builtin/

[PATCH 2/7] l10n: unpack-trees: mark strings for translation

2016-04-08 Thread Vasco Almeida
. This is the case of the first string marked. Signed-off-by: Vasco Almeida <vascomalme...@sapo.pt> --- unpack-trees.c | 24 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/unpack-trees.c b/unpack-trees.c index 9f55cc2..4bc6b4f 100644 --- a/unpack-trees.c

[PATCH 1/7] l10n: index-pack: use plural string instead of normal one

2016-04-08 Thread Vasco Almeida
Git could output "completed with 1 local objects", but in this case using "object" instead of "objects" is the correct form. Use Q_() instead of _(). Signed-off-by: Vasco Almeida <vascomalme...@sapo.pt> --- builtin/index-pack.c | 4 +++- 1 file changed, 3 inse

Re: [PATCH v2 4/7] i18n: builtin/pull.c: mark strings for translation

2016-04-11 Thread Vasco Almeida
Às 18:01 de 10-04-2016, Junio C Hamano escreveu: > Vasco Almeida <vascomalme...@sapo.pt> writes: > >> Some translations might also translate "" and "". > > This offers an interesting observation that I didn't think of while > reviewing the first

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 <vascomalme...@sapo.pt> wrote: >> The test t9003-help-autocorrect.sh fails when run under GETTEXT_POISON, >> because it's expecting to filter out the original output. Accommod

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

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

[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 <vascomalme...@sapo.pt> --- setup.c| 16 t/t1506-rev-parse-diagnosis.sh | 2 +- t/t4208-log-magic-paths

[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 <vascomalme...@sapo.pt> --- 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.

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

2016-05-23 Thread Vasco Almeida
8n instead of simply git-sh-i18n, because latter case would fail test t2300-cd-to-toplevel.sh. Signed-off-by: Vasco Almeida <vascomalme...@sapo.pt> --- Makefile| 4 +++- git-sh-setup.sh | 56 ++-- 2 files changed, 45 insertions(+), 15 de

[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 <vascomalme...@sapo.pt> --- t/t0008-ignores.sh| 4 ++-- t/t1300-repo-config.sh| 8 t/t1307-config-blob.sh| 2 +- t/t1308-config-set.sh | 4 ++-- t

[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 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 <vascomalme...@sapo.pt> --- That is a TAB b

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

2016-05-23 Thread Vasco Almeida
of consistency and also to make obvious that those strings are subject to i18n. Signed-off-by: Vasco Almeida <vascomalme...@sapo.pt> --- 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

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

2016-05-23 Thread Vasco Almeida
. Otherwise, tests would fail under gettext poison because that function could not be found. Signed-off-by: Vasco Almeida <vascomalme...@sapo.pt> --- git-rebase--interactive.sh| 30 +++--- git-sh-i18n.sh| 4 t/t3404-rebase-interactive.s

[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 <vascomalme...@sapo.pt> --- t/t6030-bisect-porcelain.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/t

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

2016-05-23 Thread Vasco Almeida
for 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 Almeida &l

[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 <vascomalme...@sapo.pt> --- transport.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/transport.c b/transport.c index 095e61f..59b911e 100644 --- a/trans

[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 <vascomalme...@sapo.pt> --- Similarly to Patch 03/22, I've added more info to

[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 <vascomalme...@sapo.pt> --- git-rebase.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

[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 <vascomalme...@sapo.pt> --- t/t1011-read-tree-sparse-checkout.sh | 2 +- t/t3400-rebase.sh| 4 ++-- t/t3404-rebase-interactive.sh| 4 ++--

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

2016-05-23 Thread Vasco Almeida
d of eval_gettext, since other languages have more complex plural forms. Signed-off-by: Vasco Almeida <vascomalme...@sapo.pt> --- git-rebase--interactive.sh | 69 +- t/lib-rebase.sh| 1 + 2 files changed, 57 insertions(+), 13 d

[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 <vascomalme...@sapo.pt> --- 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/seque

[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 <vascomalme...@sapo.pt> --- git-merge-octopus.sh | 6 +- 1 file changed, 1 ins

[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 <vascomal

[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 <vascomalme...@sapo.pt> --- 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

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

2016-05-23 Thread Vasco Almeida
languages. Signed-off-by: Vasco Almeida <vascomalme...@sapo.pt> --- 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

[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 <vascoma

[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 <vascomalme...@sapo.pt> --- 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 @@ -

[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 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 <vascomalme...@sapo.pt> wrote: >> Mark entire sentences of error message rather than assembling one using >> placeholders (e.g. "Cannot %s during a %s"). That would

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 <vascomalme...@sapo.pt> wrote: >> > Mark strings in git-rebase--interactive.sh for translation. There is no >> > need to source git-sh-i18n since git-rebase.sh alre

[PATCH] Documentation/git-mailinfo: fix typo

2016-05-11 Thread Vasco Almeida
Signed-off-by: Vasco Almeida <vascomalme...@sapo.pt> --- Documentation/git-mailinfo.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/git-mailinfo.txt b/Documentation/git-mailinfo.txt index 0947084..3bbc731 100644 --- a/Documentation/git-mailinfo.txt

[PATCH v4 3/7] i18n: git-parse-remote.sh: mark strings for translation

2016-05-12 Thread Vasco Almeida
Change Makefile to include git-parse-remote.sh in LOCALIZED_SH. TODO: remove 3rd argument of error_on_missing_default_upstream function that is no longer required. Signed-off-by: Vasco Almeida <vascomalme...@sapo.pt> --- Makefile| 2 +- git-parse-remote.s

[PATCH v4 2/7] i18n: unpack-trees: mark strings for translation

2016-05-12 Thread Vasco Almeida
Mark strings seen by the user inside setup_unpack_trees_porcelain() and display_error_msgs() functions for translation. Signed-off-by: Vasco Almeida <vascomalme...@sapo.pt> --- unpack-trees.c | 74 ++ 1 file changed, 54 insertions(

[PATCH v4 0/7] i18n miscellaneous updates

2016-05-12 Thread Vasco Almeida
This re-roll upadates patch i18n: unpack-trees: mark strings for translation I have decoupled/untangled some strings to mark entire sentences instead of assemble them using placeholders "%s". This makes the translation work easier and more reliable. Vasco Almeida (7): i18n: index

[PATCH v4 6/7] i18n: builtin/rm.c: remove a comma ',' from string

2016-05-12 Thread Vasco Almeida
Remove a comma from string marked for translation. Make the string match the one in builtin/mv.c. Now translators have do handle this string only once. Signed-off-by: Vasco Almeida <vascomalme...@sapo.pt> --- builtin/rm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[PATCH v4 4/7] i18n: builtin/pull.c: mark placeholders for translation

2016-05-12 Thread Vasco Almeida
Some translations might also translate "" and "". Signed-off-by: Vasco Almeida <vascomalme...@sapo.pt> --- builtin/pull.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/builtin/pull.c b/builtin/pull.c index 596b92f..96b98ea 100644 --- a/bu

[PATCH v4 5/7] i18n: builtin/pull.c: split strings marked for translation

2016-05-12 Thread Vasco Almeida
k as fuzzy and the translator needs to correct it herself. Signed-off-by: Vasco Almeida <vascomalme...@sapo.pt> --- builtin/pull.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/builtin/pull.c b/builtin/pull.c index 96b98ea..1d7333c 100644 --- a/builtin/pull.c +++ b/builtin/p

[PATCH v4 7/7] i18n: builtin/branch.c: mark option for translation

2016-05-12 Thread Vasco Almeida
Mark description and parameter for option "set-upstream-to" for translation. Signed-off-by: Vasco Almeida <vascomalme...@sapo.pt> --- builtin/branch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builtin/branch.c b/builtin/branch.c index 0adba62

<    1   2   3   4   5   >