Re: [PATCH 04/72] gettextize: git-init basic messages

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

 



One more comment.  (The gettextization so far looks good to me.)

Ãvar ArnfjÃrà Bjarmason wrote:

> --- a/builtin/init-db.c
> +++ b/builtin/init-db.c
> @@ -31,7 +31,7 @@ static void safe_create_dir(const char *dir, int share)
>  		}
>  	}
>  	else if (share && adjust_shared_perm(dir))
> -		die("Could not make %s writable by group", dir);
> +		die(_("Could not make %s writable by group"), dir);

Hmm, forgot to include something like the following in the reply to
patch 1.

> @@ -346,7 +346,7 @@ int init_db(const char *template_dir, unsigned int flags)
>  		else if (shared_repository == PERM_EVERYBODY)
>  			sprintf(buf, "%d", OLD_PERM_EVERYBODY);
>  		else
> -			die("oops");
> +			die(_("oops"));

(Not related to this series, but that seems like a pretty unhelpful
error message.)
---
 gettext.h |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/gettext.h b/gettext.h
index 2f806cb..2bd70d4 100644
--- a/gettext.h
+++ b/gettext.h
@@ -5,6 +5,8 @@
 #error "namespace conflict: _ is pre-defined?"
 #endif
 
+#define FORMAT_PRESERVING(n) __attribute__((format_arg(n)))
+
 /*
  * Copyright (c) 2010 Ãvar ArnfjÃrà Bjarmason
  *
@@ -13,7 +15,7 @@
  * a future patch series.
  */
 
-static inline const char *_(const char *msgid)
+static inline FORMAT_PRESERVING(1) const char *_(const char *msgid)
 {
 	return msgid;
 }
-- 
1.7.4.1

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