git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "Philip Oakley" <philipoakley@iee.org>
To: "Simon Ruderich" <simon@ruderich.org>
Cc: "GitList" <git@vger.kernel.org>,
	"Junio C Hamano" <gitster@pobox.com>,
	"W. Trevor King" <wking@tremily.us>,
	"David Aguilar" <davvid@gmail.com>
Subject: Re: [PATCH] help: mark common_guides[] as translatable
Date: Fri, 12 Apr 2013 17:16:30 +0100	[thread overview]
Message-ID: <76E75C159EF54DD4A26051735FA370C8@PhilipOakley> (raw)
In-Reply-To: 20130412135142.GA29454@ruderich.org

From: "Simon Ruderich" <simon@ruderich.org>
Sent: Friday, April 12, 2013 2:51 PM
> Signed-off-by: Simon Ruderich <simon@ruderich.org>
> ---
> On Tue, Apr 02, 2013 at 11:39:51PM +0100, Philip Oakley wrote:
>> --- a/help.c
>> +++ b/help.c
>> @@ -240,6 +241,23 @@ void list_common_cmds_help(void)
>>  }
>>  }
>>
>> +void list_common_guides_help(void)
>> +{
>> + int i, longest = 0;
>> +
>> + for (i = 0; i < ARRAY_SIZE(common_guides); i++) {
>> + if (longest < strlen(common_guides[i].name))
>> + longest = strlen(common_guides[i].name);
>> + }
>> +
>> + puts(_("The common Git guides are:\n"));
>> + for (i = 0; i < ARRAY_SIZE(common_guides); i++) {
>> + printf("   %s   ", common_guides[i].name);
>> + mput_char(' ', longest - strlen(common_guides[i].name));
>> + puts(_(common_guides[i].help));
>
> common_guides[] is used here, but without N_() not picked up by
> xgettext when creating the pot file.

Yes. I mucked that up when I hacked the generate-cmdlist.sh to create 
this list.

Acked-by: Philip Oakley <philipoakley@iee.org>

At some point it is on my TODO list to extend the guide list mechanism 
to all the community generated guides (option -gg) by extending the 
command-list.txt file and the shell script.

>
> Regards
> Simon
>
> builtin/help.c | 14 +++++++-------
> 1 file changed, 7 insertions(+), 7 deletions(-)
>
> diff --git a/builtin/help.c b/builtin/help.c
> index 034c36c..062957f 100644
> --- a/builtin/help.c
> +++ b/builtin/help.c
> @@ -419,13 +419,13 @@ static struct {
>  const char *name;
>  const char *help;
> } common_guides[] = {
> - { "attributes", "Defining attributes per path" },
> - { "glossary", "A Git glossary" },
> - { "ignore", "Specifies intentionally untracked files to ignore" },
> - { "modules", "Defining submodule properties" },
> - { "revisions", "Specifying revisions and ranges for Git" },
> - { "tutorial", "A tutorial introduction to Git (for version 1.5.1 or 
> newer)" },
> - { "workflows", "An overview of recommended workflows with Git"},
> + { "attributes", N_("Defining attributes per path") },
> + { "glossary", N_("A Git glossary") },
> + { "ignore", N_("Specifies intentionally untracked files to 
> ignore") },
> + { "modules", N_("Defining submodule properties") },
> + { "revisions", N_("Specifying revisions and ranges for Git") },
> + { "tutorial", N_("A tutorial introduction to Git (for version 1.5.1 
> or newer)") },
> + { "workflows", N_("An overview of recommended workflows with 
> Git") },
> };
>
> static void list_common_guides_help(void)
> -- 
> 1.8.2.481.g0d034d4
>
> -- 
> + privacy is necessary
> + using gnupg http://gnupg.org
> + public key id: 0x92FEFDB7E44C32F9

  reply	other threads:[~2013-04-12 16:16 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-02 22:39 [PATCH V3 0/5] Git help option to list user guides Philip Oakley
2013-04-02 22:39 ` [PATCH V3 1/5] Show help: -a and -g option, and 'git help <concept>' usage Philip Oakley
2013-04-02 23:15   ` Junio C Hamano
2013-04-02 22:39 ` [PATCH V3 2/5] Help.c use OPT_BOOL and refactor logic Philip Oakley
2013-04-02 23:15   ` Junio C Hamano
2013-04-03  1:13     ` Junio C Hamano
2013-04-03 22:24       ` Philip Oakley
2013-04-02 22:39 ` [PATCH V3 3/5] Help.c add --guide option Philip Oakley
2013-04-02 22:39 ` [PATCH V3 4/5] Help.c: add list_common_guides_help() function Philip Oakley
2013-04-02 23:10   ` Junio C Hamano
2013-04-03  2:30   ` Eric Sunshine
2013-04-12 13:51   ` [PATCH] help: mark common_guides[] as translatable Simon Ruderich
2013-04-12 16:16     ` Philip Oakley [this message]
2013-04-02 22:39 ` [PATCH V3 5/5] Help doc: Include --guide option description Philip Oakley
2013-04-02 23:11   ` Junio C Hamano
2013-04-03  2:28   ` Eric Sunshine

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=76E75C159EF54DD4A26051735FA370C8@PhilipOakley \
    --to=philipoakley@iee.org \
    --cc=davvid@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=simon@ruderich.org \
    --cc=wking@tremily.us \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).