summaryrefslogtreecommitdiffstats
path: root/advice.c
diff options
context:
space:
mode:
authorVasco Almeida <vascomalmeida@sapo.pt>2016-06-17 20:20:52 +0000
committerJunio C Hamano <gitster@pobox.com>2016-06-17 15:45:48 -0700
commit8785c425320e9288d13f0218e591a8aa5c57479c (patch)
tree355547c164734faa4e47f834f62972c5cc097fa0 /advice.c
parente9f3cec494330a86a412adaee95360ddea6fcf54 (diff)
downloadgit-8785c425320e9288d13f0218e591a8aa5c57479c.tar.gz
git-8785c425320e9288d13f0218e591a8aa5c57479c.tar.xz
i18n: advice: internationalize message for conflicts
Mark message for translation telling the user she has conflicts to resolve. Expose each particular use case, in order to enable translating entire sentences which would facilitate translating into other languages. Change "Pull" to lowercase to match other instances. Update test t5520-pull.sh, that relied on the old error message, to use the new one. Although we loose in source code conciseness, we would gain better translations because translators can 1) translate the entire sentence, including those terms concerning Git (committing, merging, etc) 2) have leeway to adapt to their languages. Signed-off-by: Vasco Almeida <vascomalmeida@sapo.pt> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'advice.c')
-rw-r--r--advice.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/advice.c b/advice.c
index cb445a7e9..b84ae4960 100644
--- a/advice.c
+++ b/advice.c
@@ -79,7 +79,20 @@ int git_default_advice_config(const char *var, const char *value)
int error_resolve_conflict(const char *me)
{
- error("%s is not possible because you have unmerged files.", me);
+ if (!strcmp(me, "cherry-pick"))
+ error(_("Cherry-picking is not possible because you have unmerged files."));
+ else if (!strcmp(me, "commit"))
+ error(_("Committing is not possible because you have unmerged files."));
+ else if (!strcmp(me, "merge"))
+ error(_("Merging is not possible because you have unmerged files."));
+ else if (!strcmp(me, "pull"))
+ error(_("Pulling is not possible because you have unmerged files."));
+ else if (!strcmp(me, "revert"))
+ error(_("Reverting is not possible because you have unmerged files."));
+ else
+ error(_("It is not possible to %s because you have unmerged files."),
+ me);
+
if (advice_resolve_conflict)
/*
* Message used both when 'git commit' fails and when
@@ -93,7 +106,7 @@ int error_resolve_conflict(const char *me)
void NORETURN die_resolve_conflict(const char *me)
{
error_resolve_conflict(me);
- die("Exiting because of an unresolved conflict.");
+ die(_("Exiting because of an unresolved conflict."));
}
void NORETURN die_conclude_merge(void)