Re: [PATCH] apply: remove lego in i18n string in gitdiff_verify_name
- From
Junio C Hamano <gitster@pobox.com>
- Date
- May 8, 2012, 17:07 UTC
- Message-ID
- <7vd36ewqi2.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <1336484307-31553-1-git-send-email-pclouds@gmail.com>
Nguyễn Thái Ngọc Duy <pclouds@gmail.com> writes:
Show 5 quoted lines
> Currently it marks the string "...inconsistent %s filename..." where > %s is either "old" or "new" from caller. From a translator point of > view, nothing hints what "%s" may be. Make it two strings > "...inconsistent new filename..." and "...inconsistent old > filename..."
True. Also depending on 'old' vs 'new', the translation of "filename" or other parts of the message may have to inflect/conjugate, so the original message structure was very unfriendly to i18n.
Show 9 quoted lines
> + if (!another || memcmp(another, name, len + 1)) {
> + if (!strcmp(oldnew, "old"))
> + die(_("git apply: bad git-diff - inconsistent old filename on line %d"), linenr);
> + else if (!strcmp(oldnew, "new"))
> + die(_("git apply: bad git-diff - inconsistent new filename on line %d"), linenr);
> + else
> + die("BUG: please add a new full string for '%s' similar to above code.\n"
> + "It makes translators' life much simpler. Thanks!", oldnew);
> + }I think this is way over-engineered. enum { DIFF_OLD = 0, DIFF_NEW = 1 } or even passing 'n' vs 'o' was what I was expecting to see.