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

Re: [PATCH 06/25] gettextize: git-fetch formatting messages

From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Date
Sep 2, 2010, 20:13 UTC
Message-ID
<AANLkTi=K5-BtqtXSkiJ=BGa7hs4AEp-DtJm2_bUhctyi@mail.gmail.com>
In-Reply-To
<20100902195936.GA2531@burratino>
On Thu, Sep 2, 2010 at 19:59, Jonathan Nieder <jrnieder@gmail.com> wrote:
Show 17 quoted lines
> (+cc: some fetch ui authors, just as a heads up)
>
> Ævar Arnfjörð Bjarmason wrote:
>
>> --- a/builtin/fetch.c
>> +++ b/builtin/fetch.c
>> @@ -236,7 +236,7 @@ static int update_local_ref(struct ref *ref,
>>       if (!hashcmp(ref->old_sha1, ref->new_sha1)) {
>>               if (verbosity > 0)
>>                       sprintf(display, "= %-*s %-*s -> %s", TRANSPORT_SUMMARY_WIDTH,
>> -                             "[up to date]", REFCOL_WIDTH, remote,
>> +                             _("[up to date]"), REFCOL_WIDTH, remote,
>>                               pretty_ref);
>
> Longer-term question: do people like to translate this kind of thing
> (with the arrows and so on) differently for right-to-left languages or
> is that considered overkill?

They do, on a RTL language the arrows are pointing the wrong way round. But for now I'm not trying to solve RTL issues (or indeed, word order or plural issues), just getting something basic going.

Show 12 quoted lines
>> @@ -249,8 +249,8 @@ static int update_local_ref(struct ref *ref,
>>                * If this is the head, and it's not okay to update
>>                * the head, and the old value of the head isn't empty...
>>                */
>> -             sprintf(display, "! %-*s %-*s -> %s  (can't fetch in current branch)",
>> -                     TRANSPORT_SUMMARY_WIDTH, "[rejected]", REFCOL_WIDTH, remote,
>> +             sprintf(display, _("! %-*s %-*s -> %s  (can't fetch in current branch)"),
>> +                     TRANSPORT_SUMMARY_WIDTH, _("[rejected]"), REFCOL_WIDTH, remote,
>
> Regardless of the answer, we should probably be either consistently
> translating or not translating it within this patch.  e.g. for not
> translating (though I suspect translating is the better choice):

I added a _() there because there's English language text in the message. I wouldn't have marked it if it was just "! %-*s %-*s -> %s".

And I haven't split up "! %-*s %-*s -> %s" and " (can't fetch in current branch)" because I'm trying to make minimal changes so that this can get through in a timely manner, before I have a mountain of merge conflicts on my hands.

But yeah, we want to fix that in the future.
Show 15 quoted lines
>                sprintf(display, "! %-*s %-*s -> %s  %s",
>                        TRANSPORT_SUMMARY_WIDTH, "[rejected]", REFCOL_WIDTH, remote,
>                        pretty_ref, _("(can't fetch in current branch)"));
>
>> @@ -260,8 +260,8 @@ static int update_local_ref(struct ref *ref,
>>               int r;
>>               r = s_update_ref("updating tag", ref, 0);
>>               sprintf(display, "%c %-*s %-*s -> %s%s", r ? '!' : '-',
>> -                     TRANSPORT_SUMMARY_WIDTH, "[tag update]", REFCOL_WIDTH, remote,
>> -                     pretty_ref, r ? "  (unable to update local ref)" : "");
>> +                     TRANSPORT_SUMMARY_WIDTH, _("[tag update]"), REFCOL_WIDTH, remote,
>> +                     pretty_ref, r ? _("  (unable to update local ref)") : "");
>
> Maybe we could stick to "%c %-*s %-*s -> %s%s", to make consistent
> translation easier.

Yeah, maybe. That's pretty much the only part of this series that deals with issues like that. So it's probably worth a fixup.

(I.e. ignore what I said earlier :)
Previous: Jonathan NiederNext: Jeff King
Message 24 of 63 in “gettextize the first 4 C mainporcelain common commands”
  1. 00/13 gettextize the first 4 C mainporcelain common commandsÆvar Arnfjörð Bjarmason, Sep 1, 2010
  2. 01/13 git-clone: use builtin.h to get gettext.hÆvar Arnfjörð Bjarmason, Sep 1, 2010
  3. 02/13 gettextize: git-clone basic messagesÆvar Arnfjörð Bjarmason, Sep 1, 2010
  4. 03/13 gettextize: git-clone "Cloning into" messageÆvar Arnfjörð Bjarmason, Sep 1, 2010
  5. 04/13 gettextize: git-add basic messagesÆvar Arnfjörð Bjarmason, Sep 1, 2010
  6. 05/13 gettextize: git-add refresh_index messageÆvar Arnfjörð Bjarmason, Sep 1, 2010
  7. Jonathan NiederSep 2, 2010
  8. 06/13 gettextize: git-branch basic messagesÆvar Arnfjörð Bjarmason, Sep 1, 2010
  9. 07/13 gettextize: git-branch "remote branch '%s' not found" messageÆvar Arnfjörð Bjarmason, Sep 1, 2010
  10. 08/13 gettextize: git-branch "git branch -v" messagesÆvar Arnfjörð Bjarmason, Sep 1, 2010
  11. 09/13 gettextize: git-branch "(no branch)" messageÆvar Arnfjörð Bjarmason, Sep 1, 2010
  12. 10/13 gettextize: git-checkout: our/their version messageÆvar Arnfjörð Bjarmason, Sep 1, 2010
  13. 11/13 gettextize: git-checkout basic messagesÆvar Arnfjörð Bjarmason, Sep 1, 2010
  14. 12/13 gettextize: git-checkout describe_detached_head messagesÆvar Arnfjörð Bjarmason, Sep 1, 2010
  15. 13/13 gettextize: git-checkout "Switched to a .. branch" messageÆvar Arnfjörð Bjarmason, Sep 1, 2010
  16. 00/25 [CONTINUED] gettextize all C mainporcelain common commandsÆvar Arnfjörð Bjarmason, Sep 2, 2010
  17. 01/25 gettextize: git-commit basic messagesÆvar Arnfjörð Bjarmason, Sep 2, 2010
  18. 02/25 gettextize: git-commit formatting messagesÆvar Arnfjörð Bjarmason, Sep 2, 2010
  19. 03/25 gettextize: git-commit advice messagesÆvar Arnfjörð Bjarmason, Sep 2, 2010
  20. 04/25 gettextize: git-diff basic messagesÆvar Arnfjörð Bjarmason, Sep 2, 2010
  21. 05/25 gettextize: git-fetch basic messagesÆvar Arnfjörð Bjarmason, Sep 2, 2010
  22. 06/25 gettextize: git-fetch formatting messagesÆvar Arnfjörð Bjarmason, Sep 2, 2010
  23. Jonathan NiederSep 2, 2010
  24. Ævar Arnfjörð BjarmasonSep 2, 2010
  25. Jeff KingSep 2, 2010
  26. Ævar Arnfjörð BjarmasonSep 2, 2010
  27. 07/25 gettextize: git-grep basic messagesÆvar Arnfjörð Bjarmason, Sep 2, 2010
  28. 08/25 gettextize: git-log basic messagesÆvar Arnfjörð Bjarmason, Sep 2, 2010
  29. 09/25 gettextize: git-format-patch --cover-letter messageÆvar Arnfjörð Bjarmason, Sep 2, 2010
  30. 10/25 gettextize: git-merge basic messagesÆvar Arnfjörð Bjarmason, Sep 2, 2010
  31. Jonathan NiederSep 2, 2010
  32. Ævar Arnfjörð BjarmasonSep 2, 2010
  33. Jonathan NiederSep 2, 2010
  34. Ævar Arnfjörð BjarmasonSep 2, 2010
  35. Jonathan NiederSep 2, 2010
  36. Ævar Arnfjörð BjarmasonSep 2, 2010
  37. Jonathan NiederSep 2, 2010
  38. Ævar Arnfjörð BjarmasonSep 3, 2010
  39. Jonathan NiederSep 3, 2010
  40. Ævar Arnfjörð BjarmasonSep 3, 2010
  41. Ævar Arnfjörð BjarmasonSep 3, 2010
  42. 11/25 gettextize: git-merge "In-index merge" messageÆvar Arnfjörð Bjarmason, Sep 2, 2010
  43. 12/25 gettextize: git-merge "Merge made by %s." messageÆvar Arnfjörð Bjarmason, Sep 2, 2010
  44. 13/25 gettextize: git-merge remaining cmd_merge messagesÆvar Arnfjörð Bjarmason, Sep 2, 2010
  45. 14/25 gettextize: git-mv basic messagesÆvar Arnfjörð Bjarmason, Sep 2, 2010
  46. 15/25 gettextize: git-mv "bad" messagesÆvar Arnfjörð Bjarmason, Sep 2, 2010
  47. 16/25 gettextize: git-rm basic messagesÆvar Arnfjörð Bjarmason, Sep 2, 2010
  48. 17/25 builtin: use builtin.h in git-resetÆvar Arnfjörð Bjarmason, Sep 2, 2010
  49. 18/25 gettextize: git-reset basic messagesÆvar Arnfjörð Bjarmason, Sep 2, 2010
  50. 19/25 gettextize: git-reset reset_type_names messagesÆvar Arnfjörð Bjarmason, Sep 2, 2010
  51. Peter KreftingSep 15, 2010
  52. Thomas RastSep 15, 2010
  53. 20/25 gettextize: git-tag basic messagesÆvar Arnfjörð Bjarmason, Sep 2, 2010
  54. 21/25 gettextize: git-tag tag_template messageÆvar Arnfjörð Bjarmason, Sep 2, 2010
  55. 22/25 gettextize: git-push basic messagesÆvar Arnfjörð Bjarmason, Sep 2, 2010
  56. 23/25 builtin: use builtin.h in git-statusÆvar Arnfjörð Bjarmason, Sep 2, 2010
  57. 24/25 gettextize: git-status basic messagesÆvar Arnfjörð Bjarmason, Sep 2, 2010
  58. Jonathan NiederSep 2, 2010
  59. Ævar Arnfjörð BjarmasonSep 2, 2010
  60. Jonathan NiederSep 2, 2010
  61. 25/25 gettextize: git-status shortstatus messagesÆvar Arnfjörð Bjarmason, Sep 2, 2010
  62. Jonathan NiederSep 2, 2010
  63. Ævar Arnfjörð BjarmasonSep 2, 2010

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.