git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

Previous: Nguyễn Thái Ngọc DuyNext: Nguyễn Thái Ngọc Duy
Message 11 of 21 in “Mark more strings for translation”
  1. 00/11 Mark more strings for translationNguyễn Thái Ngọc Duy, Apr 16, 2012
  2. 01/11 Add three convenient format printing functions with \n automatically appendedNguyễn Thái Ngọc Duy, Apr 16, 2012
  3. Jonathan NiederApr 16, 2012
  4. Erik Faye-LundApr 17, 2012
  5. 02/11 i18n: mark relative dates for translationNguyễn Thái Ngọc Duy, Apr 16, 2012
  6. 03/11 i18n: parseopt: lookup help and argument translations when showing usageNguyễn Thái Ngọc Duy, Apr 16, 2012
  7. Jonathan NiederApr 16, 2012
  8. Jonathan NiederApr 16, 2012
  9. 04/11 i18n: help: mark parseopt strings for translationNguyễn Thái Ngọc Duy, Apr 16, 2012
  10. 05/11 i18n: help: mark strings for translationNguyễn Thái Ngọc Duy, Apr 16, 2012
  11. Jonathan NiederApr 18, 2012
  12. 06/11 i18n: make warn_dangling_symref() automatically append \nNguyễn Thái Ngọc Duy, Apr 16, 2012
  13. 07/11 i18n: remote: mark strings for translationNguyễn Thái Ngọc Duy, Apr 16, 2012
  14. 08/11 i18n: apply: mark strings for translationNguyễn Thái Ngọc Duy, Apr 16, 2012
  15. 09/11 i18n: apply: update say_patch_name to give translators complete sentenceNguyễn Thái Ngọc Duy, Apr 16, 2012
  16. Zbigniew Jędrzejewski-SzmekApr 22, 2012
  17. Nguyen Thai Ngoc DuyApr 23, 2012
  18. 10/11 i18n: index-pack: mark strings for translationNguyễn Thái Ngọc Duy, Apr 16, 2012
  19. 11/11 i18n: bundle: mark strings for translationNguyễn Thái Ngọc Duy, Apr 16, 2012
  20. Jonathan NiederApr 18, 2012
  21. Nguyen Thai Ngoc DuyApr 22, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.