From 1a07e59c3e269418f3f5d186d166bf5ab5db6667 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nguy=E1=BB=85n=20Th=C3=A1i=20Ng=E1=BB=8Dc=20Duy?= Date: Sat, 21 Jul 2018 09:49:19 +0200 Subject: Update messages in preparation for i18n MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Many messages will be marked for translation in the following commits. This commit updates some of them to be more consistent and reduce diff noise in those commits. Changes are - keep the first letter of die(), error() and warning() in lowercase - no full stop in die(), error() or warning() if it's single sentence messages - indentation - some messages are turned to BUG(), or prefixed with "BUG:" and will not be marked for i18n - some messages are improved to give more information - some messages are broken down by sentence to be i18n friendly (on the same token, combine multiple warning() into one big string) - the trailing \n is converted to printf_ln if possible, or deleted if not redundant - errno_errno() is used instead of explicit strerror() Signed-off-by: Nguyễn Thái Ngọc Duy Signed-off-by: Junio C Hamano --- convert.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'convert.c') diff --git a/convert.c b/convert.c index 64d0d30e08..f47e60022e 100644 --- a/convert.c +++ b/convert.c @@ -190,7 +190,7 @@ static enum eol output_eol(enum crlf_action crlf_action) /* fall through */ return text_eol_is_crlf() ? EOL_CRLF : EOL_LF; } - warning("Illegal crlf_action %d\n", (int)crlf_action); + warning("illegal crlf_action %d", (int)crlf_action); return core_eol; } @@ -203,7 +203,7 @@ static void check_global_conv_flags_eol(const char *path, enum crlf_action crlf_ * CRLFs would not be restored by checkout */ if (conv_flags & CONV_EOL_RNDTRP_DIE) - die(_("CRLF would be replaced by LF in %s."), path); + die(_("CRLF would be replaced by LF in %s"), path); else if (conv_flags & CONV_EOL_RNDTRP_WARN) warning(_("CRLF will be replaced by LF in %s.\n" "The file will have its original line" @@ -493,7 +493,7 @@ static int encode_to_worktree(const char *path, const char *src, size_t src_len, &dst_len); if (!dst) { error("failed to encode '%s' from %s to %s", - path, default_encoding, enc); + path, default_encoding, enc); return 0; } -- cgit v1.2.3