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

Re: [PATCH] branch.c: simplify chain of if statements

From
Eric Sunshine <sunshine@sunshineco.com>
Date
Mar 17, 2014, 08:08 UTC
Message-ID
<CAPig+cTff4gDuUieqDkOxbFtk2vLX+fMgCFA_7ZHTMYK2rAuQA@mail.gmail.com>
In-Reply-To
<vpqsiqhz3sz.fsf@anie.imag.fr>

On Mon, Mar 17, 2014 at 3:23 AM, Matthieu Moy <Matthieu.Moy@grenoble-inp.fr> wrote:

Show 14 quoted lines
> Dragos Foianu <dragos.foianu@gmail.com> writes:
>
>> +     const char *verbose_prints[4] = {
>> +             "Branch %s set up to track remote branch %s from %s%s",
>> +             "Branch %s set up to track local branch %s%s",
>> +             "Branch %s set up to track remote ref %s%s",
>> +             "Branch %s set up to track local ref %s%s"
>> +     };
>> +     char *verbose_rebasing = rebasing ? " by rebasing." : ".";
>> +
>
> This seems to be a "lego construct" that makes translation harder: are
> you sure that the "by rebasing" will be at the end of the sentence in
> any languages?
Read this thread [1] for more details about why this approach is problematic.
[1]: http://thread.gmane.org/gmane.comp.version-control.git/243793/focus=243824
Show 9 quoted lines
> Also, this lacks the _() on verbose_rebasing, which isn't translatable
> anymore after your patch.
>
> I personnally think that the table-driven approach is wrong here, it
> makes the code shorter but much harder to read.
>
> --
> Matthieu Moy
> http://www-verimag.imag.fr/~moy/
Previous: Matthieu MoyNext: Eric Sunshine
Message 3 of 7 in “branch.c: simplify chain of if statements”
  1. branch.c: simplify chain of if statementsDragos Foianu, Mar 16, 2014
  2. Matthieu MoyMar 17, 2014
  3. Eric SunshineMar 17, 2014
  4. Eric SunshineMar 17, 2014
  5. Dragos FoianuMar 17, 2014
  6. Ævar Arnfjörð BjarmasonMar 17, 2014
  7. Eric SunshineMar 18, 2014

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.