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

2016-06-21 Thread Vasco Almeida
Use of sprintf following die or error_msg is necessary for placeholder substitution take place. Signed-off-by: Vasco Almeida --- git-add--interactive.perl | 26 ++ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/git-add--interactive.perl b/git-add

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

2016-06-21 Thread Vasco Almeida
se, reusing here document would add a trailer newline to the message, making them not match 100%, hence creating two entries in pot template for translation rather than a single entry. Signed-off-by: Vasco Almeida --- git-add--interactive.perl | 24 1 file changed, 12 i

[PATCH 06/11] i18n: add--interactive: i18n of help_patch_cmd

2016-06-21 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 hight quality translations. Signed-off-by: Vasco Almeida --- git-add--interactive.perl | 65 +++ 1 file changed, 54 insertions

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

2016-06-21 Thread Vasco Almeida
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 --- git-add--interactive.perl | 112 +

[PATCH 04/11] i18n: add--interactive: mark plural strings

2016-06-21 Thread Vasco Almeida
Mark plural strings for translation. Unfold each action case in one entire sentence. Pass new keyword for xgettext to extract. Update test to include new subrotine Q__() for plural strings handling. Signed-off-by: Vasco Almeida --- Makefile | 3 ++- git-add

[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 --- git-send-email.perl | 36 ++-- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/git-send-email.perl b/git-send-email.perl index 2521832..e7f712e 100755 --- a

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

2016-06-21 Thread Vasco Almeida
Signed-off-by: Vasco Almeida --- git-difftool.perl | 18 ++ 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/git-difftool.perl b/git-difftool.perl index ebd13ba..fe7f003 100755 --- a/git-difftool.perl +++ b/git-difftool.perl @@ -22,6 +22,7 @@ use File::Path qw

[PATCH 10/11] i18n: send-email: mark string with interpolation for translation

2016-06-21 Thread Vasco Almeida
Mark warnings, errors and other messages that are interpolated for translation. We must call sprintf() before calling die() and in few other circumstances in order to interpolation take place. Signed-off-by: Vasco Almeida --- git-send-email.perl | 71

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

2016-06-21 Thread Vasco Almeida
Mark strings often displayed to user for translation. Signed-off-by: Vasco Almeida --- git-send-email.perl | 53 +++-- 1 file changed, 31 insertions(+), 22 deletions(-) diff --git a/git-send-email.perl b/git-send-email.perl index 6958785..2521832

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

2016-06-21 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 --- git-add--interactive.perl | 68

[PATCH 07/11] i18n: add--interactive: mark edit_hunk message for translation

2016-06-21 Thread Vasco Almeida
., wanting to change wording of one particular use case. Signed-off-by: Vasco Almeida --- git-add--interactive.perl | 60 ++- 1 file changed, 49 insertions(+), 11 deletions(-) diff --git a/git-add--interactive.perl b/git-add--interactive.perl ind

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 extract

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 > --- a/unpack-trees.c > +++ b/unpack-tree

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

2016-06-24 Thread Vasco Almeida
Citando Junio C Hamano : Vasco Almeida 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 larger issue is this fails to update tests that check

[PATCH v2 01/11] i18n: add--interactive: mark strings for translation

2016-06-29 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 --- git-add--interactive.perl | 68

[PATCH v2 04/11] i18n: add--interactive: mark plural strings

2016-06-29 Thread Vasco Almeida
Mark plural strings for translation. Unfold each action case in one entire sentence. Pass new keyword for xgettext to extract. Update test to include new subrotine Q__() for plural strings handling. Signed-off-by: Vasco Almeida --- Makefile | 3 ++- git-add

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

2016-06-29 Thread Vasco Almeida
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 --- git-add--interactive.perl | 91 ++-

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

2016-06-29 Thread Vasco Almeida
se, reusing here document would add a trailer newline to the message, making them not match 100%, hence creating two entries in pot template for translation rather than a single entry. Signed-off-by: Vasco Almeida --- git-add--interactive.perl | 24 1 file changed, 12 i

[PATCH v2 06/11] i18n: add--interactive: i18n of help_patch_cmd

2016-06-29 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 --- git-add--interactive.perl | 65 +++ 1 file changed, 54 insertions

[PATCH v2 08/11] i18n: send-email: mark strings for translation

2016-06-29 Thread Vasco Almeida
Mark strings often displayed to user for translation. Signed-off-by: Vasco Almeida --- git-send-email.perl | 53 +++-- 1 file changed, 31 insertions(+), 22 deletions(-) diff --git a/git-send-email.perl b/git-send-email.perl index 6958785..2521832

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

2016-06-29 Thread Vasco Almeida
Use of sprintf following die or error_msg is necessary for placeholder substitution take place. Signed-off-by: Vasco Almeida --- git-add--interactive.perl | 26 ++ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/git-add--interactive.perl b/git-add

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

2016-06-29 Thread Vasco Almeida
Mark warnings, errors and other messages for translation. Signed-off-by: Vasco Almeida --- git-send-email.perl | 36 ++-- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/git-send-email.perl b/git-send-email.perl index 2521832..e7f712e 100755 --- a

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

2016-06-29 Thread Vasco Almeida
Signed-off-by: Vasco Almeida --- git-difftool.perl | 18 ++ 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/git-difftool.perl b/git-difftool.perl index ebd13ba..de8d783 100755 --- a/git-difftool.perl +++ b/git-difftool.perl @@ -22,6 +22,7 @@ use File::Path qw

[PATCH v2 07/11] i18n: add--interactive: mark edit_hunk_manually message for translation

2016-06-29 Thread Vasco Almeida
., wanting to change wording of one particular use case. Signed-off-by: Vasco Almeida --- git-add--interactive.perl | 60 ++- 1 file changed, 49 insertions(+), 11 deletions(-) diff --git a/git-add--interactive.perl b/git-add--interactive.perl ind

[PATCH v2 00/11] Mark strings in perl script for translation

2016-06-29 Thread Vasco Almeida
Mark messages in some perl scripts for translation. Since v1, adds brackets so parameter grouping of sprintf parameters is easier to see. Interdiff included below. Vasco Almeida (11): i18n: add--interactive: mark strings for translation i18n: add--interactive: mark simple here documents for

[PATCH v2 10/11] i18n: send-email: mark string with interpolation for translation

2016-06-29 Thread Vasco Almeida
Mark warnings, errors and other messages that are interpolated for translation. We must call sprintf() before calling die() and in few other circumstances in order to interpolation take place. Signed-off-by: Vasco Almeida --- git-send-email.perl | 71

[PATCH] t5541: become resilient to GETTEXT_POISON

2016-06-30 Thread Vasco Almeida
Use test_i18n* functions for testing text already marked for translation. Signed-off-by: Vasco Almeida --- Incremental update for va/i18n-even-more (merged to 'next' on 2016-06-28 at 5919dfa). I don't know how I didn't catch this one. t/t5541-http-push-smart.sh | 12

[PATCH v2] t5541: become resilient to GETTEXT_POISON

2016-06-30 Thread Vasco Almeida
Use test_i18n* functions for testing text already marked for translation. Signed-off-by: Vasco Almeida --- Fix typo on v1. Forgot to mention that tests with TTY prerequisite were skipped, I don't know how to run them. Notes: Incremental update for va/i18n-even-more (merged to 'nex

[PATCH] i18n: notes: mark comment for translation

2016-07-21 Thread Vasco Almeida
Mark comment displayed when editing a note 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 0572051..37933bd 100644 --- a/builtin/notes.c +++ b/builtin/notes.c

[PATCH v2] i18n: notes: mark comment for translation

2016-07-23 Thread Vasco Almeida
Mark comment displayed when editing a note for translation. Signed-off-by: Vasco Almeida --- It seems that strbuf_add_commented_lines adds a trailing newline. So adding another strbuf_addch(&buf, '\n') would make 2 lines rather only one. builtin/notes.c | 5 +++-- 1 file changed

[PATCH] t5510: become resilient to GETTEXT_POISON

2016-07-25 Thread Vasco Almeida
Replace gettext poison text with appropriate values to be able to cut the right output of git fetch command for comparison. The first gettext poison falls from the previous line into the next because the poison does not add a newline, so we must replace it with nothing. Signed-off-by: Vasco

Re: [PATCH v2] i18n: notes: mark comment for translation

2016-07-26 Thread Vasco Almeida
A Seg, 25-07-2016 às 10:49 -0700, Junio C Hamano escreveu: > Vasco Almeida writes: > > > > >  static const char note_template[] = > > - "\nWrite/edit the notes for the following object:\n"; > > + N_("Write/edit the notes for the following object:

[PATCH v3] i18n: notes: mark comment for translation

2016-07-26 Thread Vasco Almeida
Mark comment displayed when editing a note for translation. Signed-off-by: Vasco Almeida --- builtin/notes.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/builtin/notes.c b/builtin/notes.c index 0572051..aec427b 100644 --- a/builtin/notes.c +++ b/builtin/notes.c

[PATCH] t5510: skip tests under GETTEXT_POISON build

2016-07-26 Thread Vasco Almeida
Skip tests when running under GETTEXT_POISON build and run them with C_LOCALE_OUTPUT prerequisite. These tests are irrelevant under GETTEXT_POISON because they test text output alignment which GETTEXT_POISON turns useless. Signed-off-by: Vasco Almeida --- t/t5510-fetch.sh | 4 ++-- 1 file

Re: [PATCH v2] i18n: notes: mark comment for translation

2016-07-27 Thread Vasco Almeida
A Ter, 26-07-2016 às 10:05 -0700, Junio C Hamano escreveu: > In any case, I do not understand why you want to exclude the LFs > from the message. As Ævar Arnfjörð Bjarmason pointed out [1], it is to assure that a translator does not break the output by mistake, by removing a LF. I agree because I

Re: [PATCH v3] i18n: notes: mark comment for translation

2016-07-27 Thread Vasco Almeida
A Ter, 26-07-2016 às 09:57 -0700, Junio C Hamano escreveu: > Vasco Almeida writes: > > > > > + strbuf_add_commented_lines(&buf, "\n", > > strlen("\n")); > > + strbuf_add_commented_li

[PATCH] i18n: config: unfold error messages marked for translation

2016-07-27 Thread Vasco Almeida
t_config_from_parameters() and configset_add_value(). For error message in git_parse_source(), use xstrfmt() function to prepare the message string, instead of doing something like it's done for die_bad_number(), because intelligibility and code conciseness are improved for that instanc

Re: [PATCH] i18n: config: unfold error messages marked for translation

2016-07-28 Thread Vasco Almeida
A Qua, 27-07-2016 às 13:00 -0700, Junio C Hamano escreveu: > Vasco Almeida writes: > > > > > + > > + switch (cf->origin_type) { > > + case CONFIG_ORIGIN_BLOB: > > + error_msg = xstrfmt(_("bad config line %d in blob > > %s"

[PATCH v4] i18n: notes: mark comment for translation

2016-07-28 Thread Vasco Almeida
Mark comment displayed when editing a note for translation. Signed-off-by: Vasco Almeida --- This patch follows the original output and Ævar Arnfjörð Bjarmason sugestion to remove \n from the source string in order to assure that the ouput layout is not change by one translator forgetting to

[PATCH v2] i18n: config: unfold error messages marked for translation

2016-07-28 Thread Vasco Almeida
t_config_from_parameters() and configset_add_value(). For error message in git_parse_source(), use xstrfmt() function to prepare the message string, instead of doing something like it's done for die_bad_number(), because intelligibility and code conciseness are improved for that instanc

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

2016-08-08 Thread Vasco Almeida
Signed-off-by: Vasco Almeida --- setup.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/setup.c b/setup.c index 6d0e0c9..fe572b8 100644 --- a/setup.c +++ b/setup.c @@ -759,9 +759,9 @@ static const char *setup_bare_git_dir(struct strbuf *cwd, int offset

[PATCH 2/3] i18n: archive: mark errors for translation

2016-08-08 Thread Vasco Almeida
Signed-off-by: Vasco Almeida --- archive.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/archive.c b/archive.c index 42df974..dde1ab4 100644 --- a/archive.c +++ b/archive.c @@ -458,11 +458,11 @@ static int parse_archive_args(int argc, const char **argv

[PATCH 3/3] i18n: git-stash: mark message for translation

2016-08-08 Thread Vasco Almeida
Signed-off-by: Vasco Almeida --- git-stash.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git-stash.sh b/git-stash.sh index 22fb8bc..9cbd682 100755 --- a/git-stash.sh +++ b/git-stash.sh @@ -265,7 +265,7 @@ save_stash () { create_stash "$stash_msg"

Re: [PATCH 2/3] i18n: archive: mark errors for translation

2016-08-10 Thread Vasco Almeida
A Ter, 09-08-2016 às 12:35 -0700, Junio C Hamano escreveu: > Hmm, this function is called by write_archive(), which can be called > by the upload-archive process running on the remote end, whose > locale certainly is different from that of your local environment. > > If I do not read English and g

[PATCH v2 1/3] i18n: setup: mark error messages for translation

2016-08-10 Thread Vasco Almeida
Signed-off-by: Vasco Almeida --- setup.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/setup.c b/setup.c index 6d0e0c9..fe572b8 100644 --- a/setup.c +++ b/setup.c @@ -759,9 +759,9 @@ static const char *setup_bare_git_dir(struct strbuf *cwd, int offset

[PATCH v2 2/3] i18n: archive: mark errors for translation

2016-08-10 Thread Vasco Almeida
Signed-off-by: Vasco Almeida --- archive.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/archive.c b/archive.c index 42df974..dde1ab4 100644 --- a/archive.c +++ b/archive.c @@ -458,11 +458,11 @@ static int parse_archive_args(int argc, const char **argv

[PATCH v2 3/3] i18n: git-stash: mark messages for translation

2016-08-10 Thread Vasco Almeida
Signed-off-by: Vasco Almeida --- I added the second mark that I had missed the first time. Thank you Junio C Hamano for spotting that. git-stash.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/git-stash.sh b/git-stash.sh index 22fb8bc..826af18 100755 --- a/git

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 Hamano

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

2016-10-05 Thread Vasco Almeida
lack 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 gi

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

2016-10-05 Thread Vasco Almeida
: Vasco Almeida --- 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 | 9 - t/t0202/test.pl

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

2016-10-05 Thread Vasco Almeida
., wanting to change wording of one particular use case. Signed-off-by: Vasco Almeida --- git-add--interactive.perl | 45 ++--- 1 file changed, 34 insertions(+), 11 deletions(-) diff --git a/git-add--interactive.perl b/git-add--interactive.perl index 35967f

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

2016-10-05 Thread Vasco Almeida
delimiter \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 --- git-add--interactive.perl | 8

[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 --- git-add--interactive.perl | 23 --- 1 file changed, 12

[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 --- git-add--interactive.perl | 54 +

[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 --- git-add--interactive.perl | 74

[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 --- builtin/clean.c | 10 +- 1 file changed, 5

[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 --- git-add--interactive.perl | 54 --- 1 file changed, 46 insertions

[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 --- git-send-email.perl | 52 ++-- 1 file changed, 30 insertions(+), 22 deletions(-) diff --git a/git-send-email.perl b/git-send-email.perl index da81be4

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

2016-10-05 Thread Vasco Almeida
Signed-off-by: Vasco Almeida --- 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 @@ -22,6 +22,7 @@ use File::Path qw

[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 --- I changed (y|N) to [y|N] around line 1750 to match with the

[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 --- git-add--interactive.perl | 21 - 1 file changed, 21 deletions(-) diff --git a/git-add--interactive.perl b/git-add--interactive.perl

[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 --- 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 78eb59b..982c6c0 100755 --- a

[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 --- git-add--interactive.perl | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff

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

[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 --- git-add--interactive.perl | 54 --- 1 file changed, 46 insertions

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

2016-10-10 Thread Vasco Almeida
delimiter \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 --- git-add--interactive.perl | 8

[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 --- git-add--interactive.perl | 25 + 1 file changed, 13

[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 --- git-add--interactive.perl | 76

[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 --- builtin/clean.c | 10 +- 1 file changed, 5

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

2016-10-10 Thread Vasco Almeida
: Vasco Almeida --- 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/Makefile b/Makefile index 1aad150

[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 --- Makefile | 2 +-

[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 --- git-add--interactive.perl | 21 - 1 file changed, 21 deletions(-) diff --git a/git-add--interactive.perl b/git-add--interactive.perl

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

2016-10-10 Thread Vasco Almeida
., wanting to change wording of one particular use case. Signed-off-by: Vasco Almeida --- git-add--interactive.perl | 45 ++--- 1 file changed, 34 insertions(+), 11 deletions(-) diff --git a/git-add--interactive.perl b/git-add--interactive.perl index 045b84

[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 --- 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 78eb59b..982c6c0 100755 --- a

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

2016-10-10 Thread Vasco Almeida
hose words but in this case we must 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 --- git-add--interactive.perl | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/git-ad

[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 --- git-send-email.perl | 52 ++-- 1 file changed, 30 insertions(+), 22 deletions(-) diff --git a/git-send-email.perl b/git-send-email.perl index da81be4

[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 --- git-send-email.perl | 90

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

2016-10-10 Thread Vasco Almeida
Signed-off-by: Vasco Almeida --- 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 @@ -22,6 +22,7 @@ use File::Path qw

[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 --- t/t1512-rev-parse-disambiguation.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/t/t1512

[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 --- 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 @@ static int try_threeway(struct

[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 --- 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 @@ int apply_all_patches(struct

[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 --- apply.c | 48 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/apply.c b/apply.c index 13b2064..8215874 100644 --- a

[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 --- 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/apply.c @@ -1586,8 +1586,8 @@ static

[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 --- convert.c | 12 t/t0020-crlf.sh | 6 +- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/convert.c b/convert.c index 077f5e6..0ad39b1 100644

[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 --- diff.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/diff.c b/diff.c index 1d304e0..1687317 100644 --- a/diff.c +++ b/diff.c

[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 --- 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 100644 --- a/credential-cache--daemon.c

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 writes: > > > > >   } else { > > - print "No untracked files.\n"; > > + print __("No untracked files.\n"); > >   } > > Not a big

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 writes: > > > > > @@ -669,12 +669,18 @@ sub status_cmd { > >  sub say_n_paths { > >   my $did = shift @_; > >   my $cnt = scalar @_; > > - print "$did "; > &g

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", &quo

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 @@

[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 --- git-add--interactive.perl | 76

[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 --- 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/Git.pm @@ -1438,6 +1438,29 @@ sub

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

2016-11-08 Thread Vasco Almeida
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 for

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

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

[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 --- git-add--interactive.perl | 54 --- 1 file changed, 46 insertions

[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 --- git-add--interactive.perl | 21 - 1 file changed, 21 deletions(-) diff --git a/git-add--interactive.perl b/git-add--interactive.perl

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

2016-11-08 Thread Vasco Almeida
Signed-off-by: Vasco Almeida --- 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 @@ -22,6 +22,7 @@ use File::Path

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

2016-11-08 Thread Vasco Almeida
delimited 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 --- git-add--interactive.perl | 8

[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 --- git-send-email.perl | 16 +--- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/git-send-email.

[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 --- git-send-email.perl | 52 ++-- 1 file changed, 30 insertions(+), 22 deletions(-) diff --git a/git-send-email.perl b/git-send-email.perl index da81be40c

  1   2   3   4   5   >