workflow using git for translations

Open forum for end-user questions about Wine. Before asking questions, check out the Wiki as a first step.
Forum Rules
Locked
fcmartins
Level 4
Level 4
Posts: 114
Joined: Sat Nov 01, 2008 5:48 pm

workflow using git for translations

Post by fcmartins »

I did a first set of minor translations to become familiar with the process. These changes have been committed in "main" wine git (how do you call it?).

In the meanwhile, I did a bunch of changes. Now I want to create a patch for these changes. I did a

> git stash save

(and I had a copy of the file somewhere else) and then a

> git pull
Auto-merging po/pt_PT.po
CONFLICT (content): Merge conflict in po/pt_PT.po
Automatic merge failed; fix conflicts and then commit the result.

How can I see the conflicts? I guess they are actually the changes I've sent in the first place. But I'm not sure how to deal with this.

I also tried:

> git fetch; git rebase origin
cannot rebase: you have unstaged changes
U po/pt_PT.po
M po/pt_PT.po

How can I make this work??
Frédéric Delanoy

workflow using git for translations

Post by Frédéric Delanoy »

On Tue, Feb 28, 2012 at 11:00, fcmartins <[email protected]> wrote:
I did a first set of minor translations to become familiar with the process. These changes have been committed in "main" wine git (how do you call it?).
Well there are stable branches: 1.0.x, 1.2.x and (in the future) 1.4.x
The 'main' wine git, you can call it the development branch
In the meanwhile, I did a bunch of changes. Now I want to create a patch for these changes. I did a
git stash save
(and I had a copy of the file somewhere else) and then a
git pull
Auto-merging po/pt_PT.po
CONFLICT (content): Merge conflict in po/pt_PT.po
Automatic merge failed; fix conflicts and then commit the result.

How can I see the conflicts? I guess they are actually the changes I've sent in the first place.
Those are conflicting changes between your local branch and the upstream branch
But I'm not sure how to deal with this.
The git documentation explains that. You can see
http://babygnu.blogspot.com/2009/01/res ... n-git.html for
instance
I also tried:
git fetch; git rebase origin
cannot rebase: you have unstaged changes
U       po/pt_PT.po
M       po/pt_PT.po

How can I make this work??
commit or stash your changes are retry. You can also read 'man git-rebase'
fcmartins
Level 4
Level 4
Posts: 114
Joined: Sat Nov 01, 2008 5:48 pm

Post by fcmartins »

Thanks for the link, it did help. I got confused because there should have been no conflicts since no one else had submitted a patch for that file, but in fact the committer did remove an extra space, hence the conflict.

I still would like to know what is the best practice here and although I am happy to spend time in the translations and read the wine translation and patch pages but I have no motivation to spend further time in learning git which requires quite some investment to be properly understood. I hope this can be found reasonable if people in the community know the answers for what is not in the wine documentation.

If I may ask again, I have submitted another patch, which was accepted. I have not made any further changes. Am I supposed to do now a git pull before doing more translation?

And what if I do further changes before the patch is accepted? Then I need to git stash save and git pull?
Frédéric Delanoy

workflow using git for translations

Post by Frédéric Delanoy »

On Thu, Mar 1, 2012 at 00:13, fcmartins <[email protected]> wrote:
Thanks for the link, it did help. I got confused because there should have been no conflicts since no one else had submitted a patch for that file, but in fact the committer did remove an extra space, hence the conflict.

I still would like to know what is the best practice here and although I am happy to spend time in the translations and read the wine translation and patch pages but I have no motivation to spend further time in learning git which requires quite some investment to be properly understood. I hope this can be found reasonable if people in the community know the answers for what is not in the wine documentation.

If I may ask again, I have submitted another patch, which was accepted. I have not made any further changes. Am I supposed to do now a git pull before doing more translation?

And what if I do further changes before the patch is accepted? Then I need to git stash save and git pull?
To limit the risks of conflict, you want to do regular pulls to be up-to-date.
What you can do:
- create a local branch for your translation work, e.g. 'git checkout
-b translations' and commit your changes there.
- before working on a new translation/submitting a patch, update your
local git, e.g.
git checkout master (switch to main branch)
git pull (update your local git)
git rebase origin translations (move your local branch to the tip of
the main branch)

For instance:
<before changing stuff>
git checkout master && git pull && git rebase origin translations
<hack po/XX.po>
git commit -m "po: Update XX translation" po/XX.po
git format-patch -k -1 (creates a patch file 0001-foobar)
git send-email 0001-foobar (or send it with your usual mail client)

Sometimes, during rebase, your patch may have slightly been altered
(e.g. line width changes, ...) before being committed and rebase will
complain
You can verify your patch status on http://source.winehq.org/patches/
: if it's marked as committed, you may do a 'git rebase --skip'
instead of full conflict resolution

Hope this helps,

Frédéric
Locked