git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] i18n: apply: split to fix a partial i18n message
@ 2012-05-31 11:20 Jiang Xin
  2012-05-31 13:04 ` Nguyễn Thái Ngọc Duy
  0 siblings, 1 reply; 17+ messages in thread
From: Jiang Xin @ 2012-05-31 11:20 UTC (permalink / raw)
  To: Junio C Hamano
  Cc: Git List, Ævar Arnfjörð Bjarmason,
	Nguyễn Thái Ngọc Duy, Jonathan Nieder, Jiang Xin

The 4th arg of "new mode (%o) of %s does not match old mode (%o)%s%s"
is blank string or string " of ". Even mark the string " of " for a
complete i18n, this message is still hard to translate right.

Split it into two slight different messages would make l10n teams happy.

Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
---
 builtin/apply.c | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)

diff --git a/builtin/apply.c b/builtin/apply.c
index dda9ea0..b4428ea 100644
--- a/builtin/apply.c
+++ b/builtin/apply.c
@@ -3262,10 +3262,18 @@ static int check_patch(struct patch *patch)
 		int same = !strcmp(old_name, new_name);
 		if (!patch->new_mode)
 			patch->new_mode = patch->old_mode;
-		if ((patch->old_mode ^ patch->new_mode) & S_IFMT)
-			return error(_("new mode (%o) of %s does not match old mode (%o)%s%s"),
-				patch->new_mode, new_name, patch->old_mode,
-				same ? "" : " of ", same ? "" : old_name);
+		if ((patch->old_mode ^ patch->new_mode) & S_IFMT) {
+			if (same)
+				return error(_("new mode (%o) of %s does not "
+					       "match old mode (%o)"),
+					patch->new_mode, new_name,
+					patch->old_mode);
+			else
+				return error(_("new mode (%o) of %s does not "
+					       "match old mode (%o) of %s"),
+					patch->new_mode, new_name,
+					patch->old_mode, old_name);
+		}
 	}
 
 	if (apply_data(patch, &st, ce) < 0)
-- 
1.7.10.2.559.g0ba0f00

^ permalink raw reply related	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2012-05-31 20:31 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-31 11:20 [PATCH] i18n: apply: split to fix a partial i18n message Jiang Xin
2012-05-31 13:04 ` Nguyễn Thái Ngọc Duy
2012-05-31 13:04   ` [PATCH 1/6] Remove i18n legos in notifying new branch tracking setup Nguyễn Thái Ngọc Duy
2012-05-31 14:00     ` Jonathan Nieder
2012-05-31 13:04   ` [PATCH 2/6] reflog: remove i18n legos in pruning message Nguyễn Thái Ngọc Duy
2012-05-31 13:45     ` Jonathan Nieder
2012-05-31 14:00       ` Nguyen Thai Ngoc Duy
2012-05-31 14:10         ` Jonathan Nieder
2012-05-31 14:18           ` Nguyen Thai Ngoc Duy
2012-05-31 17:56       ` Junio C Hamano
2012-05-31 20:31         ` Jonathan Nieder
2012-05-31 13:04   ` [PATCH 3/6] merge-recursive: remove i18n legos in conflict messages Nguyễn Thái Ngọc Duy
2012-05-31 13:52     ` Jonathan Nieder
2012-05-31 13:56       ` Nguyen Thai Ngoc Duy
2012-05-31 13:04   ` [PATCH 4/6] notes-merge: remove i18n legos in merge result message Nguyễn Thái Ngọc Duy
2012-05-31 13:04   ` [PATCH 5/6] rerere: remove i18n legos in " Nguyễn Thái Ngọc Duy
2012-05-31 13:04   ` [PATCH 6/6] unpack-trees: remove i18n legos in unpack's porcelain error messages Nguyễn Thái Ngọc Duy

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 NNTP newsgroup(s).