Subject: [PATCH v2] i18n: mark message helpers prefix for translation

From: "Dimitriy Ryazantcev via GitGitGadget" <[email-masked]>
Date: Tue, 21 Jun 2022 13:57:57 +0000

From: Dimitriy Ryazantcev <[email-masked]>

Some messages prefixes like 'usage:'/'fatal:'/'warning:'/'error:'
were not translated.

Signed-off-by: Dimiytriy Ryazantcev <[email-masked]>
---
    i18n: mark message helpers prefix for translation
    
    Some messages prefixes like 'usage:'/'fatal:'/'warning:'/'error:' were
    not translated.

Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-1279%2FDJm00n%2Fl10n-fixes-v2
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-1279/DJm00n/l10n-fixes-v2
Pull-Request: https://github.com/git/git/pull/1279

Range-diff vs v1:

 1:  efcf217b361 ! 1:  6f389468631 l10n: mark message helpers prefix for translation.
     @@ Metadata
      Author: Dimitriy Ryazantcev <[email-masked]>
      
       ## Commit message ##
     -    l10n: mark message helpers prefix for translation.
     +    i18n: mark message helpers prefix for translation
      
     -    Some messages prefixed like 'usage:'/'fatal:'/'warning:'/'error:'
     +    Some messages prefixes like 'usage:'/'fatal:'/'warning:'/'error:'
          were not translated.
      
          Signed-off-by: Dimiytriy Ryazantcev <[email-masked]>

 usage.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/usage.c b/usage.c
index 56e29d6cd6a..5a7c6c346c1 100644
--- a/usage.c
+++ b/usage.c
@@ -33,7 +33,7 @@ static void vreportf(const char *prefix, const char *err, va_list params)
 
 static NORETURN void usage_builtin(const char *err, va_list params)
 {
-	vreportf("usage: ", err, params);
+	vreportf(_("usage: "), err, params);
 
 	/*
 	 * When we detect a usage error *before* the command dispatch in
@@ -58,7 +58,7 @@ static NORETURN void usage_builtin(const char *err, va_list params)
 static void die_message_builtin(const char *err, va_list params)
 {
 	trace2_cmd_error_va(err, params);
-	vreportf("fatal: ", err, params);
+	vreportf(_("fatal: "), err, params);
 }
 
 /*
@@ -78,14 +78,14 @@ static void error_builtin(const char *err, va_list params)
 {
 	trace2_cmd_error_va(err, params);
 
-	vreportf("error: ", err, params);
+	vreportf(_("error: "), err, params);
 }
 
 static void warn_builtin(const char *warn, va_list params)
 {
 	trace2_cmd_error_va(warn, params);
 
-	vreportf("warning: ", warn, params);
+	vreportf(_("warning: "), warn, params);
 }
 
 static int die_is_recursing_builtin(void)

base-commit: 5b71c59bc3b9365075e2a175aa7b6f2b0c84ce44
-- 
gitgitgadget