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

How you can translate things now, and a plan for the i18n series going forward

From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Date
Feb 12, 2011, 11:19 UTC
Message-ID
<AANLkTim+_zRisVRfnv_Xe69xof3e8rL_BAXxmAsCwins@mail.gmail.com>
On Fri, Feb 11, 2011 at 21:22, Sverre Rabbelier <srabbelier@gmail.com> wrote:
Show 11 quoted lines
> On Fri, Feb 11, 2011 at 21:01, kev <kev@riseup.net> wrote:
>> i understand the ab/i18n has been gettextized and translated to at
>> least a couple of languages.
>>
>> ive found references in the list archives to this, but nothing in the
>> source code. i do see translations of git-gui, however. but im looking
>> for some clue as to how to translate git itself.
>
> Currently the ab/i18n branch has not been merged to master, so it's
> not available to the general public. Ævar has been working on it but
> we haven't heard from him recently on this topic.

Hi both. I've been on a hiatus from Git development, so I haven't picked up ab/i18n again, but I still plan to and to get it included in Git.

Meanwhile Kev, if you want to translate Git you can:
    git clone git://github.com/avar/git.git &&
    cd git &&
    git checkout -t origin/ab/i18n

And follow the instructions in po/README. This branch is relatively out of date and hasn't been rebased on the upstream master in a while, but most of the strings you'll be translating will still be there once I do that, so your work won't go to waste.

For everyone else, I plan to re-submit ab/i18n, but re-do it so that it isn't all one huge patch series but can be applied in smaller steps. Here's the outline of my current plan:

    ** TODO Re-do the i18n series so it can be applied in piecemeal steps
       I.e. these:
    *** TODO Introduce a skeleton no-op gettext, just the
infrastructure minus the interesting stuff
        I.e. just add:
            #define N_(s) (s)
            #define _(s) (s)
    *** TODO Add no-op C gettextize patches
        This will change "foo" to _("foo") everywhere, but will be a no-op
        due to it being macroed out.
    *** TODO Add no-op Shell/Perl gettextize patches
        Due to the nature of these languages these can't be macroed out,
        but it's still easy to have a no-op wrapper function.
    *** TODO Add po/README etc.
        The documentation about how to add translations etc.
    *** TODO Add translations
        Add the po/*.po files. Since we have no-op translations everywhere
        we can translate git with xgettext + po editing, even though the
        translations aren't being used yet.
    *** TODO Introduce the real gettext in a later patch + tests
        Once the rest is all in this will be a much smaller change.

I think doing it this way will be much easier for everyone, what do you think Junio?

Next: Michael J Gruber
Message 1 of 7 in “How you can translate things now, and a plan for the i18n series going forward”
  1. Ævar Arnfjörð BjarmasonFeb 12, 2011
  2. Michael J GruberFeb 12, 2011
  3. Junio C HamanoFeb 12, 2011
  4. Ævar Arnfjörð BjarmasonFeb 12, 2011
  5. Ævar Arnfjörð BjarmasonFeb 16, 2011
  6. Junio C HamanoFeb 17, 2011
  7. Ævar Arnfjörð BjarmasonFeb 17, 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.