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

Bikeshedding advice on the ab/i18n-scripts series

From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Date
May 16, 2011, 16:03 UTC
Message-ID
<BANLkTi==pxyy7OeZT0mn33iJHrc5R7vHBw@mail.gmail.com>
On Wed, May 11, 2011 at 22:24, Junio C Hamano <gitster@pobox.com> wrote:
Show 6 quoted lines
> Will merge to "master" by the end of week #3.
>
> * ab/i18n-scripts (2011-05-08) 48 commits
>  - i18n: git-bisect bisect_next_check "You need to" message
>  - i18n: git-bisect [Y/n] messages
>  - i18n: git-bisect bisect_replay + $1 messages

I'm now mostly done solving all the bugs noted in this series, aside from the case insensitive env vars on win32 issue.

I know how to fix these, but some people may have issues with my style of doing so, so I'd like to ask in advance to save me extra work.

Basically for code like this:
        while [ $# -gt 0 ]; do
            arg="$1"
            case "$arg" in
            --)
                shift
                break
                ;;
            *)
                rev=$(git rev-parse -q --verify "$arg^{commit}") || {
                    test $has_double_dash -eq 1 &&
                        die "$(eval_gettext "'\$arg' does not appear
to be a valid revision")"
                    break
I was thinking of just doing:
    WHATEVER_arg=$arg
    die "$(eval_gettext "'\$WHATEVER_arg' does not appear to be a
valid revision")"
Where WHATEVER is a sufficiently unique prefix. E.g.:
    WINDOWS_ME_HARDER
    GIT_I18N_VARIABLE
    YOUR_MOM
    DUDE_WHERES_MY_POSIX_COMPLIANCE

I'll just pick one at my discretion (not necessarily from that list) unless someone has some strong preference. I don't care, I just don't want to re-send it over that.

I could also change all occurances of "arg" (including arg="$1" etc.) to WHATEVER_arg, but that seems like overkill, and would make the code hard to read, since you'd have WHATEVER all over the place.

Oh, and for all the convertion of:
    echo >&2 "$(gettext "foobar")"
I've already done:
    (
        gettext "foobar" &&
        echo
    ) >&2

Is that OK, or does someone have a strong preference (and wants me to waste time on converting it) for:

    gettext "foobar" >&2
    echo >&2
Or something else?
Your friendly neighborhood i18n maintainer.
Next: Jonathan Nieder
Message 1 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.