Re: [PATCH] apply: remove lego in i18n string in gitdiff_verify_name

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Nguyễn Thái Ngọc Duy  <pclouds@xxxxxxxxx> writes:

> 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.

> +		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.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]