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

Re: Bikeshedding advice on the ab/i18n-scripts series

From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Date
May 16, 2011, 21:32 UTC
Message-ID
<BANLkTi=FLWFzMFG5DgQiaN9kYW3pozJ6HQ@mail.gmail.com>
In-Reply-To
<20110516212641.GB15150@elie>
On Mon, May 16, 2011 at 23:26, Jonathan Nieder <jrnieder@gmail.com> wrote:
Show 7 quoted lines
> Ævar Arnfjörð Bjarmason wrote:
>
>> That would require us to start extracting strings from all "say"
>> functions. The reason we have only "gettext" and "eval_gettext" is so
>> xgettext can extract them.
>
> Isn't that what the xgettext -k parameter is for?

I'm not saying we can't use xgettext to extract these things. I'm saying I don't think it's a good idea.

    $ git --no-pager grep say git-submodule.sh
    git-submodule.sh:                       say "$(eval_gettext
"Entering '\$prefix\$path'")"
    git-submodule.sh:               say "$(eval_gettext "Submodule
'\$name' (\$url) registered for path '\$path'")"
    git-submodule.sh:                       say "$(eval_gettext
"Submodule path '\$path' not initialized
    git-submodule.sh:
say_msg="$(eval_gettext "Submodule path '\$path': rebased into
'\$sha1'")"
    git-submodule.sh:
say_msg="$(eval_gettext "Submodule path '\$path': merged in
'\$sha1'")"
    git-submodule.sh:
say_msg="$(eval_gettext "Submodule path '\$path': checked out
'\$sha1'")"
    git-submodule.sh:                       say $say_msg
    git-submodule.sh:                       say "U$sha1 $displaypath"
    git-submodule.sh:                       say "-$sha1 $displaypath"
    git-submodule.sh:                       say " $sha1 $displaypath$revname"
    git-submodule.sh:                       say "+$sha1 $displaypath$revname"
    git-submodule.sh:               say "$(eval_gettext "Synchronizing
submodule url for '\$name'")"

I want to mark *some* of these *manually* as translatable, I don't want to go and extract strings from all invocations to functions like printf & die, instead I want to add a printf(_()) wrapper to everything.

Previous: Jonathan NiederNext: Junio C Hamano
Message 8 of 9 in “Bikeshedding advice on the ab/i18n-scripts series”
  1. Ævar Arnfjörð BjarmasonMay 16, 2011
  2. Jonathan NiederMay 16, 2011
  3. Junio C HamanoMay 16, 2011
  4. Ævar Arnfjörð BjarmasonMay 16, 2011
  5. Junio C HamanoMay 16, 2011
  6. Ævar Arnfjörð BjarmasonMay 16, 2011
  7. Jonathan NiederMay 16, 2011
  8. Ævar Arnfjörð BjarmasonMay 16, 2011
  9. Junio C HamanoMay 16, 2011

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.