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

Re: Git 1.8.3 l10n round 1

From
Jiang Xin <worldhello.net@gmail.com>
Date
Apr 11, 2013, 04:28 UTC
Message-ID
<CANYiYbF-cCeaL61AubF8Mx9XmKyxzcSytw9pKq5==W2r2R17Rg@mail.gmail.com>
In-Reply-To
<CAN_hzmptrZhUJo_WRnLdPD9jR85F10nHZpEXU64RMFWimLxqkw@mail.gmail.com>
2013/4/11 Harring Figueiredo <harringf@gmail.com>:
> How do I pull the git.pot from my upstream?

First add git://github.com/git-l10n/git-po.git as a new remote if you have not do this and fetch from it.

    $ git remote add git-po git://github.com/git-l10n/git-po.git
    $ git fetch git-po

After that, the commit with the update 'git.pot' is stored in branch remote/git-po/master.

    $ git log --oneline -1 git-po/master
    c138a l10n: git.pot: v1.8.3 round 1 (54 new, 15 removed)
Run the following command, you can find your local commits not in upstream.
    $ git log --oneline git-po/master..
    0ade1 l10n: Translation updates.
    3a731 ln10: Added more translation. No merge needed.
    69989 l10n: Merge remote-tracking branch 'upstream/master'
    b32bb l10n: Translated 61 messages
    8e534 l10n: Init of Brazilian Portuguese translation
I found there is a merge commit (commit 69989) already.

In order to update your local 'po/git.pot' file, you have TWO selection. One is merge, another is rebase.

If you choose merge like the follows,
    $ git merge -q --no-edit git-po/master
, then there would be a new merge commit in your local repo but not in upstream:
    $ git log --oneline git-po/master..
    8a699 Merge remote-tracking branch 'git-po/master' into WIP/pt_BR/master
    0ade1 l10n: Translation updates.
    3a731 ln10: Added more translation. No merge needed.
    69989 l10n: Merge remote-tracking branch 'upstream/master'
    b32bb l10n: Translated 61 messages
    8e534 l10n: Init of Brazilian Portuguese translation
But if you use rebase instead of merge,
    $ git rebase git-po/master
    First, rewinding head to replay your work on top of it...
    Applying: l10n: Init of Brazilian Portuguese translation
    Applying: l10n: Translated 61 messages
    Applying: ln10: Added more translation. No merge needed.
    Applying: l10n: Translation updates.
after rebase, then your may find in the polished master branch
of you local repo, the old merge commit (such as 69989
l10n: Merge remote-tracking branch 'upstream/master') is discarded.
(Please note after rebase the commit-ish would be changed, and
 yours must be different.)
    $ git log --oneline git-po/master..
    a338e l10n: Translation updates.
    0d36a ln10: Added more translation. No merge needed.
    2a7a6 l10n: Translated 61 messages
    70b2 l10n: Init of Brazilian Portuguese translation
After rebase, you can not push directly, must push with --force option, like
    git push --force origin
> Once I do that, what else do I need to do to update my .po and leave my repo
> in a manner that I can commit to my remote?

You can find instructions in "Updating a XX.po file" section of 'po/README' file.

1. change cwd.
    $ cd po/
2. Current statistics of your pt_BR.po
    $ msgfmt -o /dev/null --statistics pt_BR.po
    158 translated messages, 1851 untranslated messages.
3. Update pt_BR.po from the new update git.pot
    $ msgmerge --add-location --backup=off -U pt_BR.po  git.pot
4. Then you may see pt_BR.po changed:
    $ msgfmt -o /dev/null --statistics pt_BR.po
    155 translated messages, 14 fuzzy translations, 1879 untranslated messages.
5. Commit the changed pt_BR.po, and start your translation.

When you feel translations of 'pt_BR.po' is ok for me to pull, send me a pull request. But you'd better squash all these trivial commits into one big initial commit, because so many trivial commits are boring, and may have bad impact on git repository statistics. Junio has a blog on how he do statistics:

* http://git-blame.blogspot.com/2013/03/so-how-well-are-we-doing-lately.html
BTW, kick back to the list for future reference.

-- Jiang Xin

Message 1 of 1 in “Re: Git 1.8.3 l10n round 1”
  1. Jiang XinApr 11, 2013

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.