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

Re: [PATCH 2/2] request-pull: mark translatable strings

From
Đoàn Trần Công Danh <congdanhqx@gmail.com>
Date
Sep 16, 2021, 13:44 UTC
Message-ID
<YUNKIj44AlW0tkXk@danh.dev>
In-Reply-To
<20210916113516.76445-3-bagasdotme@gmail.com>
Beside the problems pointed out by Ævar:
On 2021-09-16 18:35:17+0700, Bagas Sanjaya <bagasdotme@gmail.com> wrote:
> Mark user-faced strings as translatable (including PR message output).
I would argue request-pull message shouldn't be translated.

The person who creates the request may prefer to use a different language, let's say French, for day-to-day work.

However, the recipients may not understand French, and prefer to receive English message.

And this change break their workflow badly.
Show 13 quoted lines
> @@ -138,19 +138,22 @@ fi
>  
>  url=$(git ls-remote --get-url "$url")
>  
> -git show -s --format='The following changes since commit %H:
> +git show -s --format="
> +$(gettext 'The following changes since commit %H:
>  
>    %s (%ci)
>  
>  are available in the Git repository at:
> -' $merge_base &&
> +')
Hence, I think this message shouldn't be translated.
Show 8 quoted lines
> +" $merge_base &&
>  echo "  $url $pretty_remote" &&
> -git show -s --format='
> +git show -s --format="
> +$(gettext '
>  for you to fetch changes up to %H:
>  
>    %s (%ci)
And neither should this message.
Show 15 quoted lines
>  
> -----------------------------------------------------------------' $headrev &&
> +----------------------------------------------------------------')" $headrev &&
>  
>  if test $(git cat-file -t "$head") = tag
>  then
> @@ -162,7 +165,7 @@ fi &&
>  
>  if test -n "$branch_name"
>  then
> -	echo "(from the branch description for $branch_name local branch)"
> +	echo "$(eval_gettext "(from the branch description for \$branch_name local branch)")"
>  	echo
>  	git config "branch.$branch_name.description"
>  	echo "----------------------------------------------------------------"
Ditto.
-- 
Danh
Previous: Ævar Arnfjörð BjarmasonNext: Junio C Hamano
Message 6 of 10 in “git-request-pull i18n”
  1. 0/2 git-request-pull i18nBagas Sanjaya, Sep 16, 2021
  2. 1/2 request-pull: simplify "remote or HEAD" variable in warning messagesBagas Sanjaya, Sep 16, 2021
  3. Paolo BonziniSep 16, 2021
  4. 2/2 request-pull: mark translatable stringsBagas Sanjaya, Sep 16, 2021
  5. Ævar Arnfjörð BjarmasonSep 16, 2021
  6. Đoàn Trần Công DanhSep 16, 2021
  7. Junio C HamanoSep 16, 2021
  8. Bagas SanjayaSep 17, 2021
  9. Junio C HamanoSep 17, 2021
  10. Miklos VajnaSep 17, 2021

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.