-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
git-merge-po hard to understand #42
Comments
Hi @rmoehn! The Gettext executables are fairly thoroughly documented my their manpages, for instance msgcat(1). GNU also has a description of the PO file format which might help.
The idea behind This is possible because (admittedly with some juggling!) the various utilities (
I'm assuming this is the temporary file output by the test suite ; it is strange indeed, and not what I'd expect. I'd have to refresh my memory (just back from holidays) ; can you confirm the test suite passes for you?
An option could be to add conditionals around "the big merge" change, as Something like this should work, but I'll let you get familiar with the tools and amend the test suite accordingly:
|
The test suite passes for me. I just checked again that the strange thing still occurs by resetting to master, inserting For -Xours I tried something similar to what you're suggesting, but was a bit impatient with the tools. I mean, I did read the manpages, but already the first sentence of the description is messed up: »The msgcat program concatenates and merges the specified PO files.« Concatenating and merging are two quite different activities, I thought. If the manpage would explain afterwards how this seemingly contradictory statement makes sense in the context of PO files, it would be okay. But the next sentence makes it worse. So msgcat concatenates and merges PO files as well as finds messages in them? Maybe it even rewrites every occurence of Bielefeld with Nowhere. Erm, but sorry for ranting in this place. I guess you're not involved in msgcat development. |
I'm not indeed, and the Gettext authors seem to follow a practice of crypticly terse manpages ;) My attempt at: When passing |
Thanks for the explanation. I've experimented a bit and perhaps found out why m_msgcat -o ${TEMP}.local-only --unique ${TEMP}.local-changes ${TEMP}.conflicts However, |
I also tried your suggestion for the |
Messing around with msgcat and friends is all too confusing to me. I now implemented the merge-favouring-ours in Python with polib and that was much easier. Not closing this issue, because you Shell script – although it might yield the correct results – still doesn't work as one would expect from reading it. |
I'm trying to modify git-merge-po so that it accepts an option like -Xours. However, I have a hard time understanding how it works, not least because the documentation of the gettext tools is rather thin and I don't know what really happens when I run a command. So it would be very nice if you could clarify a bit how and why git-merge-po works.
In particular, I encountered one problem: according to the comment,
${TEMP}.local-only
should only contain messages that were changed only on local. However, look at the last message:The text was updated successfully, but these errors were encountered: