Re: [PATCH] apply: remove lego in i18n string in gitdiff_verify_name
- From
Junio C Hamano <gitster@pobox.com>
- Date
- May 7, 2012, 18:00 UTC
- Message-ID
- <7vwr4n6fcj.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <1336310002-3769-1-git-send-email-pclouds@gmail.com>
Nguyễn Thái Ngọc Duy <pclouds@gmail.com> writes:
Show 29 quoted lines
> Currently it marks the string "...inconsistent %s filename..." where
> %s is either "old" or "new" from caller. Make it two strings
> "...inconsistent new filename..." and "...inconsistent old filename..."
>
> Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
> ---
> On Thu, Apr 26, 2012 at 5:50 AM, Junio C Hamano <gitster@pobox.com> wrote:
> > In this function, the parameter oldnew has "old" or "new" and the
> > callers (gitdiff_oldname() and gitdiff_newname()) do not have it marked
> > for translation. Even if they did, it would result in a lego
> > composition, so you may have to switch between two translatable messages
> > here.
>
> Makes sense.
>
> builtin/apply.c | 10 ++++++----
> 1 files changed, 6 insertions(+), 4 deletions(-)
>
> diff --git a/builtin/apply.c b/builtin/apply.c
> index 725712d..1edd3f7 100644
> --- a/builtin/apply.c
> +++ b/builtin/apply.c
> @@ -919,7 +919,7 @@ static int gitdiff_hdrend(const char *line, struct patch *patch)
> * their names against any previous information, just
> * to make sure..
> */
> -static char *gitdiff_verify_name(const char *line, int isnull, char *orig_name, const char *oldnew)
> +static char *gitdiff_verify_name(const char *line, int isnull, char *orig_name, int new)
> {This change is unwarranted, though. The callers were much clearer when they passed "old" vs "new"; now they pass an unexplained 0 vs 1.