bug-gettext
[Top][All Lists]
Advanced

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

[bug-gettext] How to do 3-way merge with po-files?


From: Mikko Rantalainen
Subject: [bug-gettext] How to do 3-way merge with po-files?
Date: Wed, 09 Jul 2014 14:18:51 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0

I have a git repository containing program source and a collection of .po files for translating the user interface using gettext.

I'm regularly hitting problems merging multiple branches of the project because a single .po file has been changed in multiple branches. Most of the time the changes do not touch the same localization strings. However, the .po files also have automatically generated content (e.g. line numbers in comments) which makes manual merging really hard.

The git version control system can use "merge driver" which is passed base version, modified version 1 and modified version 2 of a .po file and the driver is supposed to emit the 3-way merged version. The intent is to automatically generate the merged version if there are zero conflicts. In case of conflicts (the same msgid translated in different ways in both branches), the merge driver should keep both translations and mark the conflicting msgid as fuzzy.

A command "msg3way" was suggested by Panos Christeas nearly 4 years ago [1] which would have implemented the missing feature. The pull request never got any traction for unknown reasons. Currently it seems that most people are using hacks such as [2] and [3] which result in more or less broken .po files.

Would it be possible to do

        git pull http://members.hellug.gr/xrg/repos/gettext

this time? If not, please, explain the reasons in public.

[1] http://lists.gnu.org/archive/html/bug-gnu-utils/2010-11/msg00051.html
[2] https://gist.github.com/mezis/1605647
[3] http://stackoverflow.com/questions/16214067/wheres-the-3-way-git-merge-driver-for-po-gettext-files

--
Mikko



reply via email to

[Prev in Thread] Current Thread [Next in Thread]