From: Jonathan Nieder Date: Tue, 16 Apr 2013 02:40:21 GMT Subject: Re: [PATCH v2] i18n: branch: mark strings for translation Message-ID: <20130416024021.GG3262@elie.Belkin> In-Reply-To: Jiang Xin wrote: > --- a/branch.c > +++ b/branch.c [...] > @@ -79,23 +79,23 @@ void install_branch_config(int flag, const char *local, const char *origin, cons > if (flag & BRANCH_CONFIG_VERBOSE) { > if (remote_is_branch && origin) > printf(rebasing ? > - "Branch %s set up to track remote branch %s from %s by rebasing.\n" : > - "Branch %s set up to track remote branch %s from %s.\n", > + _("Branch %s set up to track remote branch %s from %s by rebasing.\n") : > + _("Branch %s set up to track remote branch %s from %s.\n"), Micronit: it would be nicer to use printf_ln to save translators the trouble of worrying about the final newline. With that change, Reviewed-by: Jonathan Nieder Thanks. Here's a patch making that change for squashing in. diff --git i/branch.c w/branch.c index 4ddd69f3..c67b97d1 100644 --- i/branch.c +++ w/branch.c @@ -78,24 +78,24 @@ void install_branch_config(int flag, const char *local, const char *origin, cons if (flag & BRANCH_CONFIG_VERBOSE) { if (remote_is_branch && origin) - printf(rebasing ? - _("Branch %s set up to track remote branch %s from %s by rebasing.\n") : - _("Branch %s set up to track remote branch %s from %s.\n"), + printf_ln(rebasing ? + _("Branch %s set up to track remote branch %s from %s by rebasing.") : + _("Branch %s set up to track remote branch %s from %s."), local, shortname, origin); else if (remote_is_branch && !origin) - printf(rebasing ? - _("Branch %s set up to track local branch %s by rebasing.\n") : - _("Branch %s set up to track local branch %s.\n"), + printf_ln(rebasing ? + _("Branch %s set up to track local branch %s by rebasing.") : + _("Branch %s set up to track local branch %s."), local, shortname); else if (!remote_is_branch && origin) - printf(rebasing ? - _("Branch %s set up to track remote ref %s by rebasing.\n") : - _("Branch %s set up to track remote ref %s.\n"), + printf_ln(rebasing ? + _("Branch %s set up to track remote ref %s by rebasing.") : + _("Branch %s set up to track remote ref %s."), local, remote); else if (!remote_is_branch && !origin) - printf(rebasing ? - _("Branch %s set up to track local ref %s by rebasing.\n") : - _("Branch %s set up to track local ref %s.\n"), + printf_ln(rebasing ? + _("Branch %s set up to track local ref %s by rebasing.") : + _("Branch %s set up to track local ref %s."), local, remote); else die("BUG: impossible combination of %d and %p",