{"thread":{"id":"33472","subject":"Re: Git 1.8.3 l10n round 1","startedAt":"2013-04-11T04:28:59Z","lastAt":"2013-04-11T04:28:59Z","messageCount":1,"participants":["Jiang Xin"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"213894","messageId":"CANYiYbF-cCeaL61AubF8Mx9XmKyxzcSytw9pKq5==W2r2R17Rg@mail.gmail.com","threadId":"33472","inReplyTo":"CAN_hzmptrZhUJo_WRnLdPD9jR85F10nHZpEXU64RMFWimLxqkw@mail.gmail.com","subject":"Re: Git 1.8.3 l10n round 1","fromName":"Jiang Xin","fromEmail":"worldhello.net@gmail.com","sentAt":"2013-04-11T04:28:59Z","receivedAt":"2013-04-11T04:28:59Z","isPatch":false,"sender":{"key":"worldhello.net@gmail.com","avatar":"https://avatars.githubusercontent.com/u/183860?v=4"},"body":"2013/4/11 Harring Figueiredo <harringf@gmail.com>:\n> How do I pull the git.pot from my upstream?\n\nFirst add git://github.com/git-l10n/git-po.git as a new remote if you have not\ndo this and fetch from it.\n\n    $ git remote add git-po git://github.com/git-l10n/git-po.git\n    $ git fetch git-po\n\nAfter that, the commit with the update 'git.pot' is stored in branch\nremote/git-po/master.\n\n    $ git log --oneline -1 git-po/master\n    c138a l10n: git.pot: v1.8.3 round 1 (54 new, 15 removed)\n\nRun the following command, you can find your local commits not in upstream.\n\n    $ git log --oneline git-po/master..\n    0ade1 l10n: Translation updates.\n    3a731 ln10: Added more translation. No merge needed.\n    69989 l10n: Merge remote-tracking branch 'upstream/master'\n    b32bb l10n: Translated 61 messages\n    8e534 l10n: Init of Brazilian Portuguese translation\n\nI found there is a merge commit (commit 69989) already.\n\nIn order to update your local 'po/git.pot' file, you have TWO selection.\nOne is merge, another is rebase.\n\nIf you choose merge like the follows,\n\n    $ git merge -q --no-edit git-po/master\n\n, then there would be a new merge commit in your local repo but not in upstream:\n\n    $ git log --oneline git-po/master..\n    8a699 Merge remote-tracking branch 'git-po/master' into WIP/pt_BR/master\n    0ade1 l10n: Translation updates.\n    3a731 ln10: Added more translation. No merge needed.\n    69989 l10n: Merge remote-tracking branch 'upstream/master'\n    b32bb l10n: Translated 61 messages\n    8e534 l10n: Init of Brazilian Portuguese translation\n\nBut if you use rebase instead of merge,\n\n    $ git rebase git-po/master\n    First, rewinding head to replay your work on top of it...\n    Applying: l10n: Init of Brazilian Portuguese translation\n    Applying: l10n: Translated 61 messages\n    Applying: ln10: Added more translation. No merge needed.\n    Applying: l10n: Translation updates.\n\nafter rebase, then your may find in the polished master branch\nof you local repo, the old merge commit (such as 69989\nl10n: Merge remote-tracking branch 'upstream/master') is discarded.\n(Please note after rebase the commit-ish would be changed, and\n yours must be different.)\n\n    $ git log --oneline git-po/master..\n    a338e l10n: Translation updates.\n    0d36a ln10: Added more translation. No merge needed.\n    2a7a6 l10n: Translated 61 messages\n    70b2 l10n: Init of Brazilian Portuguese translation\n\nAfter rebase, you can not push directly, must push with --force option, like\n\n    git push --force origin\n\n> Once I do that, what else do I need to do to update my .po and leave my repo\n> in a manner that I can commit to my remote?\n\nYou can find instructions in \"Updating a XX.po file\" section of\n'po/README' file.\n\n1. change cwd.\n\n    $ cd po/\n\n2. Current statistics of your pt_BR.po\n\n    $ msgfmt -o /dev/null --statistics pt_BR.po\n    158 translated messages, 1851 untranslated messages.\n\n3. Update pt_BR.po from the new update git.pot\n\n    $ msgmerge --add-location --backup=off -U pt_BR.po  git.pot\n\n4. Then you may see pt_BR.po changed:\n\n    $ msgfmt -o /dev/null --statistics pt_BR.po\n    155 translated messages, 14 fuzzy translations, 1879 untranslated messages.\n\n5. Commit the changed pt_BR.po, and start your translation.\n\nWhen you feel translations of 'pt_BR.po' is ok for me to pull, send me\na pull request. But you'd better squash all these trivial commits into one\nbig initial commit, because so many trivial commits are boring, and may\nhave bad impact on git repository statistics. Junio has a blog on how he\ndo statistics:\n\n* http://git-blame.blogspot.com/2013/03/so-how-well-are-we-doing-lately.html\n\nBTW, kick back to the list for future reference.\n\n--\nJiang Xin\n"}]}