Re: [PATCH i18n 05/11] i18n: help: mark strings for translation
From: Jonathan Nieder <hidden>
Date: 2016-06-15 22:53:37
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.
[...]
quoted hunk ↗ jump to hunk
--- 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. [...]
quoted hunk ↗ jump to hunk
+++ b/git.c
[...]
quoted hunk ↗ jump to hunk
@@ -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