All of lore.kernel.org
 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; 8+ 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] 8+ messages in thread

end of thread, other threads:[~2012-06-07 18:44 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <0001-Remove-i18n-legos-in-notifying-new-branch-tracking-s.patch>
2012-06-07 12:05 ` [PATCH 1/6] Remove i18n legos in notifying new branch tracking setup Nguyễn Thái Ngọc Duy
2012-06-07 12:05   ` [PATCH 2/6] reflog: remove i18n legos in pruning message Nguyễn Thái Ngọc Duy
2012-06-07 12:05   ` [PATCH 3/6] merge-recursive: remove i18n legos in conflict messages Nguyễn Thái Ngọc Duy
2012-06-07 12:05   ` [PATCH 4/6] notes-merge: remove i18n legos in merge result message Nguyễn Thái Ngọc Duy
2012-06-07 12:05   ` [PATCH 5/6] rerere: remove i18n legos in " Nguyễn Thái Ngọc Duy
2012-06-07 12:05   ` [PATCH 6/6] unpack-trees: remove i18n legos in unpack's porcelain error messages Nguyễn Thái Ngọc Duy
2012-06-07 18:44   ` [PATCH 1/6] Remove i18n legos in notifying new branch tracking setup Junio C Hamano
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 5/6] rerere: remove i18n legos in result message Nguyễn Thái Ngọc Duy

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.