* [PATCH 1/4] i18n: apply: mark error message for translation
@ 2016-10-17 13:15 Vasco Almeida
2016-10-17 13:15 ` [PATCH 2/4] i18n: convert mark error messages " Vasco Almeida
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Vasco Almeida @ 2016-10-17 13:15 UTC (permalink / raw)
To: git
Cc: Vasco Almeida, Jiang Xin, Ævar Arnfjörð Bjarmason,
Jean-Noël AVILA
Update test to reflect changes.
Signed-off-by: Vasco Almeida <vascomalmeida@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/apply.c
@@ -1586,8 +1586,8 @@ static int find_header(struct apply_state *state,
patch->new_name = xstrdup(patch->def_name);
}
if (!patch->is_delete && !patch->new_name) {
- error("git diff header lacks filename information "
- "(line %d)", state->linenr);
+ error(_("git diff header lacks filename information "
+ "(line %d)"), state->linenr);
return -128;
}
patch->is_toplevel_relative = 1;
diff --git a/t/t4254-am-corrupt.sh b/t/t4254-am-corrupt.sh
index 9bd7dd2..168739c 100755
--- a/t/t4254-am-corrupt.sh
+++ b/t/t4254-am-corrupt.sh
@@ -31,7 +31,7 @@ test_expect_success 'try to apply corrupted patch' '
test_expect_success 'compare diagnostic; ensure file is still here' '
echo "error: git diff header lacks filename information (line 4)" >expected &&
test_path_is_file f &&
- test_cmp expected actual
+ test_i18ncmp expected actual
'
test_done
--
2.10.1.459.g5fd885d
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/4] i18n: convert mark error messages for translation
2016-10-17 13:15 [PATCH 1/4] i18n: apply: mark error message for translation Vasco Almeida
@ 2016-10-17 13:15 ` Vasco Almeida
2016-10-17 13:15 ` [PATCH 3/4] i18n: credential-cache--daemon: mark advice " Vasco Almeida
2016-10-17 13:15 ` [PATCH 4/4] i18n: diff: mark warnings " Vasco Almeida
2 siblings, 0 replies; 4+ messages in thread
From: Vasco Almeida @ 2016-10-17 13:15 UTC (permalink / raw)
To: git
Cc: Vasco Almeida, Jiang Xin, Ævar Arnfjörð Bjarmason,
Jean-Noël AVILA
Mark error messages about CRLF for translation.
Update test to reflect changes.
Signed-off-by: Vasco Almeida <vascomalmeida@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
index 077f5e6..0ad39b1 100644
--- a/convert.c
+++ b/convert.c
@@ -197,17 +197,21 @@ static void check_safe_crlf(const char *path, enum crlf_action crlf_action,
* CRLFs would not be restored by checkout
*/
if (checksafe == SAFE_CRLF_WARN)
- warning("CRLF will be replaced by LF in %s.\nThe file will have its original line endings in your working directory.", path);
+ warning(_("CRLF will be replaced by LF in %s.\n"
+ "The file will have its original line"
+ " endings in your working directory."), path);
else /* i.e. SAFE_CRLF_FAIL */
- die("CRLF would be replaced by LF in %s.", path);
+ die(_("CRLF would be replaced by LF in %s."), path);
} else if (old_stats->lonelf && !new_stats->lonelf ) {
/*
* CRLFs would be added by checkout
*/
if (checksafe == SAFE_CRLF_WARN)
- warning("LF will be replaced by CRLF in %s.\nThe file will have its original line endings in your working directory.", path);
+ warning(_("LF will be replaced by CRLF in %s.\n"
+ "The file will have its original line"
+ " endings in your working directory."), path);
else /* i.e. SAFE_CRLF_FAIL */
- die("LF would be replaced by CRLF in %s", path);
+ die(_("LF would be replaced by CRLF in %s"), path);
}
}
diff --git a/t/t0020-crlf.sh b/t/t0020-crlf.sh
index f94120a..71350e0 100755
--- a/t/t0020-crlf.sh
+++ b/t/t0020-crlf.sh
@@ -83,7 +83,11 @@ test_expect_success 'safecrlf: print warning only once' '
git add doublewarn &&
git commit -m "nowarn" &&
for w in Oh here is CRLFQ in text; do echo $w; done | q_to_cr >doublewarn &&
- test $(git add doublewarn 2>&1 | grep "CRLF will be replaced by LF" | wc -l) = 1
+ git add doublewarn 2>err &&
+ if test_have_prereq C_LOCALE_OUTPUT
+ then
+ test $(grep "CRLF will be replaced by LF" err | wc -l) = 1
+ fi
'
--
2.10.1.459.g5fd885d
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 3/4] i18n: credential-cache--daemon: mark advice for translation
2016-10-17 13:15 [PATCH 1/4] i18n: apply: mark error message for translation Vasco Almeida
2016-10-17 13:15 ` [PATCH 2/4] i18n: convert mark error messages " Vasco Almeida
@ 2016-10-17 13:15 ` Vasco Almeida
2016-10-17 13:15 ` [PATCH 4/4] i18n: diff: mark warnings " Vasco Almeida
2 siblings, 0 replies; 4+ messages in thread
From: Vasco Almeida @ 2016-10-17 13:15 UTC (permalink / raw)
To: git
Cc: Vasco Almeida, Jiang Xin, Ævar Arnfjörð Bjarmason,
Jean-Noël AVILA
Mark permissions_advice for translation.
Signed-off-by: Vasco Almeida <vascomalmeida@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 100644
--- a/credential-cache--daemon.c
+++ b/credential-cache--daemon.c
@@ -219,11 +219,11 @@ static void serve_cache(const char *socket_path, int debug)
close(fd);
}
-static const char permissions_advice[] =
+static const char permissions_advice[] = N_(
"The permissions on your socket directory are too loose; other\n"
"users may be able to read your cached credentials. Consider running:\n"
"\n"
-" chmod 0700 %s";
+" chmod 0700 %s");
static void init_socket_directory(const char *path)
{
struct stat st;
@@ -232,7 +232,7 @@ static void init_socket_directory(const char *path)
if (!stat(dir, &st)) {
if (st.st_mode & 077)
- die(permissions_advice, dir);
+ die(_(permissions_advice), dir);
} else {
/*
* We must be sure to create the directory with the correct mode,
--
2.10.1.459.g5fd885d
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 4/4] i18n: diff: mark warnings for translation
2016-10-17 13:15 [PATCH 1/4] i18n: apply: mark error message for translation Vasco Almeida
2016-10-17 13:15 ` [PATCH 2/4] i18n: convert mark error messages " Vasco Almeida
2016-10-17 13:15 ` [PATCH 3/4] i18n: credential-cache--daemon: mark advice " Vasco Almeida
@ 2016-10-17 13:15 ` Vasco Almeida
2 siblings, 0 replies; 4+ messages in thread
From: Vasco Almeida @ 2016-10-17 13:15 UTC (permalink / raw)
To: git
Cc: Vasco Almeida, Jiang Xin, Ævar Arnfjörð Bjarmason,
Jean-Noël AVILA
Mark rename_limit_warning and degrade_cc_to_c_warning and
rename_limit_warning for translation.
Signed-off-by: Vasco Almeida <vascomalmeida@sapo.pt>
---
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
@@ -4638,25 +4638,25 @@ static int is_summary_empty(const struct diff_queue_struct *q)
}
static const char rename_limit_warning[] =
-"inexact rename detection was skipped due to too many files.";
+N_("inexact rename detection was skipped due to too many files.");
static const char degrade_cc_to_c_warning[] =
-"only found copies from modified paths due to too many files.";
+N_("only found copies from modified paths due to too many files.");
static const char rename_limit_advice[] =
-"you may want to set your %s variable to at least "
-"%d and retry the command.";
+N_("you may want to set your %s variable to at least "
+ "%d and retry the command.");
void diff_warn_rename_limit(const char *varname, int needed, int degraded_cc)
{
if (degraded_cc)
- warning(degrade_cc_to_c_warning);
+ warning(_(degrade_cc_to_c_warning));
else if (needed)
- warning(rename_limit_warning);
+ warning(_(rename_limit_warning));
else
return;
if (0 < needed && needed < 32767)
- warning(rename_limit_advice, varname, needed);
+ warning(_(rename_limit_advice), varname, needed);
}
void diff_flush(struct diff_options *options)
--
2.10.1.459.g5fd885d
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-10-17 13:18 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-17 13:15 [PATCH 1/4] i18n: apply: mark error message for translation Vasco Almeida
2016-10-17 13:15 ` [PATCH 2/4] i18n: convert mark error messages " Vasco Almeida
2016-10-17 13:15 ` [PATCH 3/4] i18n: credential-cache--daemon: mark advice " Vasco Almeida
2016-10-17 13:15 ` [PATCH 4/4] i18n: diff: mark warnings " Vasco Almeida
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).