Re: [PATCH 6/7] update git-stage.po

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Ãvar ArnfjÃrà Bjarmason wrote:

> We should be able to have a merge driver defined for git.git to do
> that using the "Defining a custom merge driver" facility defined in
> gitattributes(5), but I haven't actually tried to make one. But it
> looks easy enough, I'll look at doing that when this becomes a problem
> I have to deal with, and I'm hoping someone beats me to it :)

Heh.  Hopefully it won't be hard to do this as a program using
libgettextpo.  For now my i18n time will be going towards playing with
the toolset you've already sent, but afterwards I'd like to try that
out.

msgmerge itself cannot perform a 3-way merge, if I understand it
correctly --- its purpose is instead to integrate new strings and
fuzzies as the document being translated changes over time, while what
I would like to do is to combine two changes to a translation without
RCS merge(1) [or rather git's ll-merge machinery] being confused by
irrelevant changes to line numbers, message order, and line wrapping.

That said, msgmerge can be helpful in almost solving the problem.

To compare old-hu.po and new-hu.po:

	msgmerge old-hu.po po/git.pot >+preimage.po
	msgmerge new-hu.po po/git.pot >+postimage.po
	git diff --no-index +preimage.po +postimage.po

To perform a 3-way merge between ancestor-hu.po, our-hu.po, and
their-hu.po:

	msgmerge ancestor-hu.po po/git.pot >+base.po
	msgmerge our-hu.po po/git.pot >+ours.po
	msgmerge their-hu.po po/git.pot >+theirs.po
	git merge-file -L ours -L base -L theirs --stdout \
		+ours.po +base.po +theirs.po >hu.po
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]