[PATCH 10/13] gettextize: git-checkout: our/their version message

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Split up the "does not have our/their version" message to make it
easier to translate.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@xxxxxxxxx>
---

I'm splitting this sort of thing into an if/else rather than:

    printf(foo ? _("bar") : _("blah"), ...)

because I think the alternative is harder to read.

 builtin/checkout.c |   14 ++++++++------
 1 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/builtin/checkout.c b/builtin/checkout.c
index 97bf2ec..a096e3d 100644
--- a/builtin/checkout.c
+++ b/builtin/checkout.c
@@ -103,9 +103,10 @@ static int check_stage(int stage, struct cache_entry *ce, int pos)
 			return 0;
 		pos++;
 	}
-	return error("path '%s' does not have %s version",
-		     ce->name,
-		     (stage == 2) ? "our" : "their");
+	if (stage == 2)
+		return error(_("path '%s' does not have our version"), ce->name);
+	else
+		return error(_("path '%s' does not have their version"), ce->name);
 }
 
 static int check_all_stages(struct cache_entry *ce, int pos)
@@ -130,9 +131,10 @@ static int checkout_stage(int stage, struct cache_entry *ce, int pos,
 			return checkout_entry(active_cache[pos], state, NULL);
 		pos++;
 	}
-	return error("path '%s' does not have %s version",
-		     ce->name,
-		     (stage == 2) ? "our" : "their");
+	if (stage == 2)
+		return error(_("path '%s' does not have our version"), ce->name);
+	else
+		return error(_("path '%s' does not have their version"), ce->name);
 }
 
 static int checkout_merged(int pos, struct checkout *state)
-- 
1.7.2.2.579.g2183d

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]