Re: [PATCH i18n 05/11] i18n: help: mark strings for translation
- From
Jonathan Nieder <jrnieder@gmail.com>
- Date
- Apr 18, 2012, 19:30 UTC
- Message-ID
- <20120418193006.GA30361@burratino>
- In-Reply-To
- <1334580603-11577-6-git-send-email-pclouds@gmail.com>
Nguyễn Thái Ngọc Duy wrote:
> This patch also marks most common commands' synopsis for translation > so that "git help" gives a friendly listing.
[...]
Show 8 quoted lines
> --- a/Makefile > +++ b/Makefile > @@ -2282,7 +2282,7 @@ XGETTEXT_FLAGS_C = $(XGETTEXT_FLAGS) --language=C \ > --keyword=_ --keyword=N_ --keyword="Q_:1,2" > XGETTEXT_FLAGS_SH = $(XGETTEXT_FLAGS) --language=Shell > XGETTEXT_FLAGS_PERL = $(XGETTEXT_FLAGS) --keyword=__ --language=Perl > -LOCALIZED_C := $(C_OBJ:o=c) > +LOCALIZED_C := $(C_OBJ:o=c) common-cmds.h
LOCALIZED_C probably ought to include
$(LIB_H) branch.h bundle.h bisect.h fetch-pack.h thread-utils.h send-pack.h shortlog.h reachable.h wt-status.h tar.h url.h walker.h $(XDIFF_H) $(VCSSVN_H)
too, just in case. This would involve moving the definitions of XDIFF_H and VCSSVN_H out of the ifndef USE_COMPUTED_HEADER_DEPENDENCIES block.
Sorry I missed this before.
[...]
> +++ b/git.c
[...]
Show 7 quoted lines
> @@ -389,6 +397,6 @@ const char *help_unknown_cmd(const char *cmd)
>
> int cmd_version(int argc, const char **argv, const char *prefix)
> {
> - printf("git version %s\n", git_version_string);
> + printf_ln(_("git version %s"), git_version_string);
> return 0;An odd one. I think it's probably best to leave it untranslated for the sake of i18n-unaware scripts. :(
Thanks, Jonathan