Re: Bug report: $program_name in error message

2016-12-20 Thread Vasco Almeida
Thanks for the report and letting me know. Yes, these were mistakes and lack of attention mine. It was supposed to call 'eval_gettext' rather than 'gettext' when \$variable interpolation is needed. Junio Hamano has the right answer for these errors. A Seg, 19-12-2016 às 12:50 -0800, Junio C

[PATCH v7 15/16] i18n: send-email: mark composing message for translation

2016-12-14 Thread Vasco Almeida
When composing an e-mail, there is a message for the user whose lines begin in "GIT:" that can be marked for translation. Signed-off-by: Vasco Almeida <vascomalme...@sapo.pt> --- git-send-email.perl | 16 +--- 1 file changed, 9 insertions(+), 7 deletions(-) diff

[PATCH v7 02/16] i18n: add--interactive: mark strings for translation

2016-12-14 Thread Vasco Almeida
Mark simple strings (without interpolation) for translation. Brackets around first parameter of ternary operator is necessary because otherwise xgettext fails to extract strings marked for translation from the rest of the file. Signed-off-by: Vasco Almeida <vascomalme...@sapo.pt> --- g

[PATCH v7 00/16] Mark strings in Perl scripts for translation

2016-12-14 Thread Vasco Almeida
to one single character, take '#' as the comment line character. This follows the system behaviour programmed in config.c::git_default_core_config. Interdiff from v6 included below. Vasco Almeida (16): Git.pm: add subroutines for commenting lines i18n: add--interactive: mark strings

[PATCH v7 07/16] i18n: add--interactive: mark patch prompt for translation

2016-12-14 Thread Vasco Almeida
table to the correct entry of %patch_modes, focusing only on value of %patch_modes. Now, we are also interested in the key ('staged', 'stash', 'checkout_head', ...). Signed-off-by: Vasco Almeida <vascomalme...@sapo.pt> --- Makefile | 2 +- git-add--interactive.per

[PATCH v7 14/16] i18n: send-email: mark string with interpolation for translation

2016-12-14 Thread Vasco Almeida
Mark warnings, errors and other messages that are interpolated for translation. We call sprintf() before calling die() and in few other circumstances in order to replace the values on the placeholders. Signed-off-by: Vasco Almeida <vascomalme...@sapo.pt> --- git-send-email.per

[PATCH v7 12/16] i18n: send-email: mark strings for translation

2016-12-14 Thread Vasco Almeida
Mark strings often displayed to the user for translation. Signed-off-by: Vasco Almeida <vascomalme...@sapo.pt> --- git-send-email.perl | 54 +++-- 1 file changed, 32 insertions(+), 22 deletions(-) diff --git a/git-send-email.perl b/gi

[PATCH v7 08/16] i18n: add--interactive: i18n of help_patch_cmd

2016-12-14 Thread Vasco Almeida
Mark help message of help_patch_cmd for translation. The message must be unfolded to be free of variables so we can have high quality translations. Signed-off-by: Vasco Almeida <vascomalme...@sapo.pt> --- git-add--interactive.perl | 54 ---

[PATCH v7 03/16] i18n: add--interactive: mark simple here-documents for translation

2016-12-14 Thread Vasco Almeida
with \EOF but it is with delimiter enclosed in single quotes. So change \EOF to 'EOF', although in this case does not make difference what variation of here-document to use since there is nothing to interpolate. Signed-off-by: Vasco Almeida <vascomalme...@sapo.pt> --- git-add--interactive.pe

[PATCH v7 01/16] Git.pm: add subroutines for commenting lines

2016-12-14 Thread Vasco Almeida
Add subroutines prefix_lines and comment_lines. Signed-off-by: Vasco Almeida <vascomalme...@sapo.pt> --- perl/Git.pm | 38 ++ 1 file changed, 38 insertions(+) diff --git a/perl/Git.pm b/perl/Git.pm index b2732822a..bfce1f795 100644 --- a/perl/Git.pm

[PATCH v7 13/16] i18n: send-email: mark warnings and errors for translation

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

[PATCH v7 09/16] i18n: add--interactive: mark edit_hunk_manually message for translation

2016-12-14 Thread Vasco Almeida
to change wording of one particular use case. The comment character is now used according to the git configuration core.commentchar. Signed-off-by: Vasco Almeida <vascomalme...@sapo.pt> --- git-add--interactive.perl | 52 +++ 1 file chang

[PATCH v7 10/16] i18n: add--interactive: remove %patch_modes entries

2016-12-14 Thread Vasco Almeida
Remove unnecessary entries from %patch_modes. After the i18n conversion, these entries are not used anymore. Signed-off-by: Vasco Almeida <vascomalme...@sapo.pt> --- git-add--interactive.perl | 21 - 1 file changed, 21 deletions(-) diff --git a/git-add--interactive.

[PATCH v7 06/16] i18n: add--interactive: mark plural strings

2016-12-14 Thread Vasco Almeida
-by: Vasco Almeida <vascomalme...@sapo.pt> --- Makefile | 3 ++- git-add--interactive.perl | 27 ++- perl/Git/I18N.pm | 10 +- t/t0202/test.pl | 11 ++- 4 files changed, 39 insertions(+), 12 deletions(-) diff --git a/Make

[PATCH v7 04/16] i18n: add--interactive: mark strings with interpolation for translation

2016-12-14 Thread Vasco Almeida
Since at this point Git::I18N.perl lacks support for Perl i18n placeholder substitution, use of sprintf following die or error_msg is necessary for placeholder substitution take place. Signed-off-by: Vasco Almeida <vascomalme...@sapo.pt> --- git-add--interactive.per

[PATCH v7 11/16] i18n: add--interactive: mark status words for translation

2016-12-14 Thread Vasco Almeida
also retrieve the translation for the eq tests, since the value assigned was of the translation, not the English source. Signed-off-by: Vasco Almeida <vascomalme...@sapo.pt> --- git-add--interactive.perl | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/git-add--interac

[PATCH v7 05/16] i18n: clean.c: match string with git-add--interactive.perl

2016-12-14 Thread Vasco Almeida
Change strings for help to match the ones in git-add--interactive.perl. The strings now represent one entry to translate each rather then two entries each different only by an ending newline character. Signed-off-by: Vasco Almeida <vascomalme...@sapo.pt> --- builtin/clean.c | 10 +--

[PATCH v7 16/16] i18n: difftool: mark warnings for translation

2016-12-14 Thread Vasco Almeida
Signed-off-by: Vasco Almeida <vascomalme...@sapo.pt> --- git-difftool.perl | 22 -- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/git-difftool.perl b/git-difftool.perl index a5790d03a..8d3632e55 100755 --- a/git-difftool.perl +++ b/git-difftool.perl @@

Re: [PATCH v6 01/16] Git.pm: add subroutines for commenting lines

2016-12-13 Thread Vasco Almeida
A Sáb, 10-12-2016 às 14:09 -0800, Junio C Hamano escreveu: > We only update comment_line_char from the default "#" when the > configured value is a single-byte character and we ignore incorrect > values in the configuration file.  So I think the patch you sent is > correct after all. I am still

Re: [PATCH v6 01/16] Git.pm: add subroutines for commenting lines

2016-12-10 Thread Vasco Almeida
A Sex, 09-12-2016 às 14:23 -0800, Junio C Hamano escreveu: > > This is exactly the same issue I fixed for rebase -i recently. > > Yes, but the patch we see here punts "core.commentChar is not a > single-byte single-letter--panic!" case differently.  I think you > did "just take the first one" in

Re: [PATCH v6 01/16] Git.pm: add subroutines for commenting lines

2016-12-09 Thread Vasco Almeida
A Ter, 22-11-2016 às 09:42 -0800, Junio C Hamano escreveu: > The incremental update below looks sensible.  We'd also want to > protect this codepath from a misconfigured two-or-more byte sequence > in core.commentchar, I would suspect, to be consistent. Are the below changes alright for what you

Re: [PATCH v6 01/16] Git.pm: add subroutines for commenting lines

2016-11-22 Thread Vasco Almeida
A Sex, 11-11-2016 às 11:45 -0100, Vasco Almeida escreveu: > +=item comment_lines ( STRING [, STRING... ]) > + > +Comments lines following core.commentchar configuration. > + > +=cut > + > +sub comment_lines { > +   my $comment_line_char = config("core.commentch

[PATCH v6 15/16] i18n: send-email: mark composing message for translation

2016-11-11 Thread Vasco Almeida
When composing an e-mail, there is a message for the user whose lines are beginning in "GIT:" that can be marked for translation. Signed-off-by: Vasco Almeida <vascomalme...@sapo.pt> --- git-send-email.perl | 16 +--- 1 file changed, 9 insertions(+), 7 deletions(-)

[PATCH v6 11/16] i18n: add--interactive: mark status words for translation

2016-11-11 Thread Vasco Almeida
also retrieve the translation for the eq tests, since the value assigned was of the translation, not the English source. Signed-off-by: Vasco Almeida <vascomalme...@sapo.pt> --- git-add--interactive.perl | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/git-add--interac

[PATCH v6 01/16] Git.pm: add subroutines for commenting lines

2016-11-11 Thread Vasco Almeida
Add subroutines prefix_lines and comment_lines. Signed-off-by: Vasco Almeida <vascomalme...@sapo.pt> --- perl/Git.pm | 24 1 file changed, 24 insertions(+) diff --git a/perl/Git.pm b/perl/Git.pm index b2732822a..69cd1ddec 100644 --- a/perl/Git.pm +++ b/perl/

[PATCH v6 10/16] i18n: add--interactive: remove %patch_modes entries

2016-11-11 Thread Vasco Almeida
Remove unnecessary entries from %patch_modes. After the i18n conversion, these entries are not used anymore. Signed-off-by: Vasco Almeida <vascomalme...@sapo.pt> --- git-add--interactive.perl | 21 - 1 file changed, 21 deletions(-) diff --git a/git-add--interactive.

[PATCH v6 04/16] i18n: add--interactive: mark strings with interpolation for translation

2016-11-11 Thread Vasco Almeida
Since at this point Git::I18N.perl lacks support for Perl i18n placeholder substitution, use of sprintf following die or error_msg is necessary for placeholder substitution take place. Signed-off-by: Vasco Almeida <vascomalme...@sapo.pt> --- git-add--interactive.per

[PATCH v6 09/16] i18n: add--interactive: mark edit_hunk_manually message for translation

2016-11-11 Thread Vasco Almeida
to change wording of one particular use case. The comment character is now used according to the git configuration core.commentchar. Signed-off-by: Vasco Almeida <vascomalme...@sapo.pt> --- git-add--interactive.perl | 52 +++ 1 file chang

[PATCH v6 07/16] i18n: add--interactive: mark patch prompt for translation

2016-11-11 Thread Vasco Almeida
table to the correct entry of %patch_modes, focusing only on value of %patch_modes. Now, we are also interested in the key ('staged', 'stash', 'checkout_head', ...). Signed-off-by: Vasco Almeida <vascomalme...@sapo.pt> --- Makefile | 2 +- git-add--interactive.per

[PATCH v6 13/16] i18n: send-email: mark warnings and errors for translation

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

[PATCH v6 08/16] i18n: add--interactive: i18n of help_patch_cmd

2016-11-11 Thread Vasco Almeida
Mark help message of help_patch_cmd for translation. The message must be unfolded to be free of variables so we can have high quality translations. Signed-off-by: Vasco Almeida <vascomalme...@sapo.pt> --- git-add--interactive.perl | 54 ---

[PATCH v6 14/16] i18n: send-email: mark string with interpolation for translation

2016-11-11 Thread Vasco Almeida
Mark warnings, errors and other messages that are interpolated for translation. We call sprintf() before calling die() and in few other circumstances in order to replace the values on the placeholders. Signed-off-by: Vasco Almeida <vascomalme...@sapo.pt> --- git-send-email.per

[PATCH v6 05/16] i18n: clean.c: match string with git-add--interactive.perl

2016-11-11 Thread Vasco Almeida
Change strings for help to match the ones in git-add--interactive.perl. The strings now represent one entry to translate each rather then two entries each different only by an ending newline character. Signed-off-by: Vasco Almeida <vascomalme...@sapo.pt> --- builtin/clean.c | 10 +--

[PATCH v6 03/16] i18n: add--interactive: mark simple here-documents for translation

2016-11-11 Thread Vasco Almeida
with \EOF but it is with delimiter enclosed in single quotes. So change \EOF to 'EOF', although in this case does not make difference what variation of here-document to use since there is nothing to interpolate. Signed-off-by: Vasco Almeida <vascomalme...@sapo.pt> --- git-add--interactive.pe

[PATCH v6 16/16] i18n: difftool: mark warnings for translation

2016-11-11 Thread Vasco Almeida
Signed-off-by: Vasco Almeida <vascomalme...@sapo.pt> --- git-difftool.perl | 22 -- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/git-difftool.perl b/git-difftool.perl index a5790d03a..8d3632e55 100755 --- a/git-difftool.perl +++ b/git-difftool.perl @@

[PATCH v6 06/16] i18n: add--interactive: mark plural strings

2016-11-11 Thread Vasco Almeida
-by: Vasco Almeida <vascomalme...@sapo.pt> --- Makefile | 3 ++- git-add--interactive.perl | 27 ++- perl/Git/I18N.pm | 10 +- t/t0202/test.pl | 11 ++- 4 files changed, 39 insertions(+), 12 deletions(-) diff --git a/Make

[PATCH v6 12/16] i18n: send-email: mark strings for translation

2016-11-11 Thread Vasco Almeida
Mark strings often displayed to the user for translation. Signed-off-by: Vasco Almeida <vascomalme...@sapo.pt> --- git-send-email.perl | 54 +++-- 1 file changed, 32 insertions(+), 22 deletions(-) diff --git a/git-send-email.perl b/gi

[PATCH v6 02/16] i18n: add--interactive: mark strings for translation

2016-11-11 Thread Vasco Almeida
Mark simple strings (without interpolation) for translation. Brackets around first parameter of ternary operator is necessary because otherwise xgettext fails to extract strings marked for translation from the rest of the file. Signed-off-by: Vasco Almeida <vascomalme...@sapo.pt> --- g

[PATCH v6 00/16] Mark strings in Perl scripts for translation

2016-11-11 Thread Vasco Almeida
Mark messages in some perl scripts for translation. Changes in this re-roll v6: - Change implementation of prefix_lines subroutine to allow arbitrary number of strings as arguments. - Change a few marks for translation hopefully to be easier on the eyes. Interdiff included below. Vasco

Re: [PATCH v5 01/16] Git.pm: add subroutines for commenting lines

2016-11-09 Thread Vasco Almeida
A Ter, 08-11-2016 às 17:06 -0800, Junio C Hamano escreveu: > Vasco Almeida <vascomalme...@sapo.pt> writes: > > > > > Add subroutines prefix_lines and comment_lines. > > > > Signed-off-by: Vasco Almeida <vascomalme...@sapo.pt> > > --- > >

[PATCH v5 05/16] i18n: clean.c: match string with git-add--interactive.perl

2016-11-08 Thread Vasco Almeida
Change strings for help to match the ones in git-add--interactive.perl. The strings now represent one entry to translate each rather then two entries each different only by an ending newline character. Signed-off-by: Vasco Almeida <vascomalme...@sapo.pt> --- builtin/clean.c | 10 +--

[PATCH v5 11/16] i18n: add--interactive: mark status words for translation

2016-11-08 Thread Vasco Almeida
also retrieve the translation for the eq tests, since the value assigned was of the translation, not the English source. Signed-off-by: Vasco Almeida <vascomalme...@sapo.pt> --- git-add--interactive.perl | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/git-add--interac

[PATCH v5 14/16] i18n: send-email: mark string with interpolation for translation

2016-11-08 Thread Vasco Almeida
Mark warnings, errors and other messages that are interpolated for translation. We call sprintf() before calling die() and in few other circumstances in order to replace the values on the placeholders. Signed-off-by: Vasco Almeida <vascomalme...@sapo.pt> --- git-send-email.per

[PATCH v5 04/16] i18n: add--interactive: mark strings with interpolation for translation

2016-11-08 Thread Vasco Almeida
Since at this point Git::I18N.perl lacks support for Perl i18n placeholder substitution, use of sprintf following die or error_msg is necessary for placeholder substitution take place. Signed-off-by: Vasco Almeida <vascomalme...@sapo.pt> --- git-add--interactive.per

[PATCH v5 15/16] i18n: send-email: mark composing message for translation

2016-11-08 Thread Vasco Almeida
When composing an e-mail, there is a message for the user whose lines are beginning in "GIT:" that can be marked for translation. Signed-off-by: Vasco Almeida <vascomalme...@sapo.pt> --- git-send-email.perl | 16 +--- 1 file changed, 9 insertions(+), 7 deletions(-)

[PATCH v5 12/16] i18n: send-email: mark strings for translation

2016-11-08 Thread Vasco Almeida
Mark strings often displayed to the user for translation. Signed-off-by: Vasco Almeida <vascomalme...@sapo.pt> --- git-send-email.perl | 52 ++-- 1 file changed, 30 insertions(+), 22 deletions(-) diff --git a/git-send-email.perl b/gi

[PATCH v5 06/16] i18n: add--interactive: mark plural strings

2016-11-08 Thread Vasco Almeida
-by: Vasco Almeida <vascomalme...@sapo.pt> --- Makefile | 3 ++- git-add--interactive.perl | 27 ++- perl/Git/I18N.pm | 10 +- t/t0202/test.pl | 11 ++- 4 files changed, 39 insertions(+), 12 deletions(-) diff --git a/Make

[PATCH v5 13/16] i18n: send-email: mark warnings and errors for translation

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

[PATCH v5 07/16] i18n: add--interactive: mark patch prompt for translation

2016-11-08 Thread Vasco Almeida
table to the correct entry of %patch_modes, focusing only on value of %patch_modes. Now, we are also interested in the key ('staged', 'stash', 'checkout_head', ...). Signed-off-by: Vasco Almeida <vascomalme...@sapo.pt> --- Makefile | 2 +- git-add--interactive.per

[PATCH v5 03/16] i18n: add--interactive: mark simple here-documents for translation

2016-11-08 Thread Vasco Almeida
with \EOF but it is with delimiter enclosed in single quotes. So change \EOF to 'EOF', although in this case does not make difference what variation of here-document to use since there is nothing to interpolate. Signed-off-by: Vasco Almeida <vascomalme...@sapo.pt> --- git-add--interactive.pe

[PATCH v5 10/16] i18n: add--interactive: remove %patch_modes entries

2016-11-08 Thread Vasco Almeida
Remove unnecessary entries from %patch_modes. After the i18n conversion, these entries are not used anymore. Signed-off-by: Vasco Almeida <vascomalme...@sapo.pt> --- git-add--interactive.perl | 21 - 1 file changed, 21 deletions(-) diff --git a/git-add--interactive.

[PATCH v5 16/16] i18n: difftool: mark warnings for translation

2016-11-08 Thread Vasco Almeida
Signed-off-by: Vasco Almeida <vascomalme...@sapo.pt> --- git-difftool.perl | 22 -- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/git-difftool.perl b/git-difftool.perl index a5790d03a..8d3632e55 100755 --- a/git-difftool.perl +++ b/git-difftool.perl @@

[PATCH v5 08/16] i18n: add--interactive: i18n of help_patch_cmd

2016-11-08 Thread Vasco Almeida
Mark help message of help_patch_cmd for translation. The message must be unfolded to be free of variables so we can have high quality translations. Signed-off-by: Vasco Almeida <vascomalme...@sapo.pt> --- git-add--interactive.perl | 54 ---

[PATCH v5 09/16] i18n: add--interactive: mark edit_hunk_manually message for translation

2016-11-08 Thread Vasco Almeida
to change wording of one particular use case. Signed-off-by: Vasco Almeida <vascomalme...@sapo.pt> --- git-add--interactive.perl | 52 ++- 1 file changed, 38 insertions(+), 14 deletions(-) diff --git a/git-add--interactive.perl b/g

[PATCH v5 01/16] Git.pm: add subroutines for commenting lines

2016-11-08 Thread Vasco Almeida
Add subroutines prefix_lines and comment_lines. Signed-off-by: Vasco Almeida <vascomalme...@sapo.pt> --- perl/Git.pm | 23 +++ 1 file changed, 23 insertions(+) diff --git a/perl/Git.pm b/perl/Git.pm index b2732822a..17be59fb7 100644 --- a/perl/Git.pm +++ b/perl/

[PATCH v5 00/16] Mark strings in Perl scripts for translation

2016-11-08 Thread Vasco Almeida
in git-send-email.perl. Interdiff included below. Vasco Almeida (16): Git.pm: add subroutines for commenting lines i18n: add--interactive: mark strings for translation i18n: add--interactive: mark simple here-documents for translation i18n: add--interactive: mark strings with interpolation

[PATCH v5 02/16] i18n: add--interactive: mark strings for translation

2016-11-08 Thread Vasco Almeida
Mark simple strings (without interpolation) for translation. Brackets around first parameter of ternary operator is necessary because otherwise xgettext fails to extract strings marked for translation from the rest of the file. Signed-off-by: Vasco Almeida <vascomalme...@sapo.pt> --- g

Re: [PATCH v4 08/14] i18n: add--interactive: mark edit_hunk_manually message for translation

2016-11-07 Thread Vasco Almeida
A Seg, 10-10-2016 às 12:54 +, Vasco Almeida escreveu: > diff --git a/git-add--interactive.perl b/git-add--interactive.perl > index 045b847..861f7b0 100755 > --- a/git-add--interactive.perl > +++ b/git-add--interactive.perl > @@ -1058,6 +1058,30 @@

Re: [PATCH v4 05/14] i18n: add--interactive: mark plural strings

2016-10-20 Thread Vasco Almeida
A Seg, 10-10-2016 às 12:54 +, Vasco Almeida escreveu: > @@ -70,6 +72,8 @@ Git::I18N - Perl interface to Git's Gettext localizations >   > printf __("The following error occurred: %s\n"), $error; >   > +   printf __n("commited %d file", "com

Re: [PATCH v4 05/14] i18n: add--interactive: mark plural strings

2016-10-20 Thread Vasco Almeida
A Qua, 19-10-2016 às 11:40 -0700, Junio C Hamano escreveu: > Vasco Almeida <vascomalme...@sapo.pt> writes: > > > > > @@ -669,12 +669,18 @@ sub status_cmd { > >  sub say_n_paths { > >   my $did = shift @_; > >   my $cnt = scalar @_; &

Re: [PATCH v4 01/14] i18n: add--interactive: mark strings for translation

2016-10-20 Thread Vasco Almeida
A Qua, 19-10-2016 às 11:14 -0700, Junio C Hamano escreveu: > Vasco Almeida <vascomalme...@sapo.pt> writes: > > > > >   } else { > > - print "No untracked files.\n"; > > + print __("No untracked files.\n"); > >

[PATCH 1/4] i18n: apply: mark error message for translation

2016-10-17 Thread Vasco Almeida
Update test to reflect changes. Signed-off-by: Vasco Almeida <vascomalme...@sapo.pt> --- apply.c | 4 ++-- t/t4254-am-corrupt.sh | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/apply.c b/apply.c index 8215874..705cf56 100644 --- a/apply.c +++ b/a

[PATCH 2/4] i18n: convert mark error messages for translation

2016-10-17 Thread Vasco Almeida
Mark error messages about CRLF for translation. Update test to reflect changes. Signed-off-by: Vasco Almeida <vascomalme...@sapo.pt> --- convert.c | 12 t/t0020-crlf.sh | 6 +- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/convert.c b/convert.c

[PATCH 4/4] i18n: diff: mark warnings for translation

2016-10-17 Thread Vasco Almeida
Mark rename_limit_warning and degrade_cc_to_c_warning and rename_limit_warning for translation. Signed-off-by: Vasco Almeida <vascomalme...@sapo.pt> --- diff.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/diff.c b/diff.c index 1d304e0..1687317

[PATCH 3/4] i18n: credential-cache--daemon: mark advice for translation

2016-10-17 Thread Vasco Almeida
Mark permissions_advice for translation. Signed-off-by: Vasco Almeida <vascomalme...@sapo.pt> --- credential-cache--daemon.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/credential-cache--daemon.c b/credential-cache--daemon.c index 1e5f16a..46c5937

[PATCH 2/3] i18n: apply: mark info messages for translation

2016-10-14 Thread Vasco Almeida
Mark messages for translation printed to stderr. Signed-off-by: Vasco Almeida <vascomalme...@sapo.pt> --- apply.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/apply.c b/apply.c index 201d3a7..13b2064 100644 --- a/apply.c +++ b/apply.c @@ -3554,7 +3554,7 @@

[PATCH 1/3] i18n: apply: mark plural string for translation

2016-10-14 Thread Vasco Almeida
Mark plural string for translation using Q_(). Signed-off-by: Vasco Almeida <vascomalme...@sapo.pt> --- apply.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/apply.c b/apply.c index b03d274..201d3a7 100644 --- a/apply.c +++ b/apply.c @@ -4869,10 +4869,12

[PATCH 3/3] i18n: apply: mark error messages for translation

2016-10-14 Thread Vasco Almeida
Mark error messages for translation passed to error() and die() functions. Signed-off-by: Vasco Almeida <vascomalme...@sapo.pt> --- apply.c | 48 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/apply.c b/apply.c index 1

[PATCH] t1512: become resilient to GETTEXT_POISON build

2016-10-12 Thread Vasco Almeida
The concerned message was marked for translation by 0c99171 ("get_short_sha1: mark ambiguity error for translation", 2016-09-26). Signed-off-by: Vasco Almeida <vascomalme...@sapo.pt> --- t/t1512-rev-parse-disambiguation.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

[PATCH v4 12/14] i18n: send-email: mark warnings and errors for translation

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

[PATCH v4 10/14] i18n: add--interactive: mark status words for translation

2016-10-10 Thread Vasco Almeida
also retrieve the translation for the eq tests, since the value assigned was of the translation, not the English source. Signed-off-by: Vasco Almeida <vascomalme...@sapo.pt> --- git-add--interactive.perl | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/git-add--interac

[PATCH v4 11/14] i18n: send-email: mark strings for translation

2016-10-10 Thread Vasco Almeida
Mark strings often displayed to the user for translation. Signed-off-by: Vasco Almeida <vascomalme...@sapo.pt> --- git-send-email.perl | 52 ++-- 1 file changed, 30 insertions(+), 22 deletions(-) diff --git a/git-send-email.perl b/gi

[PATCH v4 13/14] i18n: send-email: mark string with interpolation for translation

2016-10-10 Thread Vasco Almeida
Mark warnings, errors and other messages that are interpolated for translation. We call sprintf() before calling die() and in few other circumstances in order to replace the values on the placeholders. Signed-off-by: Vasco Almeida <vascomalme...@sapo.pt> --- git-send-email.per

[PATCH v4 14/14] i18n: difftool: mark warnings for translation

2016-10-10 Thread Vasco Almeida
Signed-off-by: Vasco Almeida <vascomalme...@sapo.pt> --- git-difftool.perl | 22 -- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/git-difftool.perl b/git-difftool.perl index a5790d0..8d3632e 100755 --- a/git-difftool.perl +++ b/git-difftool.perl @@

[PATCH v4 09/14] i18n: add--interactive: remove %patch_modes entries

2016-10-10 Thread Vasco Almeida
Remove unnecessary entries from %patch_modes. After the i18n conversion, these entries are not used anymore. Signed-off-by: Vasco Almeida <vascomalme...@sapo.pt> --- git-add--interactive.perl | 21 - 1 file changed, 21 deletions(-) diff --git a/git-add--interactive.

[PATCH v4 08/14] i18n: add--interactive: mark edit_hunk_manually message for translation

2016-10-10 Thread Vasco Almeida
to change wording of one particular use case. Signed-off-by: Vasco Almeida <vascomalme...@sapo.pt> --- git-add--interactive.perl | 45 ++--- 1 file changed, 34 insertions(+), 11 deletions(-) diff --git a/git-add--interactive.perl b/git-add--interactiv

[PATCH v4 04/14] i18n: clean.c: match string with git-add--interactive.perl

2016-10-10 Thread Vasco Almeida
Change strings for help to match the ones in git-add--interactive.perl. The strings now represent one entry to translate each rather then two entries each different only by an ending newline character. Signed-off-by: Vasco Almeida <vascomalme...@sapo.pt> --- builtin/clean.c | 10 +--

[PATCH v4 05/14] i18n: add--interactive: mark plural strings

2016-10-10 Thread Vasco Almeida
-by: Vasco Almeida <vascomalme...@sapo.pt> --- Makefile | 3 ++- git-add--interactive.perl | 27 ++- perl/Git/I18N.pm | 9 - t/t0202/test.pl | 11 ++- 4 files changed, 38 insertions(+), 12 deletions(-) diff --git a/Make

[PATCH v4 06/14] i18n: add--interactive: mark patch prompt for translation

2016-10-10 Thread Vasco Almeida
table to the correct entry of %patch_modes, focusing only on value of %patch_modes. Now, we are also interested in the key ('staged', 'stash', 'checkout_head', ...). Signed-off-by: Vasco Almeida <vascomalme...@sapo.pt> --- Makefile | 2 +- git-add--interactive.per

[PATCH v4 07/14] i18n: add--interactive: i18n of help_patch_cmd

2016-10-10 Thread Vasco Almeida
Mark help message of help_patch_cmd for translation. The message must be unfolded to be free of variables so we can have high quality translations. Signed-off-by: Vasco Almeida <vascomalme...@sapo.pt> --- git-add--interactive.perl | 54 ---

[PATCH v4 02/14] i18n: add--interactive: mark simple here-documents for translation

2016-10-10 Thread Vasco Almeida
\EOF but it is with delimiter enclosed in single quotes. Then change \EOF to 'EOF', although in this case does not make difference what variation of here-document to use since there is nothing to interpolate. Signed-off-by: Vasco Almeida <vascomalme...@sapo.pt> --- git-add--interactive.pe

[PATCH v4 03/14] i18n: add--interactive: mark strings with interpolation for translation

2016-10-10 Thread Vasco Almeida
Since at this point Git::I18N.perl lacks support for Perl i18n placeholder substitution, use of sprintf following die or error_msg is necessary for placeholder substitution take place. Signed-off-by: Vasco Almeida <vascomalme...@sapo.pt> --- git-add--interactive.per

[PATCH v4 01/14] i18n: add--interactive: mark strings for translation

2016-10-10 Thread Vasco Almeida
Mark simple strings (without interpolation) for translation. Brackets around first parameter of ternary operator is necessary because otherwise xgettext fails to extract strings marked for translation from the rest of the file. Signed-off-by: Vasco Almeida <vascomalme...@sapo.pt> --- g

[PATCH v4 00/14] Mark strings in Perl scripts for translation

2016-10-10 Thread Vasco Almeida
Mark messages in some perl scripts for translation. Fix minor stuff and follow Jakub Narębski's suggestion to use N__() instead of __() in the hash tables. Interdiff included below. Vasco Almeida (14): i18n: add--interactive: mark strings for translation i18n: add--interactive: mark simple

[PATCH v3 13/14] i18n: send-email: mark string with interpolation for translation

2016-10-05 Thread Vasco Almeida
Mark warnings, errors and other messages that are interpolated for translation. We call sprintf() before calling die() and in few other circumstances in order to replace the values on the placeholders. Signed-off-by: Vasco Almeida <vascomalme...@sapo.pt> --- I changed (y|N) to [y|N] aroun

[PATCH v3 09/14] i18n: add--interactive: remove %patch_modes entries

2016-10-05 Thread Vasco Almeida
Remove unnecessary entries from %patch_modes. After the i18n conversion, these entries are not used anymore. Signed-off-by: Vasco Almeida <vascomalme...@sapo.pt> --- git-add--interactive.perl | 21 - 1 file changed, 21 deletions(-) diff --git a/git-add--interactive.

[PATCH v3 12/14] i18n: send-email: mark warnings and errors for translation

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

[PATCH v3 10/14] i18n: add--interactive: mark status words for translation

2016-10-05 Thread Vasco Almeida
Mark words 'nothing', 'unchanged' and 'binary' used to display what has been staged or not, in "git add -i" status command. Signed-off-by: Vasco Almeida <vascomalme...@sapo.pt> --- git-add--interactive.perl | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff

[PATCH v3 11/14] i18n: send-email: mark strings for translation

2016-10-05 Thread Vasco Almeida
Mark strings often displayed to the user for translation. Signed-off-by: Vasco Almeida <vascomalme...@sapo.pt> --- git-send-email.perl | 52 ++-- 1 file changed, 30 insertions(+), 22 deletions(-) diff --git a/git-send-email.perl b/gi

[PATCH v3 14/14] i18n: difftool: mark warnings for translation

2016-10-05 Thread Vasco Almeida
Signed-off-by: Vasco Almeida <vascomalme...@sapo.pt> --- git-difftool.perl | 22 -- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/git-difftool.perl b/git-difftool.perl index a5790d0..8d3632e 100755 --- a/git-difftool.perl +++ b/git-difftool.perl @@

[PATCH v3 03/14] i18n: add--interactive: mark strings with interpolation for translation

2016-10-05 Thread Vasco Almeida
Since at this point Git::I18N.perl lacks support for Perl i18n placeholder substitution, use of sprintf following die or error_msg is necessary for placeholder substitution take place. Signed-off-by: Vasco Almeida <vascomalme...@sapo.pt> --- git-add--interactive.per

[PATCH v3 06/14] i18n: add--interactive: mark patch prompt for translation

2016-10-05 Thread Vasco Almeida
table to the correct entry of %patch_modes, focusing only on value of %patch_modes. Now, we are also interested in the key ('staged', 'stash', 'checkout_head', ...). Signed-off-by: Vasco Almeida <vascomalme...@sapo.pt> --- git-add--interactive.per

[PATCH v3 01/14] i18n: add--interactive: mark strings for translation

2016-10-05 Thread Vasco Almeida
Mark simple strings (without interpolation) for translation. Brackets around first parameter of ternary operator is necessary because otherwise xgettext fails to extract strings marked for translation from the rest of the file. Signed-off-by: Vasco Almeida <vascomalme...@sapo.pt> --- g

[PATCH v3 04/14] i18n: clean.c: match string with git-add--interactive.perl

2016-10-05 Thread Vasco Almeida
Change strings for help to match the ones in git-add--interactive.perl. The strings now represent one entry to translate each rather then two entries each different only by an ending newline character. Signed-off-by: Vasco Almeida <vascomalme...@sapo.pt> --- builtin/clean.c | 10 +--

[PATCH v3 07/14] i18n: add--interactive: i18n of help_patch_cmd

2016-10-05 Thread Vasco Almeida
Mark help message of help_patch_cmd for translation. The message must be unfolded to be free of variables so we can have high quality translations. Signed-off-by: Vasco Almeida <vascomalme...@sapo.pt> --- git-add--interactive.perl | 54 ---

[PATCH v3 02/14] i18n: add--interactive: mark simple here-documents for translation

2016-10-05 Thread Vasco Almeida
\EOF but it is with delimiter enclosed in single quotes. Then change \EOF to 'EOF', although in this case does not make difference what variation of here-document to use since there is nothing to interpolate. Signed-off-by: Vasco Almeida <vascomalme...@sapo.pt> --- git-add--interactive.pe

[PATCH v3 05/14] i18n: add--interactive: mark plural strings

2016-10-05 Thread Vasco Almeida
-by: Vasco Almeida <vascomalme...@sapo.pt> --- On the present re-roll, change name __Q to __n following the Locale::Message convention. Add documentation about __n(). Makefile | 3 ++- git-add--interactive.perl | 27 ++- perl/Git/I18N.pm

[PATCH v3 08/14] i18n: add--interactive: mark edit_hunk_manually message for translation

2016-10-05 Thread Vasco Almeida
to change wording of one particular use case. Signed-off-by: Vasco Almeida <vascomalme...@sapo.pt> --- git-add--interactive.perl | 45 ++--- 1 file changed, 34 insertions(+), 11 deletions(-) diff --git a/git-add--interactive.perl b/git-add--interactiv

[PATCH v3 00/14] Mark strings in Perl scripts for translation

2016-10-05 Thread Vasco Almeida
Perl skills. Interdiff bellow. Vasco Almeida (14): i18n: add--interactive: mark strings for translation i18n: add--interactive: mark simple here-documents for translation i18n: add--interactive: mark strings with interpolation for translation i18n: clean.c: match string with git-add

Re: [PATCH v2 05/11] i18n: add--interactive: mark message for translation

2016-10-03 Thread Vasco Almeida
A Sáb, 01-10-2016 às 19:09 +0200, Jakub Narębski escreveu: > W dniu 26.09.2016 o 01:09, Junio C Hamano pisze: > > Vasco Almeida <vascomalme...@sapo.pt> writes: > >  > >> -print colored $prompt_color, > $patch_mode_flavour{VERB}, > >> -

  1   2   3   4   5   >